aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-adc.c
diff options
context:
space:
mode:
authorGabriel Hart2021-01-12 13:12:57 -0600
committerGabriel Hart2021-01-12 13:12:57 -0600
commitd8f58fcbd5f35d9d2140a4bcaa6589e1c2962198 (patch)
treea697ae021df44de2f442e583c661cf8a02149039 /spaghetti-monster/fsm-adc.c
parentFix 1-Series standby tick speed, use 2C Turbo (diff)
downloadanduril-d8f58fcbd5f35d9d2140a4bcaa6589e1c2962198.tar.gz
anduril-d8f58fcbd5f35d9d2140a4bcaa6589e1c2962198.tar.bz2
anduril-d8f58fcbd5f35d9d2140a4bcaa6589e1c2962198.zip
Add Sofirn SP10S (adapter) and dual-voltage logic
Diffstat (limited to 'spaghetti-monster/fsm-adc.c')
-rw-r--r--spaghetti-monster/fsm-adc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c
index 2818731..975d12e 100644
--- a/spaghetti-monster/fsm-adc.c
+++ b/spaghetti-monster/fsm-adc.c
@@ -341,7 +341,11 @@ static inline void ADC_voltage_handler() {
if (lvp_timer) {
lvp_timer --;
} else { // it has been long enough since the last warning
+ #ifdef DUAL_VOLTAGE_FLOOR
+ if (((voltage < VOLTAGE_LOW) && (voltage > DUAL_VOLTAGE_FLOOR)) || (voltage < DUAL_VOLTAGE_LOW_LOW)) {
+ #else
if (voltage < VOLTAGE_LOW) {
+ #endif
// send out a warning
emit(EV_voltage_low, 0);
// reset rate-limit counter