clearFPWasTimerWakeup()
if getFPWasTimerWakeup(): # sanity check to detect if the FP driver is working correct!
print "buggy fp driver detected!!! please update drivers.... ignore timer wakeup!"
- setFPWakeuptime(0)
elif len(self.getRecordings()) or abs(self.RecordTimer.getNextRecordingTime() - time()) <= 360:
- setFPWakeuptime(0x89ABCDEF)
- if getFPWakeuptime() != 0x89ABCDEF: # sanity check to detect if the FP Atmel Firmware is working correct!
- print "buggy atmel firmware detected!! atmel update needed... ignore fp timer wakeup!"
- setFPWakeuptime(0)
- elif not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
+ if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
RecordTimer.RecordTimerEntry.TryQuitMainloop(0) # start shutdown handling
- setFPWakeuptime(1)
self.SleepTimer = SleepTimer.SleepTimer()
def dispatchEvent(self, i):
FILE *f = fopen("/proc/stb/fp/rtc", "w");
if (f)
{
- time_t wakeup=0;
- FILE *f2 = fopen("/proc/stb/fp/wakeup_time", "r");
- if (f2)
- {
- fscanf(f2, "%u", &wakeup);
- fclose(f2);
- }
- if (wakeup) // atmel firmware okay?
- {
- if (fprintf(f, "%u", time))
- prev_time = time;
- else
- eDebug("write /proc/stb/fp/rtc failed (%m)");
- fclose(f);
- }
+ if (fprintf(f, "%u", time))
+ prev_time = time;
else
- eDebug("dont set rtc because of buggy atmel firmware!");
+ eDebug("write /proc/stb/fp/rtc failed (%m)");
+ fclose(f);
}
else
{
if x != -1
]
wakeupList.sort()
- if len(wakeupList) and getFPWakeuptime(): # getFPWakeuptime returns 1 when the sanity check in Navigation.py was okay..
+ if len(wakeupList):
startTime = wakeupList.pop(0)
if (startTime - nowTime) < 330: # no time to switch box back on
wptime = nowTime + 30 # so switch back on in 30 seconds
else:
wptime = startTime - 300
setFPWakeuptime(wptime)
- else:
- print "buggy atmel firmware detected... dont set a wakeup time!"
- setFPWakeuptime(0)
profile("stopService")
session.nav.stopService()
profile("nav shutdown")