From 78277bfd38f26805587b70bcac0170e9851833de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 30 Jul 2025 21:21:41 +0200 Subject: [PATCH 1/3] Fix 128 row monochrome display --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 1868d98c7..0a1305014 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -761,8 +761,17 @@ void setup() #if defined(USE_SH1107_128_64) screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 + screen_geometry = GEOMETRY_128_64; #endif + // if we have one of the fixed overrides in the settings, adjust display type accordingly. + if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107) { + screen_geometry = GEOMETRY_128_128; + } else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64) { + screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; + screen_geometry = GEOMETRY_128_64; + } + #if !MESHTASTIC_EXCLUDE_I2C #if !defined(ARCH_STM32WL) if (acc_info.type != ScanI2C::DeviceType::NONE) { From ee5c9b7dcac25d867458636711388f84bd668350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 30 Jul 2025 21:24:35 +0200 Subject: [PATCH 2/3] trunk fmt --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 0a1305014..1aad9d3cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -817,7 +817,7 @@ void setup() #elif !defined(ARCH_ESP32) // ARCH_RP2040 SPI.begin(); #else - // ESP32 + // ESP32 #if defined(HW_SPI1_DEVICE) SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); From 0ab5bf3ccad7cbe3f57f9068429af2fa2d0ed768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 30 Jul 2025 21:36:14 +0200 Subject: [PATCH 3/3] fix assignment --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 1aad9d3cb..f022c95d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -768,7 +768,7 @@ void setup() if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107) { screen_geometry = GEOMETRY_128_128; } else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64) { - screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; + screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; screen_geometry = GEOMETRY_128_64; }