aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-adc.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-02-10 02:12:27 -0700
committerSelene ToyKeeper2023-02-10 02:12:27 -0700
commitb2f95757bde9f3e23105d7b433fc59ace0f2ae87 (patch)
treea7182c25c0e28a06b6434d2d0d7eec433fc47d53 /spaghetti-monster/fsm-adc.h
parentfixed voltage calibration resolution on SP10 Pro (diff)
downloadanduril-b2f95757bde9f3e23105d7b433fc59ace0f2ae87.tar.gz
anduril-b2f95757bde9f3e23105d7b433fc59ace0f2ae87.tar.bz2
anduril-b2f95757bde9f3e23105d7b433fc59ace0f2ae87.zip
fast-blink the aux LED in standby when battery is low
3.3V and up: normal aux LED modes 2.9V to 3.3V: fast blink under 2.9V: off (only on lights with no RGB aux)
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 fc24712..db2bb7b 100644
--- a/spaghetti-monster/fsm-adc.h
+++ b/spaghetti-monster/fsm-adc.h
@@ -36,6 +36,10 @@ volatile uint8_t adc_reset = 2;
#ifndef VOLTAGE_LOW
#define VOLTAGE_LOW 29
#endif
+// battery is low but not critical
+#ifndef VOLTAGE_RED
+#define VOLTAGE_RED 33
+#endif
// MCU sees voltage 0.X volts lower than actual, add X/2 to readings
#ifndef VOLTAGE_FUDGE_FACTOR
#ifdef USE_VOLTAGE_DIVIDER