added positioner setup into satconfig
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 12 Oct 2005 17:28:28 +0000 (17:28 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 12 Oct 2005 17:28:28 +0000 (17:28 +0000)
lib/python/Components/NimManager.py
lib/python/Screens/Satconfig.py

index d826dbe..bbce2d5 100644 (file)
@@ -4,6 +4,7 @@ from config import configElement
 from config import ConfigSubsection
 from config import ConfigSlider
 from config import configSelection
+from config import configSequence
 from config import configSatlist
 
 import xml.dom.minidom
@@ -155,11 +156,13 @@ def InitNimManager(nimmgr):
                
                if slot.nimType == nimmgr.nimType["DVB-S"]:
                        config.Nims[x].configMode = configElement(cname + "configMode",configSelection, 0, ("Simple", "Advanced"));
-                       config.Nims[x].diseqcMode = configElement(cname + "diseqcMode",configSelection, 2, ("Single", "Toneburst A/B", "DiSEqC A/B", "DiSEqC A/B/C/D"));
+                       config.Nims[x].diseqcMode = configElement(cname + "diseqcMode",configSelection, 2, ("Single", "Toneburst A/B", "DiSEqC A/B", "DiSEqC A/B/C/D", "Positioner"));
                        config.Nims[x].diseqcA = configElement(cname + "diseqcA",configSatlist, 192, nimmgr.satList);
                        config.Nims[x].diseqcB = configElement(cname + "diseqcB",configSatlist, 130, nimmgr.satList);
                        config.Nims[x].diseqcC = configElement(cname + "diseqcC",configSatlist, 0, nimmgr.satList);
                        config.Nims[x].diseqcD = configElement(cname + "diseqcD",configSatlist, 0, nimmgr.satList);
+                       config.Nims[x].longitude = configElement(cname + "longitude",configSequence, [0,0], (("."), (1,999)));
+                       config.Nims[x].latitude = configElement(cname + "latitude",configSequence, [0,0], (("."), (1,999)));
                        
                        #perhaps the instance of the slot is more useful?
                        config.Nims[x].configMode.addNotifier(boundFunction(nimConfigModeChanged,x))
index da6706b..1e78870 100644 (file)
@@ -19,7 +19,11 @@ class NimSetup(Screen):
                        if mode >= 3:           # > 2 Sats
                                list.append(getConfigListEntry("Port C", config.Nims[nim.slotid].diseqcC))
                                list.append(getConfigListEntry("Port D", config.Nims[nim.slotid].diseqcD))
-                               
+       def createPositionerSetup(self, nim, list):
+               list.append(getConfigListEntry("Longitude", config.Nims[nim.slotid].longitude))
+               list.append(getConfigListEntry("Latitude", config.Nims[nim.slotid].latitude))
+               pass
+       
        def createSetup(self):
                self.list = [ ]
                
@@ -28,7 +32,10 @@ class NimSetup(Screen):
                if config.Nims[self.nim.slotid].configMode.value == 0:                  #simple setup
                        self.list.append(getConfigListEntry("Diseqcmode", config.Nims[self.nim.slotid].diseqcMode))
                
-                       self.createSimpleSetup(self.nim, self.list, config.Nims[self.nim.slotid].diseqcMode.value)
+                       if (0 <= config.Nims[self.nim.slotid].diseqcMode.value < 4):
+                               self.createSimpleSetup(self.nim, self.list, config.Nims[self.nim.slotid].diseqcMode.value)
+                       if (config.Nims[self.nim.slotid].diseqcMode.value == 4):
+                               self.createPositionerSetup(self.nim, self.list)
                else:   
                        print "FIXME: implement advanced mode"