mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-28 22:25:36 +08:00
Add modem I2C/OLED support.
This commit is contained in:
10
Conf.cpp
10
Conf.cpp
@@ -301,6 +301,7 @@ m_nextionUTC(false),
|
||||
m_nextionIdleBrightness(20U),
|
||||
m_nextionScreenLayout(0U),
|
||||
m_nextionTempInFahrenheit(false),
|
||||
m_oledPort(),
|
||||
m_oledType(3U),
|
||||
m_oledBrightness(0U),
|
||||
m_oledInvert(false),
|
||||
@@ -1030,7 +1031,9 @@ bool CConf::read()
|
||||
else if (::strcmp(key, "DisplayTempInFahrenheit") == 0)
|
||||
m_nextionTempInFahrenheit = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_OLED) {
|
||||
if (::strcmp(key, "Type") == 0)
|
||||
if (::strcmp(key, "Port") == 0)
|
||||
m_oledPort = value;
|
||||
else if (::strcmp(key, "Type") == 0)
|
||||
m_oledType = (unsigned char)::atoi(value);
|
||||
else if (::strcmp(key, "Brightness") == 0)
|
||||
m_oledBrightness = (unsigned char)::atoi(value);
|
||||
@@ -2243,6 +2246,11 @@ unsigned int CConf::getNextionScreenLayout() const
|
||||
return m_nextionScreenLayout;
|
||||
}
|
||||
|
||||
std::string CConf::getOLEDPort() const
|
||||
{
|
||||
return m_oledPort;
|
||||
}
|
||||
|
||||
unsigned char CConf::getOLEDType() const
|
||||
{
|
||||
return m_oledType;
|
||||
|
||||
Reference in New Issue
Block a user