+ if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"]):
+ if currentConfigSelectionElement(config.scan.typeterrestrial) == "single_transponder":
+ self.list.append(getConfigListEntry(_("Frequency"), config.scan.ter.frequency))
+ self.list.append(getConfigListEntry(_("Inversion"), config.scan.ter.inversion))
+ self.list.append(getConfigListEntry(_("Bandwidth"), config.scan.ter.bandwidth))
+ self.list.append(getConfigListEntry(_("Code rate high"), config.scan.ter.fechigh))
+ self.list.append(getConfigListEntry(_("Code rate low"), config.scan.ter.feclow))
+ self.list.append(getConfigListEntry(_("Modulation"), config.scan.ter.modulation))
+ self.list.append(getConfigListEntry(_("Transmission mode"), config.scan.ter.transmission))
+ self.list.append(getConfigListEntry(_("Guard interval mode"), config.scan.ter.guard))
+ self.list.append(getConfigListEntry(_("Hierarchy mode"), config.scan.ter.hierarchy))
+ elif currentConfigSelectionElement(config.scan.typeterrestrial) == "complete":
+ pass
+
+ if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"] and currentConfigSelectionElement(config.scan.type) == "single_transponder") or \
+ (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"] and currentConfigSelectionElement(config.scan.typecable) == "single_transponder") or \
+ (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"] and currentConfigSelectionElement(config.scan.typeterrestrial) == "single_transponder"):
+ self.configElementSNR = getConfigListEntry(_("SNR"), config.scan.snr)
+ self.list.append(self.configElementSNR)
+ self.configElementACG = getConfigListEntry(_("AGC"), config.scan.agc)
+ self.list.append(self.configElementACG)
+ self.configElementBER = getConfigListEntry(_("BER"), config.scan.ber)
+ self.list.append(self.configElementBER)
+ self.statusTimer.start(500, False)
+ else:
+ self.statusTimer.stop()
+
+ self["config"].list = self.list
+ self["config"].l.setList(self.list)
+
+ def Satexists(self, tlist, pos):
+ for x in tlist:
+ if x == pos:
+ return 1
+ return 0
+
+ def newConfig(self):
+ print self["config"].getCurrent()
+ if self["config"].getCurrent() == self.typeOfScanEntry:
+ self.createSetup()
+ if self["config"].getCurrent() == self.tunerEntry:
+ self.createSetup()
+
+ def createConfig(self):
+ 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 transponder")), ("single_satellite", _("Single satellite")), ("multisat", _("Multisat"))))
+ config.scan.typecable = configElement_nonSave("config.scan.typecable", configSelection, 0, (("single_transponder", _("Single transponder")), ("complete", _("Complete"))))
+ config.scan.typeterrestrial = configElement_nonSave("config.scan.typeterrestrial", configSelection, 0, (("single_transponder", _("Single transponder")), ("complete", _("Complete"))))
+
+ nimList = [ ]
+ for nim in nimmanager.nimList():
+ nimList.append(nim[0])
+ #nimList.append("all")
+ config.scan.nims = configElement_nonSave("config.scan.nims", configSelection, 0, nimList)
+
+ # status
+ config.scan.snr = configElement_nonSave("config.scan.snr", configSlider, 0, (1, 100))
+ config.scan.snr.enabled = False
+ config.scan.agc = configElement_nonSave("config.scan.agc", configSlider, 0, (1, 100))
+ config.scan.agc.enabled = False
+ config.scan.ber = configElement_nonSave("config.scan.ber", configSlider, 0, (1, 100))
+ config.scan.ber.enabled = False
+
+ # sat
+ config.scan.sat.frequency = configElement_nonSave("config.scan.sat.frequency", configSequence, [11836], configsequencearg.get("INTEGER", (1, 99999)))
+ config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), _("Auto")))
+ config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 99999)))
+ config.scan.sat.polarization = configElement_nonSave("config.scan.sat.polarization", configSelection, 0, (("horizontal", _("horizontal")), ("vertical", _("vertical")), ("circular_left", _("circular left")), ("circular_right", _("circular right"))))
+ config.scan.sat.fec = configElement_nonSave("config.scan.sat.fec", configSelection, 7, (("auto", _("Auto")), ("1_2", "1/2"), ("2_3", "2/3"), ("3_4", "3/4"), ("5_6", "5/6"), ("7_8", "7/8"), ("none", _("None"))))
+
+ # cable
+ config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (50, 999)))
+ config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), ("auto", _("Auto"))))
+ config.scan.cab.modulation = configElement_nonSave("config.scan.cab.modulation", configSelection, 0, (("auto", _("Auto")), ("16qam", "16-QAM"), ("32qam", "32-QAM"), ("64qam", "64-QAM"), ("128qam", "128-QAM"), ("256qam", "256-QAM")))
+ config.scan.cab.fec = configElement_nonSave("config.scan.cab.fec", configSelection, 0, (("auto", _("Auto")), ("1_2", "1/2"), ("2_3", "2/3"), ("3_4", "3/4"), ("5_6", "5/6"), ("7_8", "7/8"), ("8_9", "8/9"), ("none", _("None"))))
+ config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 9999)))
+ config.scan.cab.networkScan = configElement_nonSave("config.scan.cab.networkScan", configSelection, 0, (("no", _("no")), ("yes", _("yes"))))
+
+ # terrestial
+ config.scan.ter.frequency = configElement_nonSave("config.scan.ter.frequency", configSequence, [466], configsequencearg.get("INTEGER", (100, 900)))
+ config.scan.ter.inversion = configElement_nonSave("config.scan.ter.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), ("auto", _("Auto"))))
+ config.scan.ter.bandwidth = configElement_nonSave("config.scan.ter.bandwidth", configSelection, 3, (("8MHz", "8MHz"), ("7MHz", "7MHz"), ("6MHz", "6MHz"), ("auto", _("Auto"))))
+ config.scan.ter.fechigh = configElement_nonSave("config.scan.ter.fechigh", configSelection, 6, (("none", _("None")), "1/2", "2/3", "3/4", "5/6", "7/8", _("Auto")))
+ config.scan.ter.feclow = configElement_nonSave("config.scan.ter.feclow", configSelection, 6, (_("None"), ("1_2", "1/2"), ("2_3", "2/3"), ("3_4", "3/4"), ("5_6", "5/6"), ("7_8", "7/8"), ("auto", _("Auto"))))
+ config.scan.ter.modulation = configElement_nonSave("config.scan.ter.modulation", configSelection, 2, (("qpsk", "QPSK"), ("qam16", "QAM16"), ("auto", _("Auto"))))
+ config.scan.ter.transmission = configElement_nonSave("config.scan.ter.transmission", configSelection, 2, (("2k", "2K"), ("8k", "8K"), ("auto", _("Auto"))))
+ config.scan.ter.guard = configElement_nonSave("config.scan.ter.guard", configSelection, 4, (("1_32", "1/32"), ("1_16", "1/16"), ("1_8", "1/8"), ("1_4", "1/4"), ("auto", _("Auto"))))
+ config.scan.ter.hierarchy = configElement_nonSave("config.scan.ter.hierarchy", configSelection, 4, (("none", _("None")), ("1", "1"), ("2", "2"), ("4", "4"), ("auto", _("Auto"))))
+
+ 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", _("yes")), ("no", _("no"))))
+
+ config.scan.satselection = []
+ slotid = 0
+ for slot in nimmanager.nimslots:
+ if (nimmanager.getNimType(slot.slotid) == nimmanager.nimType["DVB-S"]):
+ print str(slot.slotid) + " : " + str(self.satList)
+ config.scan.satselection.append(configElement_nonSave("config.scan.satselection[" + str(slot.slotid) + "]", configSatlist, 0, self.satList[slot.slotid]))
+ else:
+ config.scan.satselection.append(None)
+ def keyLeft(self):
+ self["config"].handleKey(config.key["prevElement"])
+ self.newConfig()
+
+ def keyRight(self):
+ self["config"].handleKey(config.key["nextElement"])
+ self.newConfig()
+
+ def updateStatus(self):
+ print "updatestatus"
+
+ def keyNumberGlobal(self, number):
+ print "You pressed number " + str(number)
+ if (self["config"].getCurrent()[1].parent.enabled == True):
+ self["config"].handleKey(config.key[str(number)])
+
+ def addSatTransponder(self, tlist, frequency, symbol_rate, polarisation, fec, inversion, orbital_position):
+ print "Add Sat: frequ: " + str(frequency) + " symbol: " + str(symbol_rate) + " pol: " + str(polarisation) + " fec: " + str(fec) + " inversion: " + str(inversion)
+ print "orbpos: " + str(orbital_position)
+ parm = eDVBFrontendParametersSatellite()
+ parm.frequency = frequency * 1000
+ parm.symbol_rate = symbol_rate * 1000
+ parm.polarisation = polarisation # eDVBFrontendParametersSatellite.Polarisation.Verti
+ parm.fec = fec # eDVBFrontendParametersSatellite.FEC.f3_4;
+ #parm.fec = 6 # AUTO
+ parm.inversion = inversion #eDVBFrontendParametersSatellite.Inversion.Off;
+ #parm.inversion = 2 #AUTO
+ parm.orbital_position = int(orbital_position)
+ tlist.append(parm)
+
+ # FIXME use correct parameters
+ def addCabTransponder(self, tlist, frequency, symbol_rate, modulation, fec, inversion):
+ print "Add Cab: frequ: " + str(frequency) + " symbol: " + str(symbol_rate) + " pol: " + str(modulation) + " fec: " + str(fec) + " inversion: " + str(inversion)
+ parm = eDVBFrontendParametersCable()
+ parm.frequency = frequency * 1000
+ parm.symbol_rate = symbol_rate * 1000
+ parm.modulation = modulation # modulation # eDVBFrontendParametersSatellite.Polarisation.Verti
+ parm.fec = fec # eDVBFrontendParametersSatellite.FEC.f3_4;
+ #parm.fec = 6 # AUTO
+ parm.inversion = inversion #eDVBFrontendParametersSatellite.Inversion.Off;
+ #parm.inversion = 2 #AUTO
+ tlist.append(parm)
+
+ # FIXME use correct parameters
+ def addTerTransponder(self, tlist, frequency):
+ parm = eDVBFrontendParametersTerrestrial()