Browse Source

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 years ago
parent
commit
06c03fe2f0
3 changed files with 10 additions and 1 deletions
  1. 1
    1
      Marlin/Marlin.pde
  2. 3
    0
      Marlin/ultralcd.h
  3. 6
    0
      Marlin/ultralcd.pde

+ 1
- 1
Marlin/Marlin.pde View File

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

+ 3
- 0
Marlin/ultralcd.h View File

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

+ 6
- 0
Marlin/ultralcd.pde View File

92
   *target=0;
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
 FORCE_INLINE void clear()
101
 FORCE_INLINE void clear()
96
 {
102
 {
97
   lcd.clear();
103
   lcd.clear();

Loading…
Cancel
Save