aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-03-25 04:25:43 -0600
committerSelene ToyKeeper2024-03-25 04:25:43 -0600
commita87812f436e08b14a7cede83e30306d779774872 (patch)
tree42ea09d981ade4d582a01f9c03dc996dc0d3f57b /ui
parentd3aa fine-tuning: (diff)
downloadanduril-a87812f436e08b14a7cede83e30306d779774872.tar.gz
anduril-a87812f436e08b14a7cede83e30306d779774872.tar.bz2
anduril-a87812f436e08b14a7cede83e30306d779774872.zip
dammit, got alkaline detection half working and then my flashing adapter died
(saving progress here so I can work on a different branch)
Diffstat (limited to '')
-rw-r--r--ui/anduril/anduril.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/anduril/anduril.c b/ui/anduril/anduril.c
index 1cdb8d0..f50f8d2 100644
--- a/ui/anduril/anduril.c
+++ b/ui/anduril/anduril.c
@@ -225,8 +225,16 @@ void setup() {
// regular e-switch light, no hard clicky power button
- // blink at power-on to let user know power is connected
- blink_once();
+ #ifdef USE_WEAK_BATTERY_PROTECTION
+ // try to measure the battery strength
+ // (must be done *before* factory reset,
+ // because reset tries to use full power,
+ // and a weak battery can't do that)
+ detect_weak_battery();
+ #else
+ // blink at power-on to let user know power is connected
+ blink_once();
+ #endif
#ifdef USE_FACTORY_RESET
if (button_is_pressed())