diff options
Diffstat (limited to 'apps/screens.c')
-rw-r--r-- | apps/screens.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/screens.c b/apps/screens.c index df1d59109b..f6def2fd89 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -254,12 +254,12 @@ static void charging_display_info(bool animate) | |||
254 | } | 254 | } |
255 | #else /* not HAVE_LCD_BITMAP */ | 255 | #else /* not HAVE_LCD_BITMAP */ |
256 | 256 | ||
257 | static unsigned char logo_chars[5]; | 257 | static unsigned long logo_chars[4]; |
258 | static const unsigned char logo_pattern[] = { | 258 | static const unsigned char logo_pattern[] = { |
259 | 0x07, 0x04, 0x1c, 0x14, 0x1c, 0x04, 0x07, /* char 1 */ | 259 | 0x07, 0x04, 0x1c, 0x14, 0x1c, 0x04, 0x07, 0, /* char 1 */ |
260 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, /* char 2 */ | 260 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0, /* char 2 */ |
261 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, /* char 3 */ | 261 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0, /* char 3 */ |
262 | 0x1f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1f, /* char 4 */ | 262 | 0x1f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1f, 0, /* char 4 */ |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static void logo_lock_patterns(bool on) | 265 | static void logo_lock_patterns(bool on) |
@@ -270,7 +270,6 @@ static void logo_lock_patterns(bool on) | |||
270 | { | 270 | { |
271 | for (i = 0; i < 4; i++) | 271 | for (i = 0; i < 4; i++) |
272 | logo_chars[i] = lcd_get_locked_pattern(); | 272 | logo_chars[i] = lcd_get_locked_pattern(); |
273 | logo_chars[4] = '\0'; | ||
274 | } | 273 | } |
275 | else | 274 | else |
276 | { | 275 | { |
@@ -284,19 +283,20 @@ static void charging_display_info(bool animate) | |||
284 | int battv; | 283 | int battv; |
285 | unsigned i, ypos; | 284 | unsigned i, ypos; |
286 | static unsigned phase = 3; | 285 | static unsigned phase = 3; |
287 | char buf[28]; | 286 | char buf[32]; |
288 | 287 | ||
289 | battv = battery_voltage(); | 288 | battv = battery_voltage(); |
290 | snprintf(buf, sizeof(buf), "%s %d.%02dV", logo_chars, | 289 | snprintf(buf, sizeof(buf), " %d.%02dV", battv / 100, battv % 100); |
291 | battv / 100, battv % 100); | 290 | lcd_puts(4, 1, buf); |
292 | lcd_puts(0, 1, buf); | ||
293 | 291 | ||
294 | memcpy(buf, logo_pattern, 28); /* copy logo patterns */ | 292 | memcpy(buf, logo_pattern, 32); /* copy logo patterns */ |
295 | 293 | ||
296 | if (!animate) /* build the screen */ | 294 | if (!animate) /* build the screen */ |
297 | { | 295 | { |
298 | lcd_double_height(false); | 296 | lcd_double_height(false); |
299 | lcd_puts(0, 0, "[Charging]"); | 297 | lcd_puts(0, 0, "[Charging]"); |
298 | for (i = 0; i < 4; i++) | ||
299 | lcd_putc(i, 1, logo_chars[i]); | ||
300 | } | 300 | } |
301 | else /* animate the logo */ | 301 | else /* animate the logo */ |
302 | { | 302 | { |
@@ -307,14 +307,14 @@ static void charging_display_info(bool animate) | |||
307 | ypos = (phase + i/5) % 9; /* "bounce" effect */ | 307 | ypos = (phase + i/5) % 9; /* "bounce" effect */ |
308 | if (ypos > 4) | 308 | if (ypos > 4) |
309 | ypos = 8 - ypos; | 309 | ypos = 8 - ypos; |
310 | buf[5 - ypos + 7 * (i/5)] |= 0x10 >> (i%5); | 310 | buf[5 - ypos + 8 * (i/5)] |= 0x10 >> (i%5); |
311 | } | 311 | } |
312 | } | 312 | } |
313 | phase++; | 313 | phase++; |
314 | } | 314 | } |
315 | 315 | ||
316 | for (i = 0; i < 4; i++) | 316 | for (i = 0; i < 4; i++) |
317 | lcd_define_pattern(logo_chars[i], buf + 7 * i); | 317 | lcd_define_pattern(logo_chars[i], buf + 8 * i); |
318 | } | 318 | } |
319 | #endif /* (not) HAVE_LCD_BITMAP */ | 319 | #endif /* (not) HAVE_LCD_BITMAP */ |
320 | 320 | ||