mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-14 20:07:23 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user