mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-26 03:15:40 +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:
8
Conf.cpp
8
Conf.cpp
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user