Sfoglia il codice sorgente

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.
stohn 11 anni fa
parent
commit
06c03fe2f0
3 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 1
    1
      Marlin/Marlin.pde
  2. 3
    0
      Marlin/ultralcd.h
  3. 6
    0
      Marlin/ultralcd.pde

+ 1
- 1
Marlin/Marlin.pde Vedi File

@@ -1734,7 +1734,7 @@ void kill()
1734 1734
   if(PS_ON_PIN > -1) pinMode(PS_ON_PIN,INPUT);
1735 1735
   SERIAL_ERROR_START;
1736 1736
   SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
1737
-  LCD_MESSAGEPGM(MSG_KILLED);
1737
+  LCD_ALERTMESSAGEPGM(MSG_KILLED);
1738 1738
   suicide();
1739 1739
   while(1); // Wait for reset
1740 1740
 }

+ 3
- 0
Marlin/ultralcd.h Vedi File

@@ -140,12 +140,14 @@
140 140
   #define LCD_INIT lcd_init();
141 141
   #define LCD_MESSAGE(x) lcd_status(x);
142 142
   #define LCD_MESSAGEPGM(x) lcd_statuspgm(MYPGM(x));
143
+  #define LCD_ALERTMESSAGEPGM(x) lcd_alertstatuspgm(MYPGM(x));
143 144
   #define LCD_STATUS lcd_status()
144 145
 #else //no lcd
145 146
   #define LCD_INIT
146 147
   #define LCD_STATUS
147 148
   #define LCD_MESSAGE(x)
148 149
   #define LCD_MESSAGEPGM(x)
150
+  #define LCD_ALERTMESSAGEPGM(x)
149 151
   FORCE_INLINE void lcd_status() {};
150 152
 
151 153
   #define CLICKED false
@@ -153,6 +155,7 @@
153 155
 #endif 
154 156
   
155 157
 void lcd_statuspgm(const char* message);
158
+void lcd_alertstatuspgm(const char* message);
156 159
   
157 160
 char *ftostr3(const float &x);
158 161
 char *itostr2(const uint8_t &x);

+ 6
- 0
Marlin/ultralcd.pde Vedi File

@@ -92,6 +92,12 @@ void lcd_statuspgm(const char* message)
92 92
   *target=0;
93 93
 }
94 94
 
95
+void lcd_alertstatuspgm(const char* message)
96
+{
97
+  lcd_statuspgm(message); 
98
+  menu.showStatus(); 
99
+}
100
+
95 101
 FORCE_INLINE void clear()
96 102
 {
97 103
   lcd.clear();

Loading…
Annulla
Salva