add single satellite scan to userinterface
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 15 Oct 2005 00:14:57 +0000 (00:14 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 15 Oct 2005 00:14:57 +0000 (00:14 +0000)
data/skin.xml
lib/python/Components/NimManager.py
lib/python/Components/ScanSetup.py
lib/python/Screens/NetworkSetup.py
lib/python/Screens/ScanSetup.py

index bf77ed8..4a7b825 100644 (file)
                <screen name="Satconfig" position="140,125" size="460,280" title="Satconfig">
                        <widget name="config" position="10,50" size="420,150" />
                </screen>
-               <screen name="ScanSetup" position="100,100" size="500,350" title="Service scan">
-                       <widget name="config" position="20,10" size="460,220" />
+               <screen name="ScanSetup" position="100,100" size="500,400" title="Service scan">
+                       <widget name="config" position="20,10" size="460,350" />
+                       <widget name="introduction" position="20,360" size="280,30" font="Arial;23" />
                </screen>
                <screen name="NetworkSetup" position="140,125" size="460,280" title="Network Setup">
                        <widget name="config" position="10,50" size="420,175" />
+                       <widget name="introduction" position="10,230" size="400,30" font="Arial;23" />
                </screen>
                <screen name="PluginBrowser" position="190,125" size="360,250" title="Plugins">
                        <widget name="title" position="10,10" size="280,35" font="Arial;23" />
index 01ef4bf..2086bee 100644 (file)
@@ -119,6 +119,20 @@ class NimManager:
                                nimText += ("DVB-S", "DVB-C", "DVB-T")[slot.nimType] + ")"
                        list.append((nimText, slot))
                return list
+       
+       def getSatListForNim(self, slotid):
+               print "slotid:", slotid
+               list = []
+               print "self.satellites:", self.satList[config.Nims[slotid].diseqcA.value]
+               print "diseqcA:", config.Nims[slotid].diseqcA.value
+               if (config.Nims[slotid].diseqcMode.value <= 3):
+                       list.append(self.satList[config.Nims[slotid].diseqcA.value])
+               if (0 < config.Nims[slotid].diseqcMode.value <= 3):
+                       list.append(self.satList[config.Nims[slotid].diseqcB.value])
+               if (config.Nims[slotid].diseqcMode.value == 3):
+                       list.append(self.satList[config.Nims[slotid].diseqcC.value])
+                       list.append(self.satList[config.Nims[slotid].diseqcD.value])
+               return list
 
        #callbacks for c++ config
        def nimConfigModeChanged(self, slotid, mode):
index 95e4767..e69de29 100644 (file)
@@ -1,46 +0,0 @@
-from config import *
-from Components.NimManager import nimmanager
-
-def InitScanSetup():
-    config.scan = ConfigSubsection()
-    config.scan.sat = ConfigSubsection()
-    config.scan.cab = ConfigSubsection()
-    config.scan.ter = ConfigSubsection()
-    config.scan.type = configElement_nonSave("config.scan.type", configSelection, 0, ("Single transponder", "Single satellite", "Multisat"))
-    nimList = [ ]
-    for nim in nimmanager.nimList():
-        nimList.append(nim[0])
-    nimList.append("all")
-    config.scan.nims = configElement_nonSave("config.scan.nims", configSelection, 0, nimList)
-    
-    # sat
-    config.scan.sat.frequency = configElement_nonSave("config.scan.sat.frequency", configSequence, [12187], configsequencearg.get("INTEGER", (10000, 14000)))
-    config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 0, ("off", "on"))
-    config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 30000)))
-    config.scan.sat.polarzation = configElement_nonSave("config.scan.sat.polarzation", configSelection, 0, ("horizontal", "vertical"))
-    config.scan.sat.fec = configElement_nonSave("config.scan.sat.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
-
-    # cable
-    config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (10000, 14000)))
-    config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 0, ("off", "on"))
-    config.scan.cab.modulation = configElement_nonSave("config.scan.cab.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
-    config.scan.cab.fec = configElement_nonSave("config.scan.cab.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
-    config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 30000)))
-    
-    # terrestial
-    config.scan.ter.frequency = configElement_nonSave("config.scan.ter.frequency", configSequence, [466], configsequencearg.get("INTEGER", (10000, 14000)))
-    config.scan.ter.inversion = configElement_nonSave("config.scan.ter.inversion", configSelection, 0, ("off", "on"))
-    config.scan.ter.bandwidth = configElement_nonSave("config.scan.ter.bandwidth", configSelection, 0, ("Auto", "6 MHz", "7MHz", "8MHz"))
-    config.scan.ter.fechigh = configElement_nonSave("config.scan.ter.fechigh", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
-    config.scan.ter.feclow = configElement_nonSave("config.scan.ter.feclow", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
-    config.scan.ter.modulation = configElement_nonSave("config.scan.ter.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
-    config.scan.ter.transmission = configElement_nonSave("config.scan.ter.transmission", configSelection, 0, ("Auto", "2K", "8K"))
-    config.scan.ter.guard = configElement_nonSave("config.scan.ter.guard", configSelection, 0, ("Auto", "1/4", "1/8", "1/16", "1/32"))
-    config.scan.ter.hierarchy = configElement_nonSave("config.scan.ter.hierarchy", configSelection, 0, ("Auto", "1", "2", "4"))
-    
-    config.scan.scansat = {}
-    for sat in nimmanager.satList:
-        #print sat[1]
-        config.scan.scansat[sat[1]] = configElement_nonSave("config.scan.scansat[" + str(sat[1]) + "]", configSelection, 0, ("yes", "no"))
-        
-    
\ No newline at end of file
index 3f5520b..8b55265 100644 (file)
@@ -4,6 +4,7 @@ from Components.ConfigList import ConfigList
 from Components.config import config
 from Components.config import getConfigListEntry
 from Components.Network import iNetwork
+from Components.Label import Label
 
 class NetworkSetup(Screen):
     def __init__(self, session):
@@ -31,6 +32,8 @@ class NetworkSetup(Screen):
         self["config"] = ConfigList(self.list)
         self.createSetup()
         
+        self["introduction"] = Label("Press OK to activate the settings.")
+        
     def createSetup(self):
         self.list = []
         
index e93f021..8f3c1e8 100644 (file)
@@ -4,6 +4,8 @@ from Components.ConfigList import ConfigList
 from Components.config import config
 from Components.config import getConfigListEntry
 from Components.NimManager import nimmanager
+from Components.Label import Label
+from Components.ScanSetup import InitScanSetup
 
 class ScanSetup(Screen):
     def __init__(self, session):
@@ -20,8 +22,11 @@ class ScanSetup(Screen):
         self.list = []
         self["config"] = ConfigList(self.list)
         self.createSetup()
+
+        self["introduction"] = Label("Press OK to start the scan")
         
     def createSetup(self):
+        #InitScanSetup()
         self.list = []
         
         self.list.append(getConfigListEntry("Type of scan", config.scan.type))
@@ -53,8 +58,12 @@ class ScanSetup(Screen):
                 self.list.append(getConfigListEntry("Hierarchy mode", config.scan.ter.hierarchy))
 
         # single satellite scan
+        print "NIM: ", config.scan.nims.value
+        print config.scan.satselection
         if (config.scan.type.value == 1):
-            pass
+            print config.scan.satselection[config.scan.nims.value]
+            self.list.append(getConfigListEntry("Satellite", config.scan.satselection[config.scan.nims.value]))
+            
         
         # multi sat scan
         if (config.scan.type.value == 2):