95e476718a43ccfc4b2a014d269630f6ec5f34d9
[enigma2.git] / lib / python / Components / ScanSetup.py
1 from config import *
2 from Components.NimManager import nimmanager
3
4 def InitScanSetup():
5     config.scan = ConfigSubsection()
6     config.scan.sat = ConfigSubsection()
7     config.scan.cab = ConfigSubsection()
8     config.scan.ter = ConfigSubsection()
9     config.scan.type = configElement_nonSave("config.scan.type", configSelection, 0, ("Single transponder", "Single satellite", "Multisat"))
10     nimList = [ ]
11     for nim in nimmanager.nimList():
12         nimList.append(nim[0])
13     nimList.append("all")
14     config.scan.nims = configElement_nonSave("config.scan.nims", configSelection, 0, nimList)
15     
16     # sat
17     config.scan.sat.frequency = configElement_nonSave("config.scan.sat.frequency", configSequence, [12187], configsequencearg.get("INTEGER", (10000, 14000)))
18     config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 0, ("off", "on"))
19     config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 30000)))
20     config.scan.sat.polarzation = configElement_nonSave("config.scan.sat.polarzation", configSelection, 0, ("horizontal", "vertical"))
21     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"))
22
23     # cable
24     config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (10000, 14000)))
25     config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 0, ("off", "on"))
26     config.scan.cab.modulation = configElement_nonSave("config.scan.cab.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
27     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"))
28     config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 30000)))
29     
30     # terrestial
31     config.scan.ter.frequency = configElement_nonSave("config.scan.ter.frequency", configSequence, [466], configsequencearg.get("INTEGER", (10000, 14000)))
32     config.scan.ter.inversion = configElement_nonSave("config.scan.ter.inversion", configSelection, 0, ("off", "on"))
33     config.scan.ter.bandwidth = configElement_nonSave("config.scan.ter.bandwidth", configSelection, 0, ("Auto", "6 MHz", "7MHz", "8MHz"))
34     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"))
35     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"))
36     config.scan.ter.modulation = configElement_nonSave("config.scan.ter.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
37     config.scan.ter.transmission = configElement_nonSave("config.scan.ter.transmission", configSelection, 0, ("Auto", "2K", "8K"))
38     config.scan.ter.guard = configElement_nonSave("config.scan.ter.guard", configSelection, 0, ("Auto", "1/4", "1/8", "1/16", "1/32"))
39     config.scan.ter.hierarchy = configElement_nonSave("config.scan.ter.hierarchy", configSelection, 0, ("Auto", "1", "2", "4"))
40     
41     config.scan.scansat = {}
42     for sat in nimmanager.satList:
43         #print sat[1]
44         config.scan.scansat[sat[1]] = configElement_nonSave("config.scan.scansat[" + str(sat[1]) + "]", configSelection, 0, ("yes", "no"))
45         
46