mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
TFTSurenoo: add 240x320 panel support
to support 240x320 panel, add ScreenLayout property at [TFT Serial] section in MMDVM.ini ScreenLayout=0 160x128 (default) ScreenLayout=1 128x160 ScreenLayout=2 320x240 ScreenLayout=1 240x320 (landscape layout is recommended)
This commit is contained in:
@@ -553,9 +553,11 @@ CDisplay* CDisplay::createDisplay(const CConf& conf, CModem* modem)
|
||||
if (type == "TFT Surenoo") {
|
||||
std::string port = conf.getTFTSerialPort();
|
||||
unsigned int brightness = conf.getTFTSerialBrightness();
|
||||
unsigned int screenLayout = conf.getTFTSerialScreenLayout();
|
||||
|
||||
LogInfo(" Port: %s", port.c_str());
|
||||
LogInfo(" Brightness: %u", brightness);
|
||||
LogInfo(" Screen Layout: %u", screenLayout);
|
||||
|
||||
ISerialPort* serial = NULL;
|
||||
if (port == "modem")
|
||||
@@ -563,7 +565,7 @@ CDisplay* CDisplay::createDisplay(const CConf& conf, CModem* modem)
|
||||
else
|
||||
serial = new CUARTController(port, 115200U);
|
||||
|
||||
display = new CTFTSurenoo(conf.getCallsign(), dmrid, serial, brightness, conf.getDuplex());
|
||||
display = new CTFTSurenoo(conf.getCallsign(), dmrid, serial, brightness, conf.getDuplex(), screenLayout);
|
||||
} else if (type == "Nextion") {
|
||||
std::string port = conf.getNextionPort();
|
||||
unsigned int brightness = conf.getNextionBrightness();
|
||||
|
||||
Reference in New Issue
Block a user