Bladeren bron

Fix thermal error protection, reporting (#20655)

Marcio T 4 jaren geleden
bovenliggende
commit
2d88bcb67e
No account linked to committer's email address

+ 1
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp Bestand weergeven

75
 
75
 
76
     while (has_more_notes()) {
76
     while (has_more_notes()) {
77
       onIdle();
77
       onIdle();
78
-      #ifdef EXTENSIBLE_UI
79
-        ExtUI::yield();
80
-      #endif
78
+      TERN_(TOUCH_UI_FTDI_EVE, ExtUI::yield());
81
     }
79
     }
82
   }
80
   }
83
 
81
 

+ 18
- 10
Marlin/src/module/temperature.cpp Bestand weergeven

793
 inline void loud_kill(PGM_P const lcd_msg, const heater_id_t heater_id) {
793
 inline void loud_kill(PGM_P const lcd_msg, const heater_id_t heater_id) {
794
   marlin_state = MF_KILLED;
794
   marlin_state = MF_KILLED;
795
   #if USE_BEEPER
795
   #if USE_BEEPER
796
+    thermalManager.disable_all_heaters();
796
     for (uint8_t i = 20; i--;) {
797
     for (uint8_t i = 20; i--;) {
797
-      WRITE(BEEPER_PIN, HIGH); delay(25);
798
-      WRITE(BEEPER_PIN, LOW); delay(80);
798
+      WRITE(BEEPER_PIN, HIGH);
799
+      delay(25);
800
+      watchdog_refresh();
801
+      WRITE(BEEPER_PIN, LOW);
802
+      delay(40);
803
+      watchdog_refresh();
804
+      delay(40);
805
+      watchdog_refresh();
799
     }
806
     }
800
     WRITE(BEEPER_PIN, HIGH);
807
     WRITE(BEEPER_PIN, HIGH);
801
   #endif
808
   #endif
820
   }
827
   }
821
 
828
 
822
   disable_all_heaters(); // always disable (even for bogus temp)
829
   disable_all_heaters(); // always disable (even for bogus temp)
830
+  watchdog_refresh();
823
 
831
 
824
   #if BOGUS_TEMPERATURE_GRACE_PERIOD
832
   #if BOGUS_TEMPERATURE_GRACE_PERIOD
825
     const millis_t ms = millis();
833
     const millis_t ms = millis();
923
             }
931
             }
924
           #endif // PID_EXTRUSION_SCALING
932
           #endif // PID_EXTRUSION_SCALING
925
           #if ENABLED(PID_FAN_SCALING)
933
           #if ENABLED(PID_FAN_SCALING)
926
-            if (thermalManager.fan_speed[active_extruder] > PID_FAN_SCALING_MIN_SPEED) {
927
-              work_pid[ee].Kf = PID_PARAM(Kf, ee) + (PID_FAN_SCALING_LIN_FACTOR) * thermalManager.fan_speed[active_extruder];
934
+            if (fan_speed[active_extruder] > PID_FAN_SCALING_MIN_SPEED) {
935
+              work_pid[ee].Kf = PID_PARAM(Kf, ee) + (PID_FAN_SCALING_LIN_FACTOR) * fan_speed[active_extruder];
928
               pid_output += work_pid[ee].Kf;
936
               pid_output += work_pid[ee].Kf;
929
             }
937
             }
930
             //pid_output -= work_pid[ee].Ki;
938
             //pid_output -= work_pid[ee].Ki;
1243
               fan_chamber_pwm += (CHAMBER_FAN_FACTOR) * 2;
1251
               fan_chamber_pwm += (CHAMBER_FAN_FACTOR) * 2;
1244
           #endif
1252
           #endif
1245
           NOMORE(fan_chamber_pwm, 225);
1253
           NOMORE(fan_chamber_pwm, 225);
1246
-          thermalManager.set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
1254
+          set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
1247
         #endif
1255
         #endif
1248
 
1256
 
1249
         #if ENABLED(CHAMBER_VENT)
