From 06c03fe2f0947723a9013b636a6751b1a7c5af1a Mon Sep 17 00:00:00 2001 From: stohn Date: Wed, 22 Aug 2012 12:44:41 +0200 Subject: [PATCH] new method for message for making KILLED message visible The cli(); at the start of the kill() function also stops the internal arduino timer which stops updating of millis() which prevents the display of the "KILLED." message. The new function updates the display directly without checking any timers. --- Marlin/Marlin.pde | 2 +- Marlin/ultralcd.h | 3 +++ Marlin/ultralcd.pde | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index d46a5a62f..a7b637b89 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -1734,7 +1734,7 @@ void kill() if(PS_ON_PIN > -1) pinMode(PS_ON_PIN,INPUT); SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_KILLED); - LCD_MESSAGEPGM(MSG_KILLED); + LCD_ALERTMESSAGEPGM(MSG_KILLED); suicide(); while(1); // Wait for reset } diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index dc44d1cda..5cfa6a543 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -140,12 +140,14 @@ #define LCD_INIT lcd_init(); #define LCD_MESSAGE(x) lcd_status(x); #define LCD_MESSAGEPGM(x) lcd_statuspgm(MYPGM(x)); + #define LCD_ALERTMESSAGEPGM(x) lcd_alertstatuspgm(MYPGM(x)); #define LCD_STATUS lcd_status() #else //no lcd #define LCD_INIT #define LCD_STATUS #define LCD_MESSAGE(x) #define LCD_MESSAGEPGM(x) + #define LCD_ALERTMESSAGEPGM(x) FORCE_INLINE void lcd_status() {}; #define CLICKED false @@ -153,6 +155,7 @@ #endif void lcd_statuspgm(const char* message); +void lcd_alertstatuspgm(const char* message); char *ftostr3(const float &x); char *itostr2(const uint8_t &x); diff --git a/Marlin/ultralcd.pde b/Marlin/ultralcd.pde index 5663dda80..becdf4677 100644 --- a/Marlin/ultralcd.pde +++ b/Marlin/ultralcd.pde @@ -92,6 +92,12 @@ void lcd_statuspgm(const char* message) *target=0; } +void lcd_alertstatuspgm(const char* message) +{ + lcd_statuspgm(message); + menu.showStatus(); +} + FORCE_INLINE void clear() { lcd.clear();