LCDproc: Make dimming the status screen optional

If you run another LCDproc client that doesn't dim the display when it displays its info, the display will effectively flash on and off (or dim/bright depending on your LCDd configuration) as it switches screens between MMDVMHost and the other client(s).

Making the dimming optional and turning it off in the host stops this "annoyance".
This commit is contained in:
Tony Corbett G0WFV
2016-10-29 20:00:32 +01:00
parent 3ff711f3ea
commit 44e8f6717a
6 changed files with 20 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ bool m_connected(false);
char m_buffer1[BUFFER_MAX_LEN];
char m_buffer2[BUFFER_MAX_LEN];
CLCDproc::CLCDproc(std::string address, unsigned int port, unsigned int localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex) :
CLCDproc::CLCDproc(std::string address, unsigned int port, unsigned int localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex, bool dimOnIdle) :
CDisplay(),
m_address(address),
m_port(port),
@@ -62,6 +62,7 @@ m_displayClock(displayClock),
m_utc(utc),
m_duplex(duplex),
//m_duplex(true), // uncomment to force duplex display for testing!
m_dimOnIdle(dimOnIdle),
m_dmr(false),
m_clockDisplayTimer(1000U, 0U, 250U) // Update the clock display every 250ms
{
@@ -539,7 +540,7 @@ int CLCDproc::socketPrintf(int fd, const char *format, ...)
}
}
return 1;
return 0;
}
void CLCDproc::defineScreens()
@@ -547,7 +548,7 @@ void CLCDproc::defineScreens()
// The Status Screen
socketPrintf(m_socketfd, "screen_add Status");
socketPrintf(m_socketfd, "screen_set Status -name Status -heartbeat on -priority info -backlight off");
socketPrintf(m_socketfd, "screen_set Status -name Status -heartbeat on -priority info -backlight %s", m_dimOnIdle ? "off" : "on");
socketPrintf(m_socketfd, "widget_add Status Callsign string");
socketPrintf(m_socketfd, "widget_add Status DMRNumber string");