aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-04 11:18:39 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-04 11:18:39 +0000
commitfba15fa1e8e9dacba942dd21ad3245a4a68c3be8 (patch)
treee47c2ac617bf0c8eb2c23ac3438f12e37013987f /lib/python
parent497cdf03ef35886b452d366899988d041a7a533c (diff)
downloadenigma2-fba15fa1e8e9dacba942dd21ad3245a4a68c3be8.tar.gz
enigma2-fba15fa1e8e9dacba942dd21ad3245a4a68c3be8.zip
small changes
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
index 067ef9ea..390d55a0 100644
--- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
@@ -185,18 +185,25 @@ class PositionerSetup(Screen):
def diseqc(self, what):
res_mgr = eDVBResourceManagerPtr()
- eDVBResourceManager.getInstance(res_mgr)
- raw_channel = iDVBChannelPtr()
- res_mgr.allocateRawChannel(raw_channel, self.feid)
- frontend = raw_channel.getFrontend()
- cmd = eDVBDiseqcCommand
- if what == "moveWest":
- cmd.setCommandString('\xe1\x31\x69\x40')
- elif what == "moveEast":
- cmd.setCommandString('\xe1\x31\x68\x40')
+ if eDVBResourceManager.getInstance(res_mgr) == 0:
+ raw_channel = iDVBChannelPtr()
+ if res_mgr.allocateRawChannel(raw_channel, self.feid) == 0:
+ frontend = iDVBFrontendPtr()
+ if raw_channel.getFrontend(frontend) == 0:
+ cmd = eDVBDiseqcCommand()
+ if what == "moveWest":
+ cmd.setCommandString('\xe1\x31\x69\x40')
+ elif what == "moveEast":
+ cmd.setCommandString('\xe1\x31\x68\x40')
+ else:
+ cmd.setCommandString('\xe0\x31\x60') #positioner stop
+ frontend.sendDiseqc(cmd)
+ else:
+ print "getFrontend failed"
+ else:
+ print "getRawChannel failed"
else:
- cmd.setCommandString('\xe0\x31\x60') #positioner stop
- frontend.sendDiseqc(cmd)
+ print "getResourceManager instance failed"
def updateStatus(self):
if eDVBSatelliteEquipmentControl.getInstance().isRotorMoving():