Procházet zdrojové kódy

Display "POWER PANIC DETECTED" when possible

Both during early init and in uvlo_tiny, display "POWER PANIC DETECTED"
if enough charge is left.

This is not worth doing in regular uvlo_, as we want to give full
priority to the X motor
Yuri D'Elia před 4 roky
rodič
revize
02d1525445
3 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 2 0
      Firmware/Marlin_main.cpp
  2. 1 0
      Firmware/messages.c
  3. 1 0
      Firmware/messages.h

+ 2 - 0
Firmware/Marlin_main.cpp

@@ -10485,6 +10485,8 @@ void uvlo_drain_reset()
     // burn all that residual power
     wdt_enable(WDTO_1S);
     WRITE(BEEPER,HIGH);
+    lcd_clear();
+    lcd_puts_at_P(0, 1, MSG_POWERPANIC_DETECTED);
     while(1);
 }
 

+ 1 - 0
Firmware/messages.c

@@ -171,3 +171,4 @@ const char MSG_M112_KILL[] PROGMEM_N1 = "M112 called. Emergency Stop."; ////c=20
 #ifdef LA_LIVE_K
 const char MSG_ADVANCE_K[] PROGMEM_N1 = "Advance K:"; ////c=13
 #endif
+const char MSG_POWERPANIC_DETECTED[] PROGMEM_N1 = "POWER PANIC DETECTED"; ////c=20

+ 1 - 0
Firmware/messages.h

@@ -170,6 +170,7 @@ extern const char MSG_FANCHECK_EXTRUDER[];
 extern const char MSG_FANCHECK_PRINT[];
 extern const char MSG_M112_KILL[];
 extern const char MSG_ADVANCE_K[];
+extern const char MSG_POWERPANIC_DETECTED[];
 
 #if defined(__cplusplus)
 }