summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 7d1e1c18cf..e21d203f7a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1484,91 +1484,6 @@ static bool view_battery(void)
1484#endif /* HAVE_LCD_BITMAP */ 1484#endif /* HAVE_LCD_BITMAP */
1485#endif 1485#endif
1486 1486
1487static bool view_runtime(void)
1488{
1489 char s[32];
1490 bool done = false;
1491 int state = 1;
1492
1493 while(!done)
1494 {
1495 int y=0;
1496 int t;
1497 int key;
1498 lcd_clear_display();
1499#ifdef HAVE_LCD_BITMAP
1500 lcd_puts(0, y++, "Running time:");
1501 y++;
1502#endif
1503
1504 if (state & 1) {
1505#ifdef CONFIG_CHARGING
1506 if (charger_inserted()
1507#ifdef HAVE_USB_POWER
1508 || usb_powered()
1509#endif
1510 )
1511 {
1512 global_settings.runtime = 0;
1513 }
1514 else
1515#endif
1516 {
1517 global_settings.runtime += ((current_tick - lasttime) / HZ);
1518 }
1519 lasttime = current_tick;
1520
1521 t = global_settings.runtime;
1522 lcd_puts(0, y++, "Current time");
1523 }
1524 else {
1525 t = global_settings.topruntime;
1526 lcd_puts(0, y++, "Top time");
1527 }
1528
1529 snprintf(s, sizeof(s), "%dh %dm %ds",
1530 t / 3600, (t % 3600) / 60, t % 60);
1531 lcd_puts(0, y++, s);
1532 lcd_update();
1533
1534 /* Wait for a key to be pushed */
1535 key = get_action(CONTEXT_SETTINGS,HZ);
1536 switch(key) {
1537 case ACTION_STD_CANCEL:
1538 done = true;
1539 break;
1540
1541 case ACTION_SETTINGS_INC:
1542 case ACTION_SETTINGS_DEC:
1543 if (state == 1)
1544 state = 2;
1545 else
1546 state = 1;
1547 break;
1548
1549 case ACTION_STD_OK:
1550 lcd_clear_display();
1551 /*NOTE: this needs to be changed to sync splash! */
1552 lcd_puts(0,0,"Clear time?");
1553 lcd_puts(0,1,"PLAY = Yes");
1554 lcd_update();
1555 while (1) {
1556 key = get_action(CONTEXT_STD,TIMEOUT_BLOCK);
1557 if ( key == ACTION_STD_OK ) {
1558 if ( state == 1 )
1559 global_settings.runtime = 0;
1560 else
1561 global_settings.topruntime = 0;
1562 break;
1563 }
1564 }
1565 break;
1566 }
1567 }
1568 action_signalscreenchange();
1569 return false;
1570}
1571
1572#ifndef SIMULATOR 1487#ifndef SIMULATOR
1573#ifdef HAVE_MMC 1488#ifdef HAVE_MMC
1574static bool dbg_mmc_info(void) 1489static bool dbg_mmc_info(void)
@@ -2192,7 +2107,6 @@ bool debug_menu(void)
2192 { "pm histogram", peak_meter_histogram}, 2107 { "pm histogram", peak_meter_histogram},
2193#endif /* PM_DEBUG */ 2108#endif /* PM_DEBUG */
2194#endif /* HAVE_LCD_BITMAP */ 2109#endif /* HAVE_LCD_BITMAP */
2195 { "View runtime", view_runtime },
2196#ifndef SIMULATOR 2110#ifndef SIMULATOR
2197#ifdef CONFIG_TUNER 2111#ifdef CONFIG_TUNER
2198 { "FM Radio", dbg_fm_radio }, 2112 { "FM Radio", dbg_fm_radio },