aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster/fsm-wdt.c')
-rw-r--r--spaghetti-monster/fsm-wdt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-wdt.c b/spaghetti-monster/fsm-wdt.c
index 0c49a75..e9dca3a 100644
--- a/spaghetti-monster/fsm-wdt.c
+++ b/spaghetti-monster/fsm-wdt.c
@@ -181,9 +181,11 @@ void WDT_inner() {
// start a new ADC measurement every 4 ticks
adc_trigger ++;
if (0 == (adc_trigger & 3)) {
+ // in case we're in standby mode and auto-retrigger is turned off
ADC_start_measurement();
- irq_adc_stable = 0;
- adcint_enable = 1;
+ adc_sample_count = 0;
+ // allow regulation logic to run
+ adc_deferred_enable = 1;
}
#endif
}