mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 10:16:11 +00:00
feat: add runtime display rotation setting for e-ink builds
Adds Settings > Display > Rotation (0°/90°/180°/270°) that persists to NodePrefs and is applied on startup. Falls back to compile-time DISPLAY_ROTATION when the field is missing from an older prefs file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
cffe960f3f
commit
6a3b8e3135
@@ -817,6 +817,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
|
||||
|
||||
applyBrightness();
|
||||
applyFont();
|
||||
applyRotation();
|
||||
}
|
||||
|
||||
void UITask::gotoSettingsScreen() {
|
||||
@@ -1565,6 +1566,13 @@ void UITask::applyFont() {
|
||||
}
|
||||
}
|
||||
|
||||
void UITask::applyRotation() {
|
||||
if (_display != NULL && _node_prefs != NULL) {
|
||||
_display->setDisplayRotation(_node_prefs->display_rotation);
|
||||
_next_refresh = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void UITask::setBrightnessLevel(uint8_t level) {
|
||||
if (_node_prefs == NULL) return;
|
||||
if (level > 4) level = 4;
|
||||
|
||||
Reference in New Issue
Block a user