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

@@ -308,6 +308,7 @@ m_ax25NetworkSpeed(9600U),
m_ax25NetworkDebug(false),
m_tftSerialPort("/dev/ttyAMA0"),
m_tftSerialBrightness(50U),
m_tftSerialScreenLayout(0U),
m_hd44780Rows(2U),
m_hd44780Columns(16U),
m_hd44780Pins(),
@@ -1073,6 +1074,8 @@ bool CConf::read()
m_tftSerialPort = value;
else if (::strcmp(key, "Brightness") == 0)
m_tftSerialBrightness = (unsigned int)::atoi(value);
else if (::strcmp(key, "ScreenLayout") == 0)
m_tftSerialScreenLayout = (unsigned int)::atoi(value);
} else if (section == SECTION_HD44780) {
if (::strcmp(key, "Rows") == 0)
m_hd44780Rows = (unsigned int)::atoi(value);
@@ -2369,6 +2372,11 @@ unsigned int CConf::getTFTSerialBrightness() const
return m_tftSerialBrightness;
}
unsigned int CConf::getTFTSerialScreenLayout() const
{
return m_tftSerialScreenLayout;
}
unsigned int CConf::getHD44780Rows() const
{
return m_hd44780Rows;