Browse Source

Followup to #13039 (#13163)

- Fix compile error when accessing `process_subcommands_now_P`.
- Use `const` var eliminating double-negative (to make code more understandable).
pull/1/head
Marcio Teixeira 6 years ago
committed by Scott Lahteine
parent
commit
9f0e1834ec
  1. 11
      Marlin/src/Marlin.cpp

11
Marlin/src/Marlin.cpp

@ -347,8 +347,10 @@ void disable_all_steppers() {
host_action_prompt_show(); host_action_prompt_show();
#endif #endif
const bool run_runout_script = !runout.host_handling;
#if ENABLED(HOST_ACTION_COMMANDS) #if ENABLED(HOST_ACTION_COMMANDS)
if (!runout.host_handling if (run_runout_script
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600") && ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125") || strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
@ -372,10 +374,9 @@ void disable_all_steppers() {
SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " "); SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
SERIAL_CHAR(tool); SERIAL_CHAR(tool);
SERIAL_EOL(); SERIAL_EOL();
#endif // HOST_ACTION_COMMANDS #endif // HOST_ACTION_COMMANDS
if (!runout.host_handling) if (run_runout_script)
enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
} }
@ -385,7 +386,7 @@ void disable_all_steppers() {
void event_probe_failure() { void event_probe_failure() {
#ifdef G29_FAILURE_COMMANDS #ifdef G29_FAILURE_COMMANDS
process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS)); gcode.process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
#endif #endif
#ifdef ACTION_ON_G29_FAILURE #ifdef ACTION_ON_G29_FAILURE
host_action(PSTR(ACTION_ON_G29_FAILURE)); } host_action(PSTR(ACTION_ON_G29_FAILURE)); }
@ -403,7 +404,7 @@ void disable_all_steppers() {
host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying")); host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
#endif #endif
#ifdef G29_RECOVER_COMMANDS #ifdef G29_RECOVER_COMMANDS
process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS)); gcode.process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
#endif #endif
#ifdef ACTION_ON_G29_RECOVER #ifdef ACTION_ON_G29_RECOVER
host_action(PSTR(ACTION_ON_G29_RECOVER)); host_action(PSTR(ACTION_ON_G29_RECOVER));

Loading…
Cancel
Save