Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make arc support (G2/G3) configurable #3747

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
8 changes: 7 additions & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,9 @@ void stop();
void get_available_commands();
void process_next_command();

#if ENABLED(ARC_SUPPORT)
void plan_arc(float target[NUM_AXIS], float* offset, uint8_t clockwise);
#endif

void serial_echopair_P(const char* s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
void serial_echopair_P(const char* s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
Expand Down Expand Up @@ -2461,6 +2463,7 @@ inline void gcode_G0_G1() {
* G2: Clockwise Arc
* G3: Counterclockwise Arc
*/
#if ENABLED(ARC_SUPPORT)
inline void gcode_G2_G3(bool clockwise) {
if (IsRunning()) {

Expand All @@ -2487,6 +2490,7 @@ inline void gcode_G2_G3(bool clockwise) {
refresh_cmd_timeout();
}
}
#endif

/**
* G4: Dwell S<seconds> or P<milliseconds>
Expand Down Expand Up @@ -6484,7 +6488,7 @@ void process_next_command() {
break;

// G2, G3
#if DISABLED(SCARA)
#if ENABLED(ARC_SUPPORT) & DISABLED(SCARA)
case 2: // G2 - CW ARC
case 3: // G3 - CCW ARC
gcode_G2_G3(codenum == 2);
Expand Down Expand Up @@ -7423,6 +7427,7 @@ void prepare_move() {
set_current_to_destination();
}

#if ENABLED(ARC_SUPPORT)
/**
* Plan an arc in 2 dimensions
*
Expand Down Expand Up @@ -7564,6 +7569,7 @@ void plan_arc(
// in any intermediate location.
set_current_to_destination();
}
#endif

#if HAS_CONTROLLERFAN

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Felix/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/K8200/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/RigidBot/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/SCARA/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/TAZ4/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/WITBOX/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/makibox/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
// @section extras

// Arc interpretation settings:
#define ARC_SUPPORT // Disabling this saves ~2660bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

Expand Down