mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Add config option for Nextion display sizes
This commit is contained in:
10
Conf.cpp
10
Conf.cpp
@@ -110,6 +110,7 @@ m_tftSerialBrightness(50U),
|
||||
m_hd44780Rows(2U),
|
||||
m_hd44780Columns(16U),
|
||||
m_hd44780Pins(),
|
||||
m_nextionSize(),
|
||||
m_nextionPort(),
|
||||
m_nextionBrightness(50U)
|
||||
{
|
||||
@@ -348,7 +349,9 @@ bool CConf::read()
|
||||
}
|
||||
}
|
||||
} else if (section == SECTION_NEXTION) {
|
||||
if (::strcmp(key, "Port") == 0)
|
||||
if (::strcmp(key, "Size") == 0)
|
||||
m_nextionSize = value;
|
||||
else if (::strcmp(key, "Port") == 0)
|
||||
m_nextionPort = value;
|
||||
else if (::strcmp(key, "Brightness") == 0)
|
||||
m_nextionBrightness = (unsigned int)::atoi(value);
|
||||
@@ -680,6 +683,11 @@ std::vector<unsigned int> CConf::getHD44780Pins() const
|
||||
return m_hd44780Pins;
|
||||
}
|
||||
|
||||
std::string CConf::getNextionSize() const
|
||||
{
|
||||
return m_nextionSize;
|
||||
}
|
||||
|
||||
std::string CConf::getNextionPort() const
|
||||
{
|
||||
return m_nextionPort;
|
||||
|
||||
Reference in New Issue
Block a user