RotorPosition converter - optimization for the type "TunerName" and nimConfig "advanc...
authorims <ims21@users.sourceforge.net>
Thu, 2 Apr 2015 10:26:46 +0000 (12:26 +0200)
committerlittlesat <littlesat99@yahoo.com>
Thu, 2 Apr 2015 12:23:08 +0000 (14:23 +0200)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Components/Converter/RotorPosition.py

index 206b18a..686247a 100644 (file)
@@ -54,9 +54,15 @@ class RotorPosition(Converter, object):
                if not eDVBSatelliteEquipmentControl.getInstance().isRotorMoving():
                        service = self.source.service
                        feinfo = service and service.frontendInfo()
-                       tuner = feinfo and feinfo.getFrontendData()
+                       tuner = feinfo and feinfo.getAll(True)
                        if tuner:
-                               return tuner.get("tuner_number")
+                               num = tuner.get("tuner_number")
+                               orb_pos = tuner.get("orbital_position")
+                               if isinstance(num, int) and orb_pos:
+                                       satList = nimmanager.getRotorSatListForNim(num)
+                                       for sat in satList:
+                                               if sat[0] == orb_pos:
+                                                       return num
                return ""
 
        def forceChanged(self, configElement=None):