[All] Code refactoring
- keys beep and haptic refactoring (not anymore audio events) - trims move/mid/min/max refactoring (trim end splitted to trim min / trim max) - S6R new alarms - S6R servos/rx status displayed as a text (not an integer which has no sense) - Timer countdown configuration - The splash was not displayed (but the timeout was there) after the first calibration
This commit is contained in:
+3
-14
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
@@ -153,7 +153,7 @@ void evalTimers(int16_t throttle, uint8_t tick10ms)
|
||||
switch (timerState->state) {
|
||||
case TMR_RUNNING:
|
||||
if (timerStart && newTimerVal>=(tmrval_t)timerStart) {
|
||||
AUDIO_TIMER_00(g_model.timers[i].countdownBeep);
|
||||
AUDIO_TIMER_ELAPSED(i);
|
||||
timerState->state = TMR_NEGATIVE;
|
||||
// TRACE("Timer[%d] negative", i);
|
||||
}
|
||||
@@ -172,18 +172,7 @@ void evalTimers(int16_t throttle, uint8_t tick10ms)
|
||||
timerState->val = newTimerVal;
|
||||
if (timerState->state == TMR_RUNNING) {
|
||||
if (g_model.timers[i].countdownBeep && g_model.timers[i].start) {
|
||||
if (newTimerVal == 30) {
|
||||
AUDIO_TIMER_30();
|
||||
// TRACE("Timer[%d] 30s announcement", i);
|
||||
}
|
||||
if (newTimerVal == 20) {
|
||||
AUDIO_TIMER_20();
|
||||
// TRACE("Timer[%d] 20s announcement", i);
|
||||
}
|
||||
if (newTimerVal <= 10) {
|
||||
AUDIO_TIMER_LT10(g_model.timers[i].countdownBeep, newTimerVal);
|
||||
// TRACE("Timer[%d] %ds announcement", i, newTimerVal);
|
||||
}
|
||||
AUDIO_TIMER_COUNTDOWN(i, newTimerVal);
|
||||
}
|
||||
if (g_model.timers[i].minuteBeep && (newTimerVal % 60)==0) {
|
||||
AUDIO_TIMER_MINUTE(newTimerVal);
|
||||
|
||||
Reference in New Issue
Block a user