Browse Source

🐛 Fix manage_heaters recursion on servo move (#22313)

Followup to e297748b22
Katelyn Schiesser 3 years ago
parent
commit
79405ce2af
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/module/temperature.cpp

+ 4
- 0
Marlin/src/module/temperature.cpp View File

@@ -1236,6 +1236,10 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
1236 1236
 void Temperature::manage_heater() {
1237 1237
   if (marlin_state == MF_INITIALIZING) return watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog!
1238 1238
 
1239
+  static bool no_reentry = false;  // Prevent recursion
1240
+  if (no_reentry) return;
1241
+  REMEMBER(mh, no_reentry, true);
1242
+
1239 1243
   #if ENABLED(EMERGENCY_PARSER)
1240 1244
     if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true);
1241 1245
 

Loading…
Cancel
Save