leds: default brightness 100%, matching pre-existing hardware behavior

ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT was 10 on the branch this was
developed on (a local preference for that project's own compiles).
For general use it should default to what every PWM LED already ran
at before this setting existed: full brightness. Also fixes a stale
led_gate.h comment that still said "RAM-only, not persisted" after
brightness became a persisted NodePrefs field.
This commit is contained in:
ZephCore T096
2026-09-28 22:14:11 +02:00
parent 268bd01b75
commit fd8de307f2
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -493,7 +493,7 @@ static inline void initNodePrefs(NodePrefs* prefs) {
prefs->leds_disabled = 0; // LEDs on
prefs->leds_radio_mode = LEDS_RADIO_TX; // activity LED on transmit, as before
prefs->leds_hb_mode = LEDS_HB_ALL; // heartbeat + unread, as before
prefs->led_brightness = ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT; // 10%, new node
prefs->led_brightness = ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT; // 100%, new node
prefs->powersaving_enabled = POWERSAVING_DEFAULT;
prefs->powersaving_set = 1;
prefs->gps_enabled = 0;
+7 -7
View File
@@ -36,13 +36,13 @@ void zephcore_leds_set_disabled(bool disabled);
/* Shared PWM brightness (0-100) for boards whose heartbeat/TX LED is
* PWM-capable (DT_ALIAS(heartbeat_pwm_led) / DT_ALIAS(lora_tx_pwm_led)).
* Deliberately RAM-only, not persisted: resets to
* ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT on every reboot regardless of any
* "set led <pct>" done during a previous session. Independent of the on/off
* gate above: brightness only matters while the gate is open. No-op on
* boards without a PWM-capable LED (the getter still returns the compiled
* default, simply unused). */
#define ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT 10
* Persisted via NodePrefs (prefs.led_brightness); ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT
* only seeds the RAM cache on a fresh node with no saved value yet (100%,
* matching the brightness every PWM LED ran at before this setting existed).
* Independent of the on/off gate above: brightness only matters while the
* gate is open. No-op on boards without a PWM-capable LED (the getter still
* returns the compiled default, simply unused). */
#define ZEPHCORE_LED_DEFAULT_BRIGHTNESS_PCT 100
uint8_t zephcore_led_brightness_pct(void);
void zephcore_led_set_brightness_pct(uint8_t pct);