summaryrefslogtreecommitdiff
path: root/src/tangara/ui/ui_fsm.cpp
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2025-03-19 03:31:18 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2025-03-19 03:31:18 +0000
commit34e7ce869b8d451e0586e96cc4dabbff8efb56d3 (patch)
treecca0de0ededc0ec001028c64f2424294f6c7e029 /src/tangara/ui/ui_fsm.cpp
parentfe38a57120145f73abf170400fe4a0eb0fd2714a (diff)
parent4ddeeee0f2ca1bfd70b7045446fc719afe357431 (diff)
downloadtangara-fw-34e7ce869b8d451e0586e96cc4dabbff8efb56d3.tar.gz
Merge pull request 'Support padding the left side of the display with black columns' (#302) from display_padding into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/302
Diffstat (limited to 'src/tangara/ui/ui_fsm.cpp')
-rw-r--r--src/tangara/ui/ui_fsm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tangara/ui/ui_fsm.cpp b/src/tangara/ui/ui_fsm.cpp
index ebc4b635..020917e2 100644
--- a/src/tangara/ui/ui_fsm.cpp
+++ b/src/tangara/ui/ui_fsm.cpp
@@ -352,10 +352,13 @@ void UiState::react(const internal::InitDisplay& ev) {
// HACK: correct the display size for our prototypes.
// ev.nvs.DisplaySize({161, 130});
+ // HACK: correct the display padding for batch 2.
+ // ev.nvs.DisplayLeftPadding(3);
auto actual_size = ev.nvs.DisplaySize();
init_data.width = actual_size.first.value_or(init_data.width);
init_data.height = actual_size.second.value_or(init_data.height);
+ init_data.pad = ev.nvs.DisplayLeftPadding();
sDisplay.reset(drivers::Display::Create(ev.gpios, init_data));
sCurrentScreen.reset(new screens::Splash());