feat: Allow the timer count direction to be selected (#2038)

* timer direction: ellapsed or left

* Add AUDIO announcement support

* Storage for showElapsed

* Translations

* Fix storage

* BW implementation

* Different BW implementation

* Companion support

* Color LCD implementation and rebase to lvgl

* Fix problems found by raphaelcoeffic

* chore: Regenerate the YAML files properly

* fix: Remove unused `TR_SHOW` remnant

* chore: Formatting and cleanup

* fix: Timer dir choice was shown in wrong place
Wrong newline used in ce23b50

* Fix cpn ui triggers, remove unnecessary code and some formatting

* fix(colorlcd): Hide timer dir opt if zero value

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
eshifri
2022-08-03 09:22:42 +10:00
committed by GitHub
co-authored by Peter Feerick elecpower
parent 415b566a79
commit be7a6a51ab
50 changed files with 286 additions and 85 deletions
+4 -1
View File
@@ -77,6 +77,7 @@ void evalTimers(int16_t throttle, uint8_t tick10ms)
tmrstart_t timerStart = g_model.timers[i].start;
int16_t timerSwtch = g_model.timers[i].swtch;
TimerState * timerState = &timersStates[i];
uint32_t showElapsed = g_model.timers[i].showElapsed;
if (timerMode) {
if ((timerState->state == TMR_OFF)
@@ -166,7 +167,9 @@ void evalTimers(int16_t throttle, uint8_t tick10ms)
AUDIO_TIMER_COUNTDOWN(i, newTimerVal);
}
if (g_model.timers[i].minuteBeep && (newTimerVal % 60) == 0) {
AUDIO_TIMER_MINUTE(newTimerVal);
tmrval_t announceVal = newTimerVal;
if (showElapsed) announceVal = timerStart - newTimerVal;
AUDIO_TIMER_MINUTE(announceVal);
// TRACE("Timer[%d] %d minute announcement", i, newTimerVal/60);
}
}