small gui command order fix when diseqc 1.1 is selected and a uncommitted
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 2 Jun 2008 09:45:51 +0000 (09:45 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 2 Jun 2008 09:45:51 +0000 (09:45 +0000)
command is selected

lib/python/Screens/Satconfig.py

index f3ab6be31cf1cf6e199d6616226efa2186a8f299..e32c45fbd35fec6a243cd6717a3c6a052d5858b1 100644 (file)
@@ -57,7 +57,7 @@ class NimSetup(Screen, ConfigListScreen):
                self.turningSpeed = None
                self.turnFastEpochBegin = None
                self.turnFastEpochEnd = None
                self.turningSpeed = None
                self.turnFastEpochBegin = None
                self.turnFastEpochEnd = None
-
+               self.uncommittedDiseqcCommand = None
                self.cableScanType = None
 
                if self.nim.isCompatible("DVB-S"):
                self.cableScanType = None
 
                if self.nim.isCompatible("DVB-S"):
@@ -133,7 +133,8 @@ class NimSetup(Screen, ConfigListScreen):
        def newConfig(self):
                checkList = (self.configMode, self.diseqcModeEntry, self.advancedSatsEntry, \
                        self.advancedLnbsEntry, self.advancedDiseqcMode, self.advancedUsalsEntry, \
        def newConfig(self):
                checkList = (self.configMode, self.diseqcModeEntry, self.advancedSatsEntry, \
                        self.advancedLnbsEntry, self.advancedDiseqcMode, self.advancedUsalsEntry, \
-                       self.advancedLof, self.advancedPowerMeasurement, self.turningSpeed, self.cableScanType)
+                       self.advancedLof, self.advancedPowerMeasurement, self.turningSpeed, \
+                       self.uncommittedDiseqcCommand, self.cableScanType)
                for x in checkList:
                        if self["config"].getCurrent() == x:
                                self.createSetup()
                for x in checkList:
                        if self["config"].getCurrent() == x:
                                self.createSetup()
@@ -179,8 +180,19 @@ class NimSetup(Screen, ConfigListScreen):
                                if currLnb.diseqcMode.value == "1_0":
                                        self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
                                else:
                                if currLnb.diseqcMode.value == "1_0":
                                        self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
                                else:
+                                       if currLnb.uncommittedDiseqcCommand.index:
+                                               if currLnb.commandOrder.value == "ct":
+                                                       currLnb.commandOrder.value = "cut"
+                                               elif currLnb.commandOrder.value == "tc":
+                                                       currLnb.commandOrder.value = "tcu"
+                                       else:
+                                               if currLnb.commandOrder.index & 1:
+                                                       currLnb.commandOrder.value = "tc"
+                                               else:
+                                                       currLnb.commandOrder.value = "ct"
                                        self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
                                        self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
-                                       self.list.append(getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand))
+                                       self.uncommittedDiseqcCommand = getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand)
+                                       self.list.append(self.uncommittedDiseqcCommand)
                                        self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
                                if currLnb.diseqcMode.value == "1_2":
                                        self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
                                        self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
                                if currLnb.diseqcMode.value == "1_2":
                                        self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))