diff options
Diffstat (limited to 'spaghetti-monster/fsm-adc.h')
| -rw-r--r-- | spaghetti-monster/fsm-adc.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-adc.h b/spaghetti-monster/fsm-adc.h index 36d4c9c..fc24712 100644 --- a/spaghetti-monster/fsm-adc.h +++ b/spaghetti-monster/fsm-adc.h @@ -57,7 +57,12 @@ uint8_t adc_deferred_enable = 0; // stop waiting and run the deferred code void adc_deferred(); // do the actual ADC-related calculations static inline void ADC_voltage_handler(); -volatile uint8_t voltage = 0; +uint8_t voltage = 0; +#ifdef USE_VOLTAGE_CORRECTION +// same 0.05V units as fudge factor, +// but 7 is neutral, and the expected range is from 1 to 13 +uint8_t voltage_correction = 7; +#endif #ifdef USE_LVP void low_voltage(); #endif @@ -88,7 +93,7 @@ void battcheck(); #define THERM_CAL_OFFSET 0 #endif // temperature now, in C (ish) -volatile int16_t temperature; +int16_t temperature; uint8_t therm_ceil = DEFAULT_THERM_CEIL; int8_t therm_cal_offset = 0; static inline void ADC_temperature_handler(); |
