diff options
-rw-r--r-- | plugin.c | 1 | ||||
-rw-r--r-- | state.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -262,6 +262,7 @@ cString cPluginGraphLCD::SVDRPCommand(const char *Command, const char *Option, i } if (strcasecmp(Command, "ON") == 0) { GraphLCDSetup.PluginActive = 1; + mDisplay->Update(); return "GraphLCD Plugin switched on."; } return NULL; @@ -606,6 +606,14 @@ void cGraphLCDState::UpdateChannelInfo(void) if (mChannel.number == 0) return; + // correct stored channel number if differs from device's channel number + // e.g after switching off plugin, switching channel, re-enabling plugin + if (mChannel.number != cDevice::CurrentChannel()) { + mutex.Lock(); + mChannel.number = cDevice::CurrentChannel(); + mutex.Unlock(); + } + mutex.Lock(); cChannel * ch = Channels.GetByNumber(mChannel.number); |