From 8e6c1074e5a51b8dc43055835e77723c17960027 Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 9 Feb 2013 22:57:33 +0000 Subject: [PATCH] Battery alarm timings --- src/open9x.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/open9x.cpp b/src/open9x.cpp index 7ae480c92..93d5f1e76 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -3044,9 +3044,19 @@ void perMain() s_batSum = 0; s_batCheck = 0; } +#if defined(VOICE) + else if (!(s_batCheck & 0x3f)) { +#else else if (s_batCheck == 0) { +#endif g_vbat100mV = s_batSum / 8; s_batSum = 0; +#if defined(VOICE) + if (s_batCheck != 0) { + // no alarms + } + else +#endif if (g_vbat100mV <= g_eeGeneral.vBatWarn && g_vbat100mV>50) { AUDIO_TX_BATTERY_LOW(); }