Timer3 added in sources

This commit is contained in:
bsongis
2014-08-16 11:37:59 +02:00
parent 7714c5779f
commit 5cbfcc45a4
24 changed files with 410 additions and 89 deletions
+1 -1
View File
@@ -5141,7 +5141,7 @@ void menuModelCustomFunctions(uint8_t event)
#endif
#if defined(CPUARM)
else if (func == FUNC_SET_TIMER) {
maxParam = 1;
maxParam = MAX_TIMERS-1;
putsStrIdx(lcdNextPos, y, STR_TIMER, CFN_TIMER_INDEX(sd)+1, attr);
if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_TIMER_INDEX(sd), maxParam);
break;
+4
View File
@@ -487,6 +487,9 @@ void onMainViewMenu(const char *result)
timerReset(1);
}
#if defined(CPUARM)
else if (result == STR_RESET_TIMER3) {
timerReset(2);
}
else if (result == STR_VIEW_NOTES) {
pushModelNotes();
}
@@ -494,6 +497,7 @@ void onMainViewMenu(const char *result)
MENU_ADD_ITEM(STR_RESET_FLIGHT);
MENU_ADD_ITEM(STR_RESET_TIMER1);
MENU_ADD_ITEM(STR_RESET_TIMER2);
MENU_ADD_ITEM(STR_RESET_TIMER3);
#if defined(FRSKY)
MENU_ADD_ITEM(STR_RESET_TELEMETRY);
#endif
+10 -2
View File
@@ -300,7 +300,7 @@ bool displayGaugesTelemetryScreen(FrSkyScreenData & screen)
#endif
getvalue_t threshold = 0;
uint8_t thresholdX = 0;
if (source <= TELEM_TIMER2)
if (source <= TELEM_TIMER_MAX)
threshold = 0;
else if (source <= TELEM_RSSI_RX)
threshold = getRssiAlarmValue(source-TELEM_RSSI_TX);
@@ -399,10 +399,18 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
#endif
putsTelemetryChannel(pos[j+1]-2, FH+2*FH*i, field-1, value, att);
if (field >= TELEM_TIMER1 && field <= TELEM_TIMER2 && i!=3) {
#if defined(CPUARM)
if (field >= TELEM_TIMER1 && field <= TELEM_TIMER_MAX && i!=3) {
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
putsStrIdx(pos[j], 1+FH+2*FH*i, "T", field-TELEM_TIMER1+1, 0);
}
else
#else
if (field >= TELEM_TIMER1 && field <= TELEM_TIMER_MAX && i!=3) {
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
field = field-TELEM_TIMER1+TELEM_T1;
}
#endif
lcd_putsiAtt(pos[j], 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0);
}
}