add possibility to select "second cable of motorized LNB" also when the rotor is...
[enigma2.git] / lib / python / Components / NimManager.py
index 434ab4aa244ab79213a632d2793f19f38184caf1..32fca47fb4f5767a94904e1993d45e2b6fe6511f 100644 (file)
@@ -188,7 +188,7 @@ class SecConfigure:
                                                                loValue = rotorParam.EAST
                                                        else:
                                                                loValue = rotorParam.WEST
-                                                       inputPowerDelta=hw.get_device_name() == "dm8000" and 50 or 15
+                                                       inputPowerDelta=hw.get_device_name() == "dm8000" and 15 or 50
                                                        useInputPower=False
                                                        turning_speed=0
                                                        if nim.powerMeasurement.value:
@@ -659,7 +659,7 @@ class NimManager:
        
        def canEqualTo(self, slotid):
                type = self.getNimType(slotid)
-               if self.getNimConfig(slotid) == "DVB-S2":
+               if type == "DVB-S2":
                        type = "DVB-S"
                nimList = self.getNimListOfType(type, slotid)
                for nim in nimList[:]:
@@ -667,10 +667,10 @@ class NimManager:
                        if mode.configMode.value == "loopthrough" or mode.configMode.value == "satposdepends":
                                nimList.remove(nim)
                return nimList
-       
+
        def canDependOn(self, slotid):
                type = self.getNimType(slotid)
-               if self.getNimConfig(slotid) == "DVB-S2":
+               if type == "DVB-S2":
                        type = "DVB-S"
                nimList = self.getNimListOfType(type, slotid)
                positionerList = []
@@ -683,6 +683,13 @@ class NimManager:
                                        if lnb != 0:
                                                nimHaveRotor = True
                                                break
+                               if not nimHaveRotor:
+                                       for sat in mode.advanced.sat.values():
+                                               lnb_num = int(sat.lnb.value)
+                                               diseqcmode = lnb_num and mode.advanced.lnb[lnb_num].diseqcMode.value or ""
+                                               if diseqcmode == "1_2":
+                                                       nimHaveRotor = True
+                                                       break
                        if nimHaveRotor:
                                alreadyConnected = False
                                for testnim in nimList: