Browse Source

Move 'last_pause_state' closer to usage

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
b579f5dc99
  1. 13
      Marlin/src/module/temperature.cpp

13
Marlin/src/module/temperature.cpp

@ -1030,10 +1030,6 @@ void Temperature::manage_heater() {
if (!inited) return watchdog_refresh();
#endif
#if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
static bool last_pause_state;
#endif
#if ENABLED(EMERGENCY_PARSER)
if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true);
#endif
@ -1125,16 +1121,21 @@ void Temperature::manage_heater() {
}
#endif // WATCH_BED
#define PAUSE_CHANGE_REQD BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
#if PAUSE_CHANGE_REQD
static bool last_pause_state;
#endif
do {
#if DISABLED(PIDTEMPBED)
if (PENDING(ms, next_bed_check_ms)
#if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
#if PAUSE_CHANGE_REQD
&& paused == last_pause_state
#endif
) break;
next_bed_check_ms = ms + BED_CHECK_INTERVAL;
#if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
#if PAUSE_CHANGE_REQD
last_pause_state = paused;
#endif
#endif

Loading…
Cancel
Save