Add a clock to the idle screen

This commit is contained in:
Tony Corbett
2016-05-28 23:29:30 +03:00
parent 9dfba5095c
commit 35c0a83d37
6 changed files with 80 additions and 20 deletions

View File

@@ -119,6 +119,8 @@ m_hd44780PWM(false),
m_hd44780PWMPin(),
m_hd44780PWMBright(),
m_hd44780PWMDim(),
m_hd44780DisplayClock(false),
m_hd44780UTC(false),
m_nextionPort("/dev/ttyAMA0"),
m_nextionBrightness(50U),
m_oledType(3),
@@ -370,6 +372,10 @@ bool CConf::read()
m_hd44780PWMBright = (unsigned int)::atoi(value);
else if (::strcmp(key, "PWMDim") == 0)
m_hd44780PWMDim = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayClock") == 0)
m_hd44780DisplayClock = ::atoi(value) == 1;
else if (::strcmp(key, "UTC") == 0)
m_hd44780UTC = ::atoi(value) == 1;
else if (::strcmp(key, "Pins") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
@@ -754,6 +760,16 @@ unsigned int CConf::getHD44780PWMDim() const
return m_hd44780PWMDim;
}
bool CConf::getHD44780DisplayClock() const
{
return m_hd44780DisplayClock;
}
bool CConf::getHD44780UTC() const
{
return m_hd44780UTC;
}
std::string CConf::getNextionPort() const
{
return m_nextionPort;