display/input rotate

This commit is contained in:
liquidraver
2026-08-25 15:19:11 +02:00
parent 4632797e3e
commit 2e3f5f3f59
20 changed files with 544 additions and 19 deletions
+15
View File
@@ -57,6 +57,9 @@ extern "C" void bt_ctlr_assert_handle(char *file, uint32_t line)
/* UI subsystem (display, buttons, buzzer) */
#include "ui_task.h"
#if IS_ENABLED(CONFIG_ZEPHCORE_UI_DISPLAY)
#include "display.h"
#endif
/* Headless repeaters link the weak no-op ui_* stubs (ui_headless_stubs.c), so
* the periodic UI refresh in the maintenance pass is pure work for nothing on
@@ -762,6 +765,18 @@ int main(void)
}
}
/* Physical mounting orientation, from prefs. Both are immediate and
* cheap: the panel rotation is a two-byte SEGMENT_MAP/COM_SCAN remap and
* the axis swap is a flag the input callbacks read per event. A panel
* that cannot rotate logs a warning and stays in its native orientation
* rather than failing the boot. */
zephcore_input_set_flipped(prefs->input_rotate != 0);
#if IS_ENABLED(CONFIG_ZEPHCORE_UI_DISPLAY)
if (prefs->display_rotate) {
mc_display_set_rotated(true);
}
#endif
/* Feed initial UI state from loaded prefs */
ui_set_node_name(prefs->node_name);
refresh_repeater_ui_radio_state();