diff options
Diffstat (limited to 'apps/plugins/battery_bench.c')
-rw-r--r-- | apps/plugins/battery_bench.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 37046af05b..3f9ecbc2b4 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -329,9 +329,7 @@ static bool exit_tsr(bool reenter) | |||
329 | rb->lcd_clear_display(); | 329 | rb->lcd_clear_display(); |
330 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); | 330 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); |
331 | rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); | 331 | rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); |
332 | #ifdef HAVE_LCD_BITMAP | ||
333 | rb->lcd_puts_scroll(0, 2, "Anything else will resume"); | 332 | rb->lcd_puts_scroll(0, 2, "Anything else will resume"); |
334 | #endif | ||
335 | if(rb->global_settings->talk_menu) | 333 | if(rb->global_settings->talk_menu) |
336 | rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); | 334 | rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); |
337 | rb->lcd_update(); | 335 | rb->lcd_update(); |
@@ -488,11 +486,7 @@ static void thread(void) | |||
488 | exit = true; | 486 | exit = true; |
489 | break; | 487 | break; |
490 | case EV_EXIT: | 488 | case EV_EXIT: |
491 | #ifdef HAVE_LCD_BITMAP | ||
492 | rb->splash(HZ, "Exiting battery_bench..."); | 489 | rb->splash(HZ, "Exiting battery_bench..."); |
493 | #else | ||
494 | rb->splash(HZ, "bench exit"); | ||
495 | #endif | ||
496 | exit_reason = "plugin exit"; | 490 | exit_reason = "plugin exit"; |
497 | exit = true; | 491 | exit = true; |
498 | break; | 492 | break; |
@@ -516,7 +510,6 @@ static void thread(void) | |||
516 | } | 510 | } |
517 | 511 | ||
518 | 512 | ||
519 | #ifdef HAVE_LCD_BITMAP | ||
520 | typedef void (*plcdfunc)(int x, int y, const unsigned char *str); | 513 | typedef void (*plcdfunc)(int x, int y, const unsigned char *str); |
521 | 514 | ||
522 | static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line) | 515 | static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line) |
@@ -525,7 +518,6 @@ static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, in | |||
525 | rb->lcd_getstringsize(str, &strwdt, &strhgt); | 518 | rb->lcd_getstringsize(str, &strwdt, &strhgt); |
526 | putsxy((lcd_width - strwdt)/2, line*(strhgt), str); | 519 | putsxy((lcd_width - strwdt)/2, line*(strhgt), str); |
527 | } | 520 | } |
528 | #endif | ||
529 | 521 | ||
530 | enum plugin_status plugin_start(const void* parameter) | 522 | enum plugin_status plugin_start(const void* parameter) |
531 | { | 523 | { |
@@ -533,27 +525,20 @@ enum plugin_status plugin_start(const void* parameter) | |||
533 | int button, fd; | 525 | int button, fd; |
534 | bool on = false; | 526 | bool on = false; |
535 | start_tick = *rb->current_tick; | 527 | start_tick = *rb->current_tick; |
536 | #ifdef HAVE_LCD_BITMAP | ||
537 | int i; | 528 | int i; |
538 | const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, | 529 | const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, |
539 | "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; | 530 | "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; |
540 | #endif | ||
541 | rb->lcd_clear_display(); | 531 | rb->lcd_clear_display(); |
542 | 532 | ||
543 | #ifdef HAVE_LCD_BITMAP | ||
544 | rb->lcd_clear_display(); | 533 | rb->lcd_clear_display(); |
545 | rb->lcd_setfont(FONT_SYSFIXED); | 534 | rb->lcd_setfont(FONT_SYSFIXED); |
546 | 535 | ||
547 | for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) | 536 | for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) |
548 | put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); | 537 | put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); |
549 | #else | ||
550 | rb->lcd_puts_scroll(0, 0, "Batt.Bench."); | ||
551 | rb->lcd_puts_scroll(0, 1, "PLAY/STOP"); | ||
552 | #endif | ||
553 | if(rb->global_settings->talk_menu) | 538 | if(rb->global_settings->talk_menu) |
554 | rb->talk_id(VOICE_BAT_BENCH_KEYS, true); | 539 | rb->talk_id(VOICE_BAT_BENCH_KEYS, true); |
555 | rb->lcd_update(); | 540 | rb->lcd_update(); |
556 | 541 | ||
557 | #ifdef HAVE_REMOTE_LCD | 542 | #ifdef HAVE_REMOTE_LCD |
558 | rb->lcd_remote_clear_display(); | 543 | rb->lcd_remote_clear_display(); |
559 | put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); | 544 | put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); |