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.
This commit is contained in:
parent
31873ec707
commit
06c03fe2f0
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user