Voice timer countdown fix (#362)

* Fix mapping of 2 bit signed countdownStart value to seconds

value -2 - 5 seconds
value -1 - 10 seconds
value 0 - 20 seconds
value 1 - 30 seconds
This commit is contained in:
Risto
2021-06-28 09:03:12 +02:00
committed by GitHub
parent 79eee634fd
commit 129866488d
+1 -1
View File
@@ -222,7 +222,7 @@ enum SwashType {
#define IS_MANUAL_RESET_TIMER(idx) (g_model.timers[idx].persistent == 2)
#if !defined(PCBSKY9X)
#define TIMER_COUNTDOWN_START(x) (g_model.timers[x].countdownStart > 0 ? 5 : 10 - g_model.timers[x].countdownStart * 10)
#define TIMER_COUNTDOWN_START(x) (g_model.timers[x].countdownStart == 0 ? 20 : (g_model.timers[x].countdownStart == 1 ? 30 : (g_model.timers[x].countdownStart == -1 ? 10 : 5)))
#else
#define TIMER_COUNTDOWN_START(x) 10
#endif