aboutsummaryrefslogtreecommitdiff
path: root/lib
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
parent497cdf03ef35886b452d366899988d041a7a533c (diff)
downloadenigma2-fba15fa1e8e9dacba942dd21ad3245a4a68c3be8.tar.gz
enigma2-fba15fa1e8e9dacba942dd21ad3245a4a68c3be8.zip
small changes
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/dvb.h4
-rw-r--r--lib/dvb/idvb.h2
-rw-r--r--lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py29
3 files changed, 21 insertions, 14 deletions
diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h
index 5801dd6c..bc51ccd8 100644
--- a/lib/dvb/dvb.h
+++ b/lib/dvb/dvb.h
@@ -199,8 +199,8 @@ public:
#ifdef SWIG
public:
#endif
- RESULT allocateRawChannel(eUsePtr<iDVBChannel> &SWIG_OUTPUT, int frontend_index);
- static SWIG_VOID(RESULT) getInstance(ePtr<eDVBResourceManager> &OUTPUT);
+ RESULT allocateRawChannel(eUsePtr<iDVBChannel> &, int frontend_index);
+ static RESULT getInstance(ePtr<eDVBResourceManager> &);
};
TEMPLATE_TYPEDEF(ePtr<eDVBResourceManager>, eDVBResourceManagerPtr);
#ifndef SWIG
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index 319a9c0b..5c94b009 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -447,7 +447,7 @@ public:
virtual RESULT getState(int &SWIG_OUTPUT)=0;
/* direct frontend access for raw channels and/or status inquiries. */
- virtual RESULT getFrontend(ePtr<iDVBFrontend> &SWIG_OUTPUT)=0;
+ virtual RESULT getFrontend(ePtr<iDVBFrontend> &)=0;
#ifndef SWIG
virtual RESULT getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> &)=0;
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():