mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-04 19:26:19 +00:00
feat(ui): runtime joystick rotation independent of display rotation
Add NodePrefs::joystick_rotation (0-3 steps CW), persisted in DataStore alongside display_rotation. rotateJoystickKey() now takes a runtime rot parameter instead of compile-time JOYSTICK_ROTATION macro. UITask::loop() reads joystick_rotation from NodePrefs each frame. Settings screen exposes "Joystick" rotation item on any build with UI_HAS_JOYSTICK. JOYSTICK_ROTATION macro still works as compile-time default for legacy/non-prefs builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
85cfb6f1af
commit
fea1be8e81
@@ -83,4 +83,5 @@ struct NodePrefs { // persisted to file
|
||||
// Home screen page order: each byte = bit-index+1 (see HP_* bit positions + 9=Settings, 10=Messages).
|
||||
// 0 = end of list (also uninitialized legacy). hasCustomOrder iff page_order[0] in 1..11.
|
||||
uint8_t page_order[11];
|
||||
uint8_t joystick_rotation; // 0-3 steps CW; independent of display_rotation
|
||||
};
|
||||
Reference in New Issue
Block a user