diff options
| author | Selene ToyKeeper | 2020-01-29 05:08:14 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-01-29 05:08:14 -0700 |
| commit | 9c0d1832464e4ee7ee8c4c63092ac4337347483b (patch) | |
| tree | 67eb820b425e7a5e019e7158dda30ebab5e1bbe8 /spaghetti-monster/fsm-standby.c | |
| parent | fixed too-slow thermal response (was introduced in the irq-refactor branch) (diff) | |
| download | anduril-9c0d1832464e4ee7ee8c4c63092ac4337347483b.tar.gz anduril-9c0d1832464e4ee7ee8c4c63092ac4337347483b.tar.bz2 anduril-9c0d1832464e4ee7ee8c4c63092ac4337347483b.zip | |
rewrote ADC code to use a continuous lowpass system on all measurements, to eliminate noise and maybe increase precision
(thermal code still needs to be rewritten though)
Diffstat (limited to 'spaghetti-monster/fsm-standby.c')
| -rw-r--r-- | spaghetti-monster/fsm-standby.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c index 9398f52..14b6df1 100644 --- a/spaghetti-monster/fsm-standby.c +++ b/spaghetti-monster/fsm-standby.c @@ -73,8 +73,8 @@ void sleep_until_eswitch_pressed() go_to_standby = 0; } if (irq_adc) { // ADC done measuring - adcint_enable = 1; - ADC_inner(); + adc_deferred_enable = 1; + adc_deferred(); //ADC_off(); // takes care of itself //irq_adc = 0; // takes care of itself } @@ -87,6 +87,10 @@ void sleep_until_eswitch_pressed() #ifdef USE_THERMAL_REGULATION // forget what the temperature was last time we were on reset_thermal_history = 1; + // FIXME: not sure if this should be here + // (the intent is to make sure temperature gets measured before + // thermal logic gets executed) + //set_admux_therm(); #endif // go back to normal running mode |
