aboutsummaryrefslogtreecommitdiff
path: root/ui/anduril/anduril.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui/anduril/anduril.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/anduril/anduril.c b/ui/anduril/anduril.c
index 383acbc..a17ecf2 100644
--- a/ui/anduril/anduril.c
+++ b/ui/anduril/anduril.c
@@ -286,9 +286,17 @@ void loop() {
StatePtr state = current_state;
#ifdef USE_AUX_RGB_LEDS_WHILE_ON
- // display battery charge on RGB button during use
- if (state == steady_state)
- rgb_led_voltage_readout(actual_level > USE_AUX_RGB_LEDS_WHILE_ON);
+ // display battery charge on RGB button during use
+ if (state == steady_state) {
+ #ifdef USE_AUX_THRESHOLD_CONFIG
+ // only show voltage if feature is enabled and
+ // we are above the configured minimum ramp level
+ if (actual_level > cfg.button_led_low_ramp_level)
+ rgb_led_voltage_readout(actual_level > cfg.button_led_high_ramp_level);
+ #else
+ rgb_led_voltage_readout(actual_level > USE_AUX_RGB_LEDS_WHILE_ON);
+ #endif
+ }
#endif
if (0) {} // placeholder