From 3c5a07628603d9148253c97e1f1085d202b63206 Mon Sep 17 00:00:00 2001 From: Jamorham Date: Tue, 22 Sep 2015 16:21:23 +0100 Subject: [PATCH] Battery voltage measurement fails after sleep. Restore ADC function after sleep to fix --- apps/dexdrip/dexdrip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dexdrip/dexdrip.c b/apps/dexdrip/dexdrip.c index ec5a315..bef1444 100644 --- a/apps/dexdrip/dexdrip.c +++ b/apps/dexdrip/dexdrip.c @@ -60,6 +60,7 @@ radio_channel: See description in radio_link.h. static XDATA volatile int start_channel = 0; uint32 XDATA asciiToDexcomSrc(char *addr); uint32 XDATA getSrcValue(char srcVal); +void setADCInputs(); volatile uint32 dex_tx_id; #define NUM_CHANNELS (4) static int8 fOffset[NUM_CHANNELS] = {0xCE,0xD5,0xE6,0xE5}; @@ -368,6 +369,7 @@ void goToSleep (uint32 seconds) { } } makeAllOutputs(); + setADCInputs(); } void putchar(char c) {