mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-17 18:42:10 +00:00
fix X11 usage
This commit is contained in:
parent
29bd134628
commit
dd4bd9856c
15
src/main.cpp
15
src/main.cpp
@ -666,9 +666,12 @@ void setup()
|
|||||||
DisplayDriverConfig displayConfig;
|
DisplayDriverConfig displayConfig;
|
||||||
char *panels[] = {"NOSCREEN", "ST7789", "ST7735", "ST7735S", "ILI9341", "HX8357D"};
|
char *panels[] = {"NOSCREEN", "ST7789", "ST7735", "ST7735S", "ILI9341", "HX8357D"};
|
||||||
char *touch[] = {"NOTOUCH", "XPT2046", "STMPE610", "GT911", "FT5x06"};
|
char *touch[] = {"NOTOUCH", "XPT2046", "STMPE610", "GT911", "FT5x06"};
|
||||||
|
#ifdef USE_X11
|
||||||
if (settingsMap[displayPanel] == no_screen /* x11 */) { // TODO: add x11 enum
|
if (settingsMap[displayPanel] == no_screen /* x11 */) { // TODO: add x11 enum
|
||||||
displayConfig.device(DisplayDriverConfig::device_t::X11);
|
displayConfig.device(DisplayDriverConfig::device_t::X11);
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
displayConfig.device(DisplayDriverConfig::device_t::CUSTOM_TFT)
|
displayConfig.device(DisplayDriverConfig::device_t::CUSTOM_TFT)
|
||||||
.panel(DisplayDriverConfig::panel_config_t{
|
.panel(DisplayDriverConfig::panel_config_t{
|
||||||
.type = panels[settingsMap[displayPanel]],
|
.type = panels[settingsMap[displayPanel]],
|
||||||
@ -686,21 +689,15 @@ void setup()
|
|||||||
.bus(DisplayDriverConfig::bus_config_t{.freq_write = 40000000,
|
.bus(DisplayDriverConfig::bus_config_t{.freq_write = 40000000,
|
||||||
.freq_read = 16000000,
|
.freq_read = 16000000,
|
||||||
.spi{
|
.spi{
|
||||||
// .pin_sclk = 11,
|
.pin_dc = (int8_t)settingsMap[displayDC], .use_lock = true,
|
||||||
// .pin_miso = 9,
|
|
||||||
// .pin_mosi = 10,
|
|
||||||
.pin_dc = (int8_t)settingsMap[displayDC],
|
|
||||||
.use_lock = true,
|
|
||||||
// .spi_host = 0 // TODO:
|
// .spi_host = 0 // TODO:
|
||||||
}})
|
}})
|
||||||
.touch(DisplayDriverConfig::touch_config_t{.type = touch[settingsMap[touchscreenModule]],
|
.touch(DisplayDriverConfig::touch_config_t{.type = touch[settingsMap[touchscreenModule]],
|
||||||
//.freq = 2500000,
|
//.freq = 2500000,
|
||||||
.pin_int = (int16_t)settingsMap[touchscreenIRQ],
|
.pin_int = (int16_t)settingsMap[touchscreenIRQ],
|
||||||
|
.offset_rotation = 0, // TODO:
|
||||||
.spi{
|
.spi{
|
||||||
.spi_host = 0, // TODO:
|
.spi_host = 0, // TODO:
|
||||||
// .pin_sclk = 11,
|
|
||||||
// .pin_mosi = 10,
|
|
||||||
// .pin_miso = 9,
|
|
||||||
},
|
},
|
||||||
.pin_cs = (int16_t)settingsMap[touchscreenCS]})
|
.pin_cs = (int16_t)settingsMap[touchscreenCS]})
|
||||||
.light(DisplayDriverConfig::light_config_t{
|
.light(DisplayDriverConfig::light_config_t{
|
||||||
|
Loading…
Reference in New Issue
Block a user