diff options
| author | Selene ToyKeeper | 2020-09-14 03:15:50 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-09-14 03:15:50 -0600 |
| commit | b8fd5ee8cc6a04a2c214f80c51269a68802309d8 (patch) | |
| tree | 34d8006cf13d977b5726554d421089e8dd7aeede /spaghetti-monster/fsm-standby.c | |
| parent | reorganized code in fsm-events.* to put things in a more coherent order (diff) | |
| parent | steps.py: fixed python3 floating-point error (diff) | |
| download | anduril-b8fd5ee8cc6a04a2c214f80c51269a68802309d8.tar.gz anduril-b8fd5ee8cc6a04a2c214f80c51269a68802309d8.tar.bz2 anduril-b8fd5ee8cc6a04a2c214f80c51269a68802309d8.zip | |
merged upstream fsm branch to get fix for laggy voltage readings on FW3A
(and other build targets which don't use sleep ticks during standby)
Diffstat (limited to 'spaghetti-monster/fsm-standby.c')
| -rw-r--r-- | spaghetti-monster/fsm-standby.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c index b002b91..c450bca 100644 --- a/spaghetti-monster/fsm-standby.c +++ b/spaghetti-monster/fsm-standby.c @@ -73,6 +73,7 @@ void sleep_until_eswitch_pressed() go_to_standby = 0; } if (irq_adc) { // ADC done measuring + adc_reset = 1; // don't lowpass while asleep adc_deferred_enable = 1; adc_deferred(); //ADC_off(); // takes care of itself @@ -84,10 +85,9 @@ void sleep_until_eswitch_pressed() } #endif - #ifdef USE_THERMAL_REGULATION - // forget what the temperature was last time we were on - reset_thermal_history = 1; - #endif + // don't lowpass immediately after waking + // also, reset thermal history + adc_reset = 2; // go back to normal running mode // PCINT not needed any more, and can cause problems if on |
