Add config option for Nextion display sizes

This commit is contained in:
phl0
2016-04-27 20:57:47 +02:00
parent dc3fed940c
commit 94aa27cc4b
6 changed files with 19 additions and 4 deletions

View File

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