aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-wdt.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-02-28 02:06:53 -0700
committerSelene ToyKeeper2020-02-28 02:06:53 -0700
commit930752b496ad8a1d9f3db96184839022c16a5c7f (patch)
tree840ff47b53f38ba422bbf2367ee8c3c93c3de1b6 /spaghetti-monster/fsm-wdt.c
parentbrute force method for reducing ADC noise -- average a ridiculous number of s... (diff)
downloadanduril-930752b496ad8a1d9f3db96184839022c16a5c7f.tar.gz
anduril-930752b496ad8a1d9f3db96184839022c16a5c7f.tar.bz2
anduril-930752b496ad8a1d9f3db96184839022c16a5c7f.zip
went back to continuous lowpass because it had the best noise reduction
(also, now treating smoothed ADC values as 11-bit, with the lowest 5 bits chopped off to eliminate noise)
Diffstat (limited to 'spaghetti-monster/fsm-wdt.c')
-rw-r--r--spaghetti-monster/fsm-wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-wdt.c b/spaghetti-monster/fsm-wdt.c
index 459010f..12aab7b 100644
--- a/spaghetti-monster/fsm-wdt.c
+++ b/spaghetti-monster/fsm-wdt.c
@@ -180,7 +180,7 @@ void WDT_inner() {
#if defined(USE_LVP) || defined(USE_THERMAL_REGULATION)
// start a new ADC measurement every 16 ticks
adc_trigger ++;
- if (0 == (adc_trigger & 15)) {
+ if (0 == (adc_trigger & 31)) {
// in case we're in standby mode and the ADC is turned off
if (go_to_standby) {
//set_admux_voltage();