feat: Timer Voice & Haptic option, show elapsed speak time value when countdown (#2711)

* fix "odd" elapsed time announcement

* announce elapsed seconds

* Add support for "Beeps and Haptic" and "Voice and Haptic" for timer countdown.
This commit is contained in:
eshifri
2023-01-23 20:00:12 +10:00
committed by GitHub
parent 0b8e4c6003
commit 8e8e78671a
45 changed files with 243 additions and 136 deletions
+3 -3
View File
@@ -166,9 +166,9 @@ void evalTimers(int16_t throttle, uint8_t tick10ms)
if (g_model.timers[i].countdownBeep && g_model.timers[i].start) {
AUDIO_TIMER_COUNTDOWN(i, newTimerVal);
}
if (g_model.timers[i].minuteBeep && (newTimerVal % 60) == 0) {
tmrval_t announceVal = newTimerVal;
if (showElapsed) announceVal = timerStart - newTimerVal;
tmrval_t announceVal = newTimerVal;
if (showElapsed) announceVal = timerStart - newTimerVal;
if (g_model.timers[i].minuteBeep && (announceVal % 60) == 0) {
AUDIO_TIMER_MINUTE(announceVal);
// TRACE("Timer[%d] %d minute announcement", i, newTimerVal/60);
}