mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 02:59:11 +00:00
Account for 128x128 SH1107 displays
This commit is contained in:
parent
890357d579
commit
2a50ae05dd
14
src/main.cpp
14
src/main.cpp
@ -770,15 +770,19 @@ void setup()
|
||||
if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)
|
||||
screen_model = config.display.oled;
|
||||
|
||||
#if defined(USE_SH1107)
|
||||
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // set dimension of 128x128
|
||||
screen_geometry = GEOMETRY_128_128;
|
||||
#endif
|
||||
|
||||
#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_64;
|
||||
|
||||
} else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_128) {
|
||||
screen_geometry = GEOMETRY_128_128;
|
||||
}
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_I2C
|
||||
#if !defined(ARCH_STM32WL)
|
||||
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
||||
|
Loading…
Reference in New Issue
Block a user