mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Add more dynamic variables and fix command manging
Add variables for TX Freq (t30), RX Freq (t32), CPU Temp (t20), and Location (t31) to Base MMDVM page. These variables are available with Layout ON7LDS L3 or higher. This allows more dynamic info to be displayed without having to use the optional NextionDriver. Note, this doesn't add touch support. For that, use the NextionDriver. Fixed command mangling occuring during serial writes to Nextion due to no ready-state monitoring of display readiness. Added simple thread sleep to pace the commands as they are sent. Allows the display a chance to process the command before another one is blasted in. Prevents mangling of commands sent before display is ready to accept them. Hardwired to 10 msec--let's see if that's enough. Added setting in mmdvm conf file, Section: [Nextion] Setting: DisplayTempInFahrenheit Value= 0 (default) for C. 1=Fahrenheit This controls the value sent to t20.
This commit is contained in:
8
Conf.cpp
8
Conf.cpp
@@ -228,6 +228,7 @@ m_nextionDisplayClock(false),
|
||||
m_nextionUTC(false),
|
||||
m_nextionIdleBrightness(20U),
|
||||
m_nextionScreenLayout(0U),
|
||||
m_nextionTempInFahrenheit(false),
|
||||
m_oledType(3U),
|
||||
m_oledBrightness(0U),
|
||||
m_oledInvert(false),
|
||||
@@ -757,6 +758,8 @@ bool CConf::read()
|
||||
m_nextionIdleBrightness = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "ScreenLayout") == 0)
|
||||
m_nextionScreenLayout = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "DisplayTempInFahrenheit") == 0)
|
||||
m_nextionTempInFahrenheit = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_OLED) {
|
||||
if (::strcmp(key, "Type") == 0)
|
||||
m_oledType = (unsigned char)::atoi(value);
|
||||
@@ -1676,3 +1679,8 @@ bool CConf::getLCDprocDimOnIdle() const
|
||||
{
|
||||
return m_lcdprocDimOnIdle;
|
||||
}
|
||||
|
||||
bool CConf::getNextionTempInFahrenheit() const
|
||||
{
|
||||
return m_nextionTempInFahrenheit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user