aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-05-01 19:52:39 -0600
committerSelene ToyKeeper2018-05-01 19:52:39 -0600
commitd030518a314e838a0386182fbdfb65b56322cb6f (patch)
treeefe0ac17e57119de44c81e76c9493bbac2107372 /spaghetti-monster
parentCreated BLF GT driver definition. (diff)
downloadanduril-d030518a314e838a0386182fbdfb65b56322cb6f.tar.gz
anduril-d030518a314e838a0386182fbdfb65b56322cb6f.tar.bz2
anduril-d030518a314e838a0386182fbdfb65b56322cb6f.zip
Use separate voltage adjustment value for pin7 readings.
Diffstat (limited to 'spaghetti-monster')
-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();
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.