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:
Jakub
2026-05-23 15:20:40 +02:00
co-authored by Claude Sonnet 4.6
parent 85cfb6f1af
commit fea1be8e81
5 changed files with 70 additions and 6 deletions
+1
View File
@@ -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
};