mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
Testing timer wakeup fixes for NEO
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@741 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -3746,9 +3746,12 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
||||
struct tm *tmtime = localtime(&mtime);
|
||||
time_t fp_timer = 0;
|
||||
|
||||
if(timer_minutes)
|
||||
fp_timer = (timer_minutes - mtime)/60;
|
||||
printf("now: %ld, timer %ld, FP timer %ld\n", mtime/60, timer_minutes/60, fp_timer);fflush(stdout);
|
||||
if(timer_minutes) {
|
||||
fp_timer = timer_minutes - mtime/60;
|
||||
if(fp_timer < 1)
|
||||
fp_timer = 1;
|
||||
}
|
||||
printf("now: %ld, timer %ld, FP timer %ldmin\n", mtime/60, timer_minutes, fp_timer);fflush(stdout);
|
||||
int leds = 0x40;
|
||||
switch(g_settings.led_deep_mode){
|
||||
case 0:
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <timerdclient/timerdmsg.h>
|
||||
#include <debug.h>
|
||||
#include <sectionsdclient/sectionsdclient.h>
|
||||
#include <coolstream/cs_vfd.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -62,6 +63,18 @@ void CTimerManager::Init(void)
|
||||
m_saveEvents = false;
|
||||
m_isTimeSet = false;
|
||||
wakeup = 0;
|
||||
|
||||
int fd = open("/dev/display", O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
perror("/dev/display");
|
||||
} else {
|
||||
wakeup_data_t wk;
|
||||
memset(&wk, 0, sizeof(wk));
|
||||
int ret = ioctl(fd, IOC_VFD_GET_WAKEUP, &wk);
|
||||
if(ret >= 0)
|
||||
wakeup = ((wk.source == WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/);
|
||||
}
|
||||
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
|
||||
if(wakeup)
|
||||
creat("/tmp/.wakeup", 0);
|
||||
@@ -664,7 +677,7 @@ void CTimerManager::saveEventsToConfig()
|
||||
//------------------------------------------------------------
|
||||
bool CTimerManager::shutdown()
|
||||
{
|
||||
timerd_debug = 1;
|
||||
timerd_debug = 1; //FIXME
|
||||
time_t nextAnnounceTime=0;
|
||||
bool status=false;
|
||||
dprintf("stopping timermanager thread ...\n");
|
||||
@@ -693,7 +706,7 @@ timerd_debug = 1;
|
||||
dprintf("shutdown: timer type %d state %d announceTime: %ld\n", event->eventType, event->eventState, event->announceTime);
|
||||
if((event->eventType == CTimerd::TIMER_RECORD ||
|
||||
event->eventType == CTimerd::TIMER_ZAPTO ) &&
|
||||
event->eventState == CTimerd::TIMERSTATE_SCHEDULED)
|
||||
event->eventState < CTimerd::TIMERSTATE_ISRUNNING)
|
||||
{
|
||||
// Wir wachen nur f<>r Records und Zaptos wieder auf
|
||||
if(event->announceTime < nextAnnounceTime || nextAnnounceTime==0)
|
||||
@@ -707,7 +720,7 @@ dprintf("shutdown: timer type %d state %d announceTime: %ld\n", event->eventType
|
||||
timer_minutes = 0;
|
||||
if(nextAnnounceTime != 0)
|
||||
{
|
||||
timer_minutes = nextAnnounceTime-3*60;
|
||||
timer_minutes = (nextAnnounceTime - 3*60)/60;
|
||||
}
|
||||
dprintf("shutdown: timeset: %d timer_minutes %ld\n", timeset, timer_minutes);
|
||||
|
||||
|
Reference in New Issue
Block a user