Skip to content

Commit

Permalink
change option name
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Sep 14, 2021
1 parent 0e117e5 commit 7c56bbd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2948,4 +2948,4 @@
//#define EDITABLE_SERVO_ANGLES

// Disable servo with M282 to reduce power consumption, noise, and heat when not in use
//#define SERVOS_CAN_BE_DISABLED
//#define SERVO_DISABLE_COMMAND
4 changes: 2 additions & 2 deletions Marlin/src/gcode/control/M282.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../../inc/MarlinConfig.h"

#if ENABLED(SERVOS_CAN_BE_DISABLED)
#if ENABLED(SERVO_DISABLE_COMMAND)

#include "../gcode.h"
#include "../../module/servo.h"
Expand All @@ -42,4 +42,4 @@ void GcodeSuite::M282() {

}

#endif // SERVOS_CAN_BE_DISABLED
#endif // SERVO_DISABLE_COMMAND
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if ENABLED(EDITABLE_SERVO_ANGLES)
case 281: M281(); break; // M281: Set servo angles
#endif
#if ENABLED(SERVOS_CAN_BE_DISABLED)
#if ENABLED(SERVO_DISABLE_COMMAND)
case 282: M282(); break; // M282: Detach servo
#endif
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
* M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS)
* M280 - Set servo position absolute: "M280 P<index> S<angle|µs>". (Requires servos)
* M281 - Set servo min|max position: "M281 P<index> L<min> U<max>". (Requires EDITABLE_SERVO_ANGLES)
* M282 - Detach servo: "M282 P<index>". (Requires SERVOS_CAN_BE_DISABLED)
* M282 - Detach servo: "M282 P<index>". (Requires SERVO_DISABLE_COMMAND)
* M290 - Babystepping (Requires BABYSTEPPING)
* M300 - Play beep sound S<frequency Hz> P<duration ms>
* M301 - Set PID parameters P I and D. (Requires PIDTEMP)
Expand Down Expand Up @@ -863,7 +863,7 @@ class GcodeSuite {
static void M281();
static void M281_report(const bool forReplay=true);
#endif
#if ENABLED(SERVOS_CAN_BE_DISABLED)
#if ENABLED(SERVO_DISABLE_COMMAND)
static void M282();
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@
#undef SERVO_DELAY
#undef DEACTIVATE_SERVOS_AFTER_MOVE
#undef EDITABLE_SERVO_ANGLES
#undef SERVOS_CAN_BE_DISABLED
#undef SERVO_DISABLE_COMMAND
#endif

// Sensors
Expand Down
2 changes: 1 addition & 1 deletion ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ HAS_SMART_EFF_MOD = src_filter=+<src/gcode/config/M672.cpp>
COOLANT_CONTROL|AIR_ASSIST = src_filter=+<src/gcode/control/M7-M9.cpp>
AIR_EVACUATION = src_filter=+<src/gcode/control/M10-M11.cpp>
HAS_SOFTWARE_ENDSTOPS = src_filter=+<src/gcode/control/M211.cpp>
SERVOS_CAN_BE_DISABLED = src_filter=+<src/gcode/control/M282.cpp>
SERVO_DISABLE_COMMAND = src_filter=+<src/gcode/control/M282.cpp>
HAS_DUPLICATION_MODE = src_filter=+<src/gcode/control/M605.cpp>
LIN_ADVANCE = src_filter=+<src/gcode/feature/advance>
PHOTO_GCODE = src_filter=+<src/gcode/feature/camera>
Expand Down

0 comments on commit 7c56bbd

Please sign in to comment.