add possibility to set diseqc inputs to "nothing connected"
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 12 Nov 2008 14:02:53 +0000 (15:02 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 12 Nov 2008 14:02:53 +0000 (15:02 +0100)
lib/python/Components/NimManager.py
lib/python/Screens/Satconfig.py

index e1d3b06..41925ae 100644 (file)
@@ -40,7 +40,7 @@ class SecConfigure:
                self.configuredSatellites.add(orbpos)
 
        def addLNBSimple(self, sec, slotid, diseqcmode, toneburstmode = diseqcParam.NO, diseqcpos = diseqcParam.SENDNO, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0, turningSpeed = rotorParam.FAST, useInputPower=True, inputPowerDelta=50):
-               if orbpos is None:
+               if orbpos is None or orbpos == 3601:
                        return
                #simple defaults
                sec.addLNB()
@@ -893,10 +893,10 @@ def InitNimManager(nimmgr):
                                if id != x:
                                        choices.append((str(id), nimmgr.getNimDescription(id)))
                        nim.connectedTo = ConfigSelection(choices = choices)
-                       nim.diseqcA = getConfigSatlist(192, nimmgr.satList)
-                       nim.diseqcB = getConfigSatlist(130, nimmgr.satList)
-                       nim.diseqcC = ConfigSatlist(list = nimmgr.satList)
-                       nim.diseqcD = ConfigSatlist(list = nimmgr.satList)
+                       nim.diseqcA = getConfigSatlist(192, [(3601, _('nothing connected'), 1)] + nimmgr.satList)
+                       nim.diseqcB = getConfigSatlist(130, [(3601, _('nothing connected'), 1)] + nimmgr.satList)
+                       nim.diseqcC = ConfigSatlist(list = [(3601, _('nothing connected'), 1)] + nimmgr.satList)
+                       nim.diseqcD = ConfigSatlist(list = [(3601, _('nothing connected'), 1)] + nimmgr.satList)
                        nim.positionerMode = ConfigSelection(
                                choices = [
                                        ("usals", _("USALS")),
index ccb776e..6dc9f41 100644 (file)
@@ -407,12 +407,17 @@ class NimSelection(Screen):
                                        text = _("nothing connected")
                                elif nimConfig.configMode.value == "simple":
                                        if nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
-                                               text = _("Sats") + ": " + nimmanager.getSatName(int(nimConfig.diseqcA.value))
+                                               text = _("Sats") + ": " 
+                                               if nimConfig.diseqcA.orbital_position != 3601:
+                                                       text += nimmanager.getSatName(int(nimConfig.diseqcA.value))
                                                if nimConfig.diseqcMode.value in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
-                                                       text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value))
+                                                       if nimConfig.diseqcB.orbital_position != 3601:
+                                                               text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value))
                                                if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
-                                                       text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value))
-                                                       text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value))
+                                                       if nimConfig.diseqcC.orbital_position != 3601:
+                                                               text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value))
+                                                       if nimConfig.diseqcD.orbital_position != 3601:
+                                                               text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value))
                                        elif nimConfig.diseqcMode.value == "positioner":
                                                text = _("Positioner") + ":"
                                                if nimConfig.positionerMode.value == "usals":