From d030518a314e838a0386182fbdfb65b56322cb6f Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Tue, 1 May 2018 19:52:39 -0600 Subject: Use separate voltage adjustment value for pin7 readings. --- spaghetti-monster/fsm-adc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spaghetti-monster') 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(); -- cgit v1.2.3