Add configurable scrolling to the OLED display.

This commit is contained in:
Jonathan Naylor
2017-08-13 10:57:02 +01:00
parent 8d9cfb0f46
commit 3749b8d9f4
6 changed files with 25 additions and 11 deletions

View File

@@ -173,6 +173,7 @@ m_nextionIdleBrightness(20U),
m_oledType(3U),
m_oledBrightness(0U),
m_oledInvert(false),
m_oledScroll(false),
m_lcdprocAddress(),
m_lcdprocPort(0U),
m_lcdprocLocalPort(0U),
@@ -571,6 +572,8 @@ bool CConf::read()
m_oledBrightness = (unsigned char)::atoi(value);
else if (::strcmp(key, "Invert") == 0)
m_oledInvert = ::atoi(value) == 1;
else if (::strcmp(key, "Scroll") == 0)
m_oledScroll = ::atoi(value) == 1;
} else if (section == SECTION_LCDPROC) {
if (::strcmp(key, "Address") == 0)
m_lcdprocAddress = value;
@@ -1187,6 +1190,11 @@ bool CConf::getOLEDInvert() const
return m_oledInvert;
}
bool CConf::getOLEDScroll() const
{
return m_oledScroll;
}
std::string CConf::getLCDprocAddress() const
{
return m_lcdprocAddress;