🎨 Standardize G-code reporting
This commit is contained in:
committed by
Scott Lahteine
parent
a596faf4e5
commit
6d96c221bd
@ -33,7 +33,7 @@
|
||||
* M17: Enable stepper motors
|
||||
*/
|
||||
void GcodeSuite::M17() {
|
||||
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
|
||||
if (parser.seen_axis()) {
|
||||
LOGICAL_AXIS_CODE(
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) enable_e_steppers(),
|
||||
if (parser.seen_test('X')) ENABLE_AXIS_X(),
|
||||
@ -59,7 +59,7 @@ void GcodeSuite::M18_M84() {
|
||||
stepper_inactive_time = parser.value_millis_from_seconds();
|
||||
}
|
||||
else {
|
||||
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
|
||||
if (parser.seen_axis()) {
|
||||
planner.synchronize();
|
||||
LOGICAL_AXIS_CODE(
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) disable_e_steppers(),
|
||||
|
@ -33,14 +33,22 @@
|
||||
* Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report
|
||||
*/
|
||||
void GcodeSuite::M211() {
|
||||
if (parser.seen('S'))
|
||||
soft_endstop._enabled = parser.value_bool();
|
||||
else
|
||||
M211_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS));
|
||||
SERIAL_ECHOPAIR(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
|
||||
serialprintln_onoff(soft_endstop._enabled);
|
||||
|
||||
report_echo_start(forReplay);
|
||||
const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(),
|
||||
l_soft_max = soft_endstop.max.asLogical();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(STR_SOFT_ENDSTOPS);
|
||||
if (parser.seen('S')) soft_endstop._enabled = parser.value_bool();
|
||||
serialprint_onoff(soft_endstop._enabled);
|
||||
print_pos(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" "));
|
||||
print_pos(l_soft_max, PSTR(STR_SOFT_MAX));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // HAS_SOFTWARE_ENDSTOPS
|
||||
|
Reference in New Issue
Block a user