mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 06:25:24 +00:00
Add Config option to dim Nextion display in idle
state
This commit is contained in:
parent
18fa0df5d3
commit
7e906f3fdd
6 changed files with 42 additions and 11 deletions
8
Conf.cpp
8
Conf.cpp
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue