Apply TERN to compact code (#17619)
This commit is contained in:
@@ -64,18 +64,14 @@ void GcodeSuite::M24() {
|
||||
if (card.isFileOpen()) {
|
||||
card.startFileprint(); // SD card will now be read for commands
|
||||
startOrResumeJob(); // Start (or resume) the print job timer
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
recovery.prepare();
|
||||
#endif
|
||||
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
||||
}
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
#ifdef ACTION_ON_RESUME
|
||||
host_action_resume();
|
||||
#endif
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), DISMISS_STR);
|
||||
#endif
|
||||
TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), DISMISS_STR));
|
||||
#endif
|
||||
|
||||
ui.reset_status();
|
||||
@@ -105,9 +101,7 @@ void GcodeSuite::M25() {
|
||||
ui.reset_status();
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume"));
|
||||
#endif
|
||||
TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume")));
|
||||
#ifdef ACTION_ON_PAUSE
|
||||
host_action_pause();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user