mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
32
Conf.cpp
32
Conf.cpp
@@ -119,8 +119,12 @@ m_hd44780PWM(false),
|
||||
m_hd44780PWMPin(),
|
||||
m_hd44780PWMBright(),
|
||||
m_hd44780PWMDim(),
|
||||
m_hd44780DisplayClock(false),
|
||||
m_hd44780UTC(false),
|
||||
m_nextionPort("/dev/ttyAMA0"),
|
||||
m_nextionBrightness(50U),
|
||||
m_nextionDisplayClock(false),
|
||||
m_nextionUTC(false),
|
||||
m_oledType(3),
|
||||
m_oledBrightness(0),
|
||||
m_oledInvert(0)
|
||||
@@ -402,6 +406,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) {
|
||||
@@ -415,6 +423,10 @@ bool CConf::read()
|
||||
m_nextionPort = value;
|
||||
else if (::strcmp(key, "Brightness") == 0)
|
||||
m_nextionBrightness = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "DisplayClock") == 0)
|
||||
m_nextionDisplayClock = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "UTC") == 0)
|
||||
m_nextionUTC = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_OLED) {
|
||||
if (::strcmp(key, "Type") == 0)
|
||||
m_oledType = (unsigned char)::atoi(value);
|
||||
@@ -800,6 +812,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;
|
||||
@@ -810,6 +832,16 @@ unsigned int CConf::getNextionBrightness() const
|
||||
return m_nextionBrightness;
|
||||
}
|
||||
|
||||
bool CConf::getNextionDisplayClock() const
|
||||
{
|
||||
return m_nextionDisplayClock;
|
||||
}
|
||||
|
||||
bool CConf::getNextionUTC() const
|
||||
{
|
||||
return m_nextionUTC;
|
||||
}
|
||||
|
||||
unsigned char CConf::getOLEDType() const
|
||||
{
|
||||
return m_oledType;
|
||||
|
||||
Reference in New Issue
Block a user