mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix: apply saved display brightness before UI task starts
Loading... screen was always shown at full brightness because prefs are not yet loaded at that point. Apply setBrightness() in the first common code path after the_mesh.begin() loads prefs, so at least the tail of the loading screen and the entire splash screen respect the saved brightness level. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -219,6 +219,10 @@ void setup() {
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
// Apply saved brightness as soon as prefs are available so the tail of
|
||||
// the loading screen is not stuck at full brightness.
|
||||
if (disp && the_mesh.getNodePrefs())
|
||||
disp->setBrightness(the_mesh.getNodePrefs()->display_brightness);
|
||||
ui_task.begin(disp, &sensors, the_mesh.getNodePrefs()); // still want to pass this in as dependency, as prefs might be moved
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user