aboutsummaryrefslogtreecommitdiff
path: root/mytest.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-02-17 18:55:26 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-02-17 18:55:26 +0000
commitdd6b7236b87a06c700ee8e3d7686230ea8e13159 (patch)
tree7d100cfe5507c052da4192376cb9029877ba688c /mytest.py
parent3d5dd25c62114875146d4d4e09a58060789546c7 (diff)
downloadenigma2-dd6b7236b87a06c700ee8e3d7686230ea8e13159.tar.gz
enigma2-dd6b7236b87a06c700ee8e3d7686230ea8e13159.zip
zaptimers now do wakeup the box from standby and deepstandby
Diffstat (limited to 'mytest.py')
-rw-r--r--mytest.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/mytest.py b/mytest.py
index 58c5c680..e674a295 100644
--- a/mytest.py
+++ b/mytest.py
@@ -493,13 +493,21 @@ def runScreenTest():
from time import time
from Tools.DreamboxHardware import setFPWakeuptime
+ #get next record timer start time
nextRecordingTime = session.nav.RecordTimer.getNextRecordingTime()
- if nextRecordingTime != -1:
- if (nextRecordingTime - time() < 330): # no time to switch box back on
- setFPWakeuptime(time() + 30) # so switch back on in 30 seconds
+ #get next zap timer start time
+ nextZapTime = session.nav.RecordTimer.getNextZapTime()
+ #get currentTime
+ nowTime = time()
+ if nextZapTime != -1 and nextRecordingTime != -1:
+ startTime = nextZapTime < nextRecordingTime and nextZapTime or nextRecordingTime
+ else:
+ startTime = nextZapTime != -1 and nextZapTime or nextRecordingTime
+ if startTime != -1:
+ if (startTime - nowTime < 330): # no time to switch box back on
+ setFPWakeuptime(nowTime + 30) # so switch back on in 30 seconds
else:
- setFPWakeuptime(nextRecordingTime - (300))
-
+ setFPWakeuptime(startTime - 300)
session.nav.stopService()
session.nav.shutdown()