aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-adc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-03-16 03:19:42 -0600
committerSelene ToyKeeper2020-03-16 03:19:42 -0600
commit49f1b5ccd2033109814b99ea4650375e8f33a6be (patch)
tree40b185f4198630a1a9377c6282db5f9e690f9cbc /spaghetti-monster/fsm-adc.c
parentincreased blink speed slightly, and added a library function to blink out 16-... (diff)
downloadanduril-49f1b5ccd2033109814b99ea4650375e8f33a6be.tar.gz
anduril-49f1b5ccd2033109814b99ea4650375e8f33a6be.tar.bz2
anduril-49f1b5ccd2033109814b99ea4650375e8f33a6be.zip
merged some misc fixes from pakutrai, cleaned up comments, removed unused symbols
Diffstat (limited to 'spaghetti-monster/fsm-adc.c')
-rw-r--r--spaghetti-monster/fsm-adc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c
index dd43cb9..59d624b 100644
--- a/spaghetti-monster/fsm-adc.c
+++ b/spaghetti-monster/fsm-adc.c
@@ -119,8 +119,8 @@ static inline uint8_t calc_voltage_divider(uint16_t value) {
}
#endif
-// Each full cycle runs ~4X per second with just voltage enabled,
-// or ~2X per second with voltage and temperature.
+// Each full cycle runs ~2X per second with just voltage enabled,
+// or ~1X per second with voltage and temperature.
#if defined(USE_LVP) && defined(USE_THERMAL_REGULATION)
#define ADC_CYCLES_PER_SECOND 1
#else
@@ -276,6 +276,7 @@ static inline void ADC_voltage_handler() {
#ifdef USE_THERMAL_REGULATION
+// generally happens once per second while awake
static inline void ADC_temperature_handler() {
// coarse adjustment
#ifndef THERM_LOOKAHEAD