diff options
| author | SiteRelEnby | 2023-11-06 14:50:06 -0600 |
|---|---|---|
| committer | SiteRelEnby | 2024-04-02 21:34:36 -0500 |
| commit | d7c7ff8e921456b1f1a27ad16f6d3466157c91c4 (patch) | |
| tree | 65c1bf7a48f4f29eb99af94ce687c03ff90cb2c5 /fsm/ramping.c | |
| parent | use smooth steps in lockout mode, if enabled (diff) | |
| download | anduril-d7c7ff8e921456b1f1a27ad16f6d3466157c91c4.tar.gz anduril-d7c7ff8e921456b1f1a27ad16f6d3466157c91c4.tar.bz2 anduril-d7c7ff8e921456b1f1a27ad16f6d3466157c91c4.zip | |
Add a feature to make RGB voltage configurable
Adds two entries to the battery voltage settings menu, the first
isathreshold for switching aux to high, and the second sets a minimum
level for it to be displayed, also effectively allowing the feature to
be entirely disabled if not wanted.
Diffstat (limited to '')
| -rw-r--r-- | fsm/ramping.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fsm/ramping.c b/fsm/ramping.c index adc8acb..b3b3b23 100644 --- a/fsm/ramping.c +++ b/fsm/ramping.c @@ -41,9 +41,16 @@ inline void set_level_aux_leds(uint8_t level) { #include "anduril/aux-leds.h" // for rgb_led_voltage_readout() inline void set_level_aux_rgb_leds(uint8_t level) { if (! go_to_standby) { + #ifdef USE_CONFIGURABLE_RGB_VOLTAGE_LEVELS + if ((level > 0) && (actual_level > cfg.use_aux_rgb_leds_while_on_min_level)){ + rgb_led_voltage_readout(level > cfg.use_aux_rgb_leds_while_on); + } + #else if (level > 0) { rgb_led_voltage_readout(level > USE_AUX_RGB_LEDS_WHILE_ON); - } else { + } + #endif + else { rgb_led_set(0); } // some drivers can be wired with RGB or single color to button |
