Add Config option to dim Nextion display in idle

state
This commit is contained in:
phl0
2016-06-24 09:30:46 +02:00
parent 18fa0df5d3
commit 7e906f3fdd
6 changed files with 42 additions and 11 deletions

View File

@@ -141,6 +141,7 @@ m_nextionBrightness(50U),
m_nextionDisplayClock(false),
m_nextionUTC(false),
m_nextionDateFormat("English"),
m_nextionDimOnIdle(false),
m_oledType(3),
m_oledBrightness(0),
m_oledInvert(0)
@@ -467,6 +468,8 @@ bool CConf::read()
m_nextionUTC = ::atoi(value) == 1;
else if (::strcmp(key, "DateFormat") == 0)
m_nextionDateFormat = value;
else if (::strcmp(key, "DimOnIdle") == 0)
m_nextionDimOnIdle = ::atoi(value) == 1;
} else if (section == SECTION_OLED) {
if (::strcmp(key, "Type") == 0)
m_oledType = (unsigned char)::atoi(value);
@@ -942,6 +945,11 @@ std::string CConf::getNextionDateFormat() const
return m_nextionDateFormat;
}
bool CConf::getNextionDimOnIdle() const
{
return m_nextionDimOnIdle;
}
unsigned char CConf::getOLEDType() const
{
return m_oledType;