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:
SASANO Takayoshi
2023-12-28 22:45:40 +09:00
parent f02cbcb141
commit 8928636243
6 changed files with 46 additions and 17 deletions

View File

@@ -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();