From a87812f436e08b14a7cede83e30306d779774872 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 25 Mar 2024 04:25:43 -0600 Subject: dammit, got alkaline detection half working and then my flashing adapter died (saving progress here so I can work on a different branch) --- ui/anduril/anduril.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ui') 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()) -- cgit v1.2.3