Optimize G-code flag parameters (#21849)
This commit is contained in:
committed by
Scott Lahteine
parent
770edea577
commit
6a1e78e614
@ -59,7 +59,7 @@ inline void plr_error(PGM_P const prefix) {
|
||||
void GcodeSuite::M1000() {
|
||||
|
||||
if (recovery.valid()) {
|
||||
if (parser.seen('S')) {
|
||||
if (parser.seen_test('S')) {
|
||||
#if HAS_LCD_MENU
|
||||
ui.goto_screen(menu_job_recovery);
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
@ -70,7 +70,7 @@ void GcodeSuite::M1000() {
|
||||
SERIAL_ECHO_MSG("Resume requires LCD.");
|
||||
#endif
|
||||
}
|
||||
else if (parser.seen('C')) {
|
||||
else if (parser.seen_test('C')) {
|
||||
#if HAS_LCD_MENU
|
||||
lcd_power_loss_recovery_cancel();
|
||||
#else
|
||||
|
@ -48,14 +48,14 @@ void GcodeSuite::M413() {
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
if (parser.seen("RL")) recovery.load();
|
||||
if (parser.seen('W')) recovery.save(true);
|
||||
if (parser.seen('P')) recovery.purge();
|
||||
if (parser.seen('D')) recovery.debug(PSTR("M413"));
|
||||
if (parser.seen_test('W')) recovery.save(true);
|
||||
if (parser.seen_test('P')) recovery.purge();
|
||||
if (parser.seen_test('D')) recovery.debug(PSTR("M413"));
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
if (parser.seen('O')) recovery._outage();
|
||||
if (parser.seen_test('O')) recovery._outage();
|
||||
#endif
|
||||
if (parser.seen('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
|
||||
if (parser.seen('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
|
||||
if (parser.seen_test('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
|
||||
if (parser.seen_test('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user