Apply TERN to compact code (#17619)
This commit is contained in:
@ -142,9 +142,7 @@ void GcodeSuite::M205() {
|
||||
const float junc_dev = parser.value_linear_units();
|
||||
if (WITHIN(junc_dev, 0.01f, 0.3f)) {
|
||||
planner.junction_deviation_mm = junc_dev;
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
planner.recalculate_max_e_jerk();
|
||||
#endif
|
||||
TERN_(LIN_ADVANCE, planner.recalculate_max_e_jerk());
|
||||
}
|
||||
else
|
||||
SERIAL_ERROR_MSG("?J out of range (0.01 to 0.3)");
|
||||
|
@ -340,12 +340,8 @@ void GcodeSuite::M43() {
|
||||
#if HAS_RESUME_CONTINUE
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
wait_for_user = true;
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), CONTINUE_STR);
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called"));
|
||||
#endif
|
||||
TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), CONTINUE_STR));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called")));
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
@ -366,9 +362,7 @@ void GcodeSuite::M43() {
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_RESUME_CONTINUE
|
||||
if (!wait_for_user) break;
|
||||
#endif
|
||||
if (TERN0(HAS_RESUME_CONTINUE, !wait_for_user)) break;
|
||||
|
||||
safe_delay(200);
|
||||
}
|
||||
|
Reference in New Issue
Block a user