timermanager: fix glcd handling

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8753a04e32
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-03-21 (Tue, 21 Mar 2023)

Origin message was:
------------------
- timermanager: fix glcd handling

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-03-21 20:36:22 +01:00
parent 395dc8e7d7
commit b039b93f64

View File

@@ -161,12 +161,6 @@ void* CTimerManager::timerThread(void *arg)
if(event->stopTime == 0) // if event needs no stop event
event->setState(CTimerd::TIMERSTATE_HASFINISHED);
timerManager->m_saveEvents = true;
#ifdef ENABLE_GRAPHLCD
if (setTimerIcon) {
cGLCD::unlockIcon(cGLCD::TIMER);
setTimerIcon = false;
}
#endif
}
if(event->stopTime > 0 && event->eventState == CTimerd::TIMERSTATE_ISRUNNING ) // check if stopevent is wanted
@@ -204,6 +198,17 @@ void* CTimerManager::timerThread(void *arg)
break;
}
}
#ifdef ENABLE_GRAPHLCD
if (setTimerIcon)
{
if (timerManager->events.begin() == timerManager->events.end()) // no timers
{
cGLCD::unlockIcon(cGLCD::TIMER);
setTimerIcon = false;
}
}
#endif
pthread_mutex_unlock(&tm_eventsMutex);
// save events if requested