[Taranis] Add cumulative usage timer in Statistics view, reset with MENU LONG

This commit is contained in:
Andre Bernet
2013-11-30 11:40:59 +01:00
parent aee3a1c25e
commit 0c0f559f75
2 changed files with 13 additions and 2 deletions
+9 -2
View File
@@ -46,7 +46,11 @@ void menuStatisticsView(uint8_t event)
case EVT_KEY_FIRST(KEY_UP):
chainMenu(menuStatisticsDebug);
return;
case EVT_KEY_FIRST(KEY_DOWN):
#endif
#if defined(PCBTARANIS)
case EVT_KEY_LONG(KEY_MENU):
g_eeGeneral.globalTimer = 0;
break;
#endif
case EVT_KEY_FIRST(KEY_EXIT):
chainMenu(menuMainView);
@@ -63,6 +67,10 @@ void menuStatisticsView(uint8_t event)
lcd_puts( 17*FW, FH*0, STR_TOT);
putsTime( 12*FW+5*FWNUM+1, FH*0, s_timeCumTot, 0, 0);
#if defined(PCBTARANIS)
putsTime(21*FW+5*FWNUM+1, 0*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
#endif
#if defined(THRTRACE)
uint8_t traceRd = (s_traceCnt < 0 ? s_traceWr : 0);
@@ -119,7 +127,6 @@ void menuStatisticsDebug(uint8_t event)
case EVT_KEY_FIRST(KEY_DOWN):
chainMenu(menuStatisticsView);
return;
case EVT_KEY_FIRST(KEY_UP):
case EVT_KEY_FIRST(KEY_EXIT):
chainMenu(menuMainView);
return;
+4
View File
@@ -4238,6 +4238,10 @@ void perMain()
}
#endif
#if defined(PCBTARANIS)
sessionTimer = s_timeCumTot;
#endif
#if defined(CPUARM)
if (currentSpeakerVolume != requiredSpeakerVolume) {
currentSpeakerVolume = requiredSpeakerVolume;