aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-adc.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-05-01 19:58:06 -0600
committerSelene ToyKeeper2018-05-01 19:58:06 -0600
commitce579b69222f78f1e8a5b8a420fea28d9686bddb (patch)
treec6d62ad8cd838e75a91fda7ed43c508dab90eba7 /spaghetti-monster/fsm-adc.h
parentAdded missing ifdef for muggle mode behavior at boot. (diff)
parentAdded BLF GT support to Anduril. (diff)
downloadanduril-ce579b69222f78f1e8a5b8a420fea28d9686bddb.tar.gz
anduril-ce579b69222f78f1e8a5b8a420fea28d9686bddb.tar.bz2
anduril-ce579b69222f78f1e8a5b8a420fea28d9686bddb.zip
merged BLF GT support branch
Diffstat (limited to 'spaghetti-monster/fsm-adc.h')
-rw-r--r--spaghetti-monster/fsm-adc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-adc.h b/spaghetti-monster/fsm-adc.h
index 1b16d01..6256e2c 100644
--- a/spaghetti-monster/fsm-adc.h
+++ b/spaghetti-monster/fsm-adc.h
@@ -32,8 +32,12 @@
#endif
// MCU sees voltage 0.X volts lower than actual, add X/2 to readings
#ifndef VOLTAGE_FUDGE_FACTOR
+#ifdef USE_VOLTAGE_DIVIDER
+#define VOLTAGE_FUDGE_FACTOR 0
+#else
#define VOLTAGE_FUDGE_FACTOR 5
#endif
+#endif
volatile uint8_t voltage;
volatile uint8_t adcint_enable; // kludge, because adc auto-retrigger won't turn off
void low_voltage();