mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 11:09:20 +00:00
Compare commits
4 Commits
fbe3447d2f
...
ca2b3466c4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ca2b3466c4 | ||
![]() |
9d222c9a55 | ||
![]() |
2dd4ca8c52 | ||
![]() |
2a50ae05dd |
15
src/main.cpp
15
src/main.cpp
@ -805,15 +805,18 @@ void setup()
|
|||||||
if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)
|
if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)
|
||||||
screen_model = config.display.oled;
|
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)
|
#if defined(USE_SH1107_128_64)
|
||||||
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
||||||
|
screen_geometry = GEOMETRY_128_64;
|
||||||
#endif
|
#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 !MESHTASTIC_EXCLUDE_I2C
|
||||||
#if !defined(ARCH_STM32WL)
|
#if !defined(ARCH_STM32WL)
|
||||||
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
||||||
@ -859,7 +862,7 @@ void setup()
|
|||||||
#elif !defined(ARCH_ESP32) // ARCH_RP2040
|
#elif !defined(ARCH_ESP32) // ARCH_RP2040
|
||||||
SPI.begin();
|
SPI.begin();
|
||||||
#else
|
#else
|
||||||
// ESP32
|
// ESP32
|
||||||
#if defined(HW_SPI1_DEVICE)
|
#if defined(HW_SPI1_DEVICE)
|
||||||
SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
|
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);
|
LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
|
||||||
|
Loading…
Reference in New Issue
Block a user