|
@@ -201,26 +201,20 @@ char lcd_print(char c) {
|
201
|
201
|
}
|
202
|
202
|
|
203
|
203
|
char lcd_print(const char* str) {
|
204
|
|
- char c;
|
205
|
204
|
int i = 0;
|
206
|
|
- char n = 0;
|
207
|
|
- while ((c = str[i++])) {
|
208
|
|
- n += lcd_print(c);
|
209
|
|
- }
|
|
205
|
+ char c, n = 0;
|
|
206
|
+ while ((c = str[i++])) n += lcd_print(c);
|
210
|
207
|
return n;
|
211
|
208
|
}
|
212
|
209
|
|
213
|
|
-/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
|
|
210
|
+// Needed for Arduino < 1.0.0
|
214
|
211
|
char lcd_printPGM(const char* str) {
|
215
|
|
- char c;
|
216
|
|
- char n = 0;
|
217
|
|
- while ((c = pgm_read_byte(str++))) {
|
218
|
|
- n += lcd_print(c);
|
219
|
|
- }
|
|
212
|
+ char c, n = 0;
|
|
213
|
+ while ((c = pgm_read_byte(str++))) n += lcd_print(c);
|
220
|
214
|
return n;
|
221
|
215
|
}
|
222
|
216
|
|
223
|
|
-/* Warning: This function is called from interrupt context */
|
|
217
|
+// Initialize or re-initializw the LCD
|
224
|
218
|
static void lcd_implementation_init() {
|
225
|
219
|
|
226
|
220
|
#if defined(LCD_PIN_BL) && LCD_PIN_BL > -1 // Enable LCD backlight
|
|
@@ -291,6 +285,7 @@ static void lcd_implementation_init() {
|
291
|
285
|
#endif // SHOW_BOOTSCREEN
|
292
|
286
|
}
|
293
|
287
|
|
|
288
|
+// The kill screen is displayed for unrecoverable conditions
|
294
|
289
|
void lcd_kill_screen() {
|
295
|
290
|
lcd_setFont(FONT_MENU);
|
296
|
291
|
u8g.setPrintPos(0, u8g.getHeight()/4*1);
|