From 4dd36f685d7091bb2a57a597c2d5ac20b5b7ccd4 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Fri, 22 May 2026 23:50:21 +0200 Subject: [PATCH] fix: apply rotation before splash screen, clip logo to display width - Move applyRotation() before setCurrScreen(splash) so e-ink startup screen respects the saved display_rotation preference - Clamp meshcore logo width to display.width() so it doesn't overflow in portrait mode (122px screen vs 128px logo) Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 61afcefa..dcc6f470 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -71,7 +71,7 @@ public: // meshcore logo display.setColor(DisplayDriver::LIGHT); - int logoWidth = 128; + int logoWidth = min(128, display.width()); int logo_y = 3; display.drawXbm((display.width() - logoWidth) / 2, logo_y, meshcore_logo, logoWidth, 13); @@ -893,11 +893,10 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no nearby_screen = new NearbyScreen(this); dashboard_config = new DashboardConfigScreen(this, node_prefs); auto_advert_screen = new AutoAdvertScreen(this, node_prefs); - setCurrScreen(splash); - applyBrightness(); applyFont(); applyRotation(); + setCurrScreen(splash); } void UITask::gotoSettingsScreen() {