1257
         #if ENABLED(CHAMBER_VENT)
1274
       else if (!flag_chamber_off) {
1282
       else if (!flag_chamber_off) {
1275
         #if ENABLED(CHAMBER_FAN)
1283
         #if ENABLED(CHAMBER_FAN)
1276
           flag_chamber_off = true;
1284
           flag_chamber_off = true;
1277
-          thermalManager.set_fan_speed(2, 0);
1285
+          set_fan_speed(2, 0);
1278
         #endif
1286
         #endif
1279
         #if ENABLED(CHAMBER_VENT)
1287
         #if ENABLED(CHAMBER_VENT)
1280
           flag_chamber_excess_heat = false;
1288
           flag_chamber_excess_heat = false;
1355
   user_thermistor_t Temperature::user_thermistor[USER_THERMISTORS]; // Initialized by settings.load()
1363
   user_thermistor_t Temperature::user_thermistor[USER_THERMISTORS]; // Initialized by settings.load()
1356
 
1364
 
1357
   void Temperature::reset_user_thermistors() {
1365
   void Temperature::reset_user_thermistors() {
1358
-    user_thermistor_t user_thermistor[USER_THERMISTORS] = {
1366
+    user_thermistor_t default_user_thermistor[USER_THERMISTORS] = {
1359
       #if HEATER_0_USER_THERMISTOR
1367
       #if HEATER_0_USER_THERMISTOR
1360
         { true, 0, 0, HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS, 0, 0, HOTEND0_BETA, 0 },
1368
         { true, 0, 0, HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS, 0, 0, HOTEND0_BETA, 0 },
1361
       #endif
1369
       #endif
1387
         { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 }
1395
         { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 }
1388
       #endif
1396
       #endif
1389
     };
1397
     };
1390
-    COPY(thermalManager.user_thermistor, user_thermistor);
1398
+    COPY(user_thermistor, default_user_thermistor);
1391
   }
1399
   }
1392
 
1400
 
1393
   void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) {
1401
   void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) {
2423
 
2431
 
2424
   #endif // HAS_HOTEND
2432
   #endif // HAS_HOTEND
2425
 
2433
 
2426
-  #if HAS_HEATED_BED
2434
+  #if ENABLED(THERMAL_PROTECTION_BED)
2427
     #if TEMPDIR(BED) < 0
2435
     #if TEMPDIR(BED) < 0
2428
       #define BEDCMP(A,B) ((A)<(B))
2436
       #define BEDCMP(A,B) ((A)<(B))
2429
     #else
2437
     #else
2434
     if (bed_on && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED);
2442
     if (bed_on && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED);
2435
   #endif
2443
   #endif
2436
 
2444
 
2437
-  #if HAS_HEATED_CHAMBER
2445
+  #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER)
2438
     #if TEMPDIR(CHAMBER) < 0
2446
     #if TEMPDIR(CHAMBER) < 0
2439
       #define CHAMBERCMP(A,B) ((A)<(B))
2447
       #define CHAMBERCMP(A,B) ((A)<(B))
2440
     #else
2448
     #else

+ 2
- 2
Marlin/src/module/temperature.h Bestand weergeven

696
 
696
 
697
         static bool wait_for_chamber(const bool no_wait_for_cooling=true);
697
         static bool wait_for_chamber(const bool no_wait_for_cooling=true);
698
       #endif
698
       #endif
699
-    #endif // HAS_TEMP_CHAMBER
699
+    #endif
700
 
700
 
701
     #if WATCH_CHAMBER
701
     #if WATCH_CHAMBER
702
       static void start_watching_chamber();
702
       static void start_watching_chamber();
715
         ;
715
         ;
716
         start_watching_chamber();
716
         start_watching_chamber();
717
       }
717
       }
718
-    #endif // HAS_HEATED_CHAMBER
718
+    #endif
719
 
719
 
720
     /**
720
     /**
721
      * The software PWM power for a heater
721
      * The software PWM power for a heater

Laden…
Annuleren
Opslaan