1 from Screen import Screen
2 from ServiceScan import *
3 from Components.config import *
4 from Components.ActionMap import NumberActionMap
5 from Components.ConfigList import ConfigList
6 from Components.NimManager import nimmanager
7 from Components.Label import Label
8 from enigma import eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial
10 def buildTerTransponder(frequency,
11 inversion=2, bandwidth = 3, fechigh = 6, feclow = 6,
12 modulation = 2, transmission = 2, guard = 4,
14 # WARNING: normally, enums are working directly.
15 # Don't copy this (very bad)!! Instead either fix swig (good) or
16 # move this into a central place.
56 parm = eDVBFrontendParametersTerrestrial()
58 parm.frequency = frequency
60 parm.inversion = [Off, On, Unknown][inversion]
61 parm.bandwidth = [Bw8MHz, Bw7MHz, Bw6MHz, BwAuto][bandwidth] # Bw5MHz unsupported
62 parm.code_rate_HP = [fAuto, f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][fechigh]
63 parm.code_rate_LP = [fAuto, f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][feclow]
64 parm.modulation = [QPSK, QAM16, Auto][modulation] # QAM64 unsupported
65 parm.transmission_mode = [TM2k, TM8k, TMAuto][transmission] # TM4k unsupported
66 parm.guard_interval = [GI_1_32, GI_1_16, GI_1_8, GI_1_4, GI_Auto][guard]
67 parm.hierarchy = [HNone, H1, H2, H4, HAuto][hierarchy]
71 def getInitialTransponderList(tlist, pos):
72 list = nimmanager.getTransponders(pos)
76 parm = eDVBFrontendParametersSatellite()
78 parm.symbol_rate = x[2]
79 parm.polarisation = x[3]#lookup_sat_polarisation[x[3]] # eDVBFrontendParametersSatellite.Polarisation.Vertical
80 parm.fec = x[4] # eDVBFrontendParametersSatellite.FEC.f3_4;
82 #parm.inversion = 1 #eDVBFrontendParametersSatellite.Inversion.Off;
83 parm.inversion = 2 #AUTO
84 parm.orbital_position = pos
87 def getInitialCableTransponderList(tlist, cable):
88 list = nimmanager.getTranspondersCable(cable)
92 parm = eDVBFrontendParametersCable()
94 parm.symbol_rate = x[2]
95 parm.modulation = x[3] # AUTO
96 parm.fec_inner = x[4] # AUTO
97 parm.inversion = 2 # AUTO
100 def getInitialTerrestrialTransponderList(tlist, region):
101 list = nimmanager.getTranspondersTerrestrial(region)
104 # inversion=2, bandwidth = 3, fechigh = 6, feclow = 6,
105 # modulation = 2, transmission = 2, guard = 4,
109 #self.transponders[self.parsedTer].append((2, freq, bw, const, crh, crl, guard, transm, hierarchy, inv))
110 if x[0] == 2: #TERRESTRIAL
111 # FIXME: we need to convert the other parameters...
113 # convert terrestrial.xml bandwidth to our enum
115 bandwidth = [1, 0][x[2]]
119 parm = buildTerTransponder(x[1], bandwidth = [1, 0][x[2]])
123 class ScanSetup(Screen):
124 def __init__(self, session):
125 Screen.__init__(self, session)
131 self["actions"] = NumberActionMap(["SetupActions"],
134 "cancel": self.keyCancel,
135 "left": self.keyLeft,
136 "right": self.keyRight,
137 "1": self.keyNumberGlobal,
138 "2": self.keyNumberGlobal,
139 "3": self.keyNumberGlobal,
140 "4": self.keyNumberGlobal,
141 "5": self.keyNumberGlobal,
142 "6": self.keyNumberGlobal,
143 "7": self.keyNumberGlobal,
144 "8": self.keyNumberGlobal,
145 "9": self.keyNumberGlobal,
146 "0": self.keyNumberGlobal
149 self.statusTimer = eTimer()
150 self.statusTimer.timeout.get().append(self.updateStatus)
151 #self.statusTimer.start(5000, True)
154 self["config"] = ConfigList(self.list)
157 self["introduction"] = Label(_("Press OK to start the scan"))
162 def updateSatList(self):
164 for slot in nimmanager.nimslots:
165 if (nimmanager.getNimType(slot.slotid) == nimmanager.nimType["DVB-S"]):
166 self.satList.append(nimmanager.getSatListForNim(slot.slotid))
168 self.satList.append(None)
170 def createSetup(self):
172 self.multiscanlist = []
173 print "ID: " + str(config.scan.nims.value)
175 self.tunerEntry = getConfigListEntry(_("Tuner"), config.scan.nims)
176 self.list.append(self.tunerEntry)
178 self.typeOfScanEntry = None
179 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"]):
180 self.typeOfScanEntry = getConfigListEntry(_("Type of scan"), config.scan.type)
181 self.list.append(self.typeOfScanEntry)
182 elif (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"]):
183 self.typeOfScanEntry = getConfigListEntry(_("Type of scan"), config.scan.typecable)
184 self.list.append(self.typeOfScanEntry)
185 elif (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"]):
186 self.typeOfScanEntry = getConfigListEntry(_("Type of scan"), config.scan.typeterrestrial)
187 self.list.append(self.typeOfScanEntry)
190 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"]):
192 if currentConfigSelectionElement(config.scan.type) == "single_transponder":
193 self.list.append(getConfigListEntry(_('Satellite'), config.scan.satselection[config.scan.nims.value]))
194 self.list.append(getConfigListEntry(_('Frequency'), config.scan.sat.frequency))
195 self.list.append(getConfigListEntry(_('Inversion'), config.scan.sat.inversion))
196 self.list.append(getConfigListEntry(_('Symbol Rate'), config.scan.sat.symbolrate))
197 self.list.append(getConfigListEntry(_("Polarity"), config.scan.sat.polarization))
198 self.list.append(getConfigListEntry(_("FEC"), config.scan.sat.fec))
199 elif currentConfigSelectionElement(config.scan.type) == "single_satellite":
201 print config.scan.satselection[config.scan.nims.value]
202 self.list.append(getConfigListEntry(_("Satellite"), config.scan.satselection[config.scan.nims.value]))
203 elif currentConfigSelectionElement(config.scan.type) == "multisat":
206 SatList = nimmanager.getSatListForNim(config.scan.nims.value)
209 if self.Satexists(tlist, x[1]) == 0:
211 sat = configElement_nonSave(x[1], configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))))
212 configEntry = getConfigListEntry(nimmanager.getSatDescription(x[1]), sat)
213 self.list.append(configEntry)
214 self.multiscanlist.append(configEntry)
216 # for sat in nimmanager.satList:
217 # self.list.append(getConfigListEntry(sat[0], config.scan.scansat[sat[1]]))
220 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"]):
221 if currentConfigSelectionElement(config.scan.typecable) == "single_transponder":
222 self.list.append(getConfigListEntry(_("Frequency"), config.scan.cab.frequency))
223 self.list.append(getConfigListEntry(_("Inversion"), config.scan.cab.inversion))
224 self.list.append(getConfigListEntry(_("Symbol Rate"), config.scan.cab.symbolrate))
225 self.list.append(getConfigListEntry(_("Modulation"), config.scan.cab.modulation))
226 self.list.append(getConfigListEntry(_("FEC"), config.scan.cab.fec))
227 self.list.append(getConfigListEntry(_("Network scan"), config.scan.cab.networkScan))
228 elif currentConfigSelectionElement(config.scan.typecable) == "complete":
231 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"]):
232 if currentConfigSelectionElement(config.scan.typeterrestrial) == "single_transponder":
233 self.list.append(getConfigListEntry(_("Frequency"), config.scan.ter.frequency))
234 self.list.append(getConfigListEntry(_("Network scan"), config.scan.ter.networkScan))
235 self.list.append(getConfigListEntry(_("Inversion"), config.scan.ter.inversion))
236 self.list.append(getConfigListEntry(_("Bandwidth"), config.scan.ter.bandwidth))
237 self.list.append(getConfigListEntry(_("Code rate high"), config.scan.ter.fechigh))
238 self.list.append(getConfigListEntry(_("Code rate low"), config.scan.ter.feclow))
239 self.list.append(getConfigListEntry(_("Modulation"), config.scan.ter.modulation))
240 self.list.append(getConfigListEntry(_("Transmission mode"), config.scan.ter.transmission))
241 self.list.append(getConfigListEntry(_("Guard interval mode"), config.scan.ter.guard))
242 self.list.append(getConfigListEntry(_("Hierarchy mode"), config.scan.ter.hierarchy))
243 elif currentConfigSelectionElement(config.scan.typeterrestrial) == "complete":
246 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"] and currentConfigSelectionElement(config.scan.type) == "single_transponder") or \
247 (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"] and currentConfigSelectionElement(config.scan.typecable) == "single_transponder") or \
248 (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"] and currentConfigSelectionElement(config.scan.typeterrestrial) == "single_transponder"):
249 self.configElementSNR = getConfigListEntry(_("SNR"), config.scan.snr)
250 self.list.append(self.configElementSNR)
251 self.configElementACG = getConfigListEntry(_("AGC"), config.scan.agc)
252 self.list.append(self.configElementACG)
253 self.configElementBER = getConfigListEntry(_("BER"), config.scan.ber)
254 self.list.append(self.configElementBER)
255 self.statusTimer.start(500, False)
257 self.statusTimer.stop()
259 self["config"].list = self.list
260 self["config"].l.setList(self.list)
262 def Satexists(self, tlist, pos):
269 print self["config"].getCurrent()
270 if self["config"].getCurrent() == self.typeOfScanEntry:
272 if self["config"].getCurrent() == self.tunerEntry:
275 def createConfig(self):
276 config.scan = ConfigSubsection()
277 config.scan.sat = ConfigSubsection()
278 config.scan.cab = ConfigSubsection()
279 config.scan.ter = ConfigSubsection()
281 config.scan.type = configElement_nonSave("config.scan.type", configSelection, 0, (("single_transponder", _("Single transponder")), ("single_satellite", _("Single satellite")), ("multisat", _("Multisat"))))
282 config.scan.typecable = configElement_nonSave("config.scan.typecable", configSelection, 0, (("single_transponder", _("Single transponder")), ("complete", _("Complete"))))
283 config.scan.typeterrestrial = configElement_nonSave("config.scan.typeterrestrial", configSelection, 0, (("single_transponder", _("Single transponder")), ("complete", _("Complete"))))
286 for nim in nimmanager.nimList():
287 nimList.append(nim[0])
288 #nimList.append("all")
289 config.scan.nims = configElement_nonSave("config.scan.nims", configSelection, 0, nimList)
292 config.scan.snr = configElement_nonSave("config.scan.snr", configSlider, 0, (1, 100))
293 config.scan.snr.enabled = False
294 config.scan.agc = configElement_nonSave("config.scan.agc", configSlider, 0, (1, 100))
295 config.scan.agc.enabled = False
296 config.scan.ber = configElement_nonSave("config.scan.ber", configSlider, 0, (1, 100))
297 config.scan.ber.enabled = False
300 config.scan.sat.frequency = configElement_nonSave("config.scan.sat.frequency", configSequence, [11836], configsequencearg.get("INTEGER", (1, 99999)))
301 config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), _("Auto")))
302 config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 99999)))
303 config.scan.sat.polarization = configElement_nonSave("config.scan.sat.polarization", configSelection, 0, (("horizontal", _("horizontal")), ("vertical", _("vertical")), ("circular_left", _("circular left")), ("circular_right", _("circular right"))))
304 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"))))
307 config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (50, 999)))
308 config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), ("auto", _("Auto"))))
309 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")))
310 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"))))
311 config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 9999)))
312 config.scan.cab.networkScan = configElement_nonSave("config.scan.cab.networkScan", configSelection, 0, (("no", _("no")), ("yes", _("yes"))))
315 config.scan.ter.frequency = configElement_nonSave("config.scan.ter.frequency", configSequence, [466], configsequencearg.get("INTEGER", (100, 900)))
316 config.scan.ter.inversion = configElement_nonSave("config.scan.ter.inversion", configSelection, 2, (("off", _("off")), ("on", _("on")), ("auto", _("Auto"))))
317 # WORKAROUND: we can't use BW-auto
318 config.scan.ter.bandwidth = configElement_nonSave("config.scan.ter.bandwidth", configSelection, 0, (("8MHz", "8MHz"), ("7MHz", "7MHz"), ("6MHz", "6MHz")))
319 #, ("auto", _("Auto"))))
320 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")))
321 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"))))
322 config.scan.ter.modulation = configElement_nonSave("config.scan.ter.modulation", configSelection, 2, (("qpsk", "QPSK"), ("qam16", "QAM16"), ("auto", _("Auto"))))
323 config.scan.ter.transmission = configElement_nonSave("config.scan.ter.transmission", configSelection, 2, (("2k", "2K"), ("8k", "8K"), ("auto", _("Auto"))))
324 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"))))
325 config.scan.ter.hierarchy = configElement_nonSave("config.scan.ter.hierarchy", configSelection, 4, (("none", _("None")), ("1", "1"), ("2", "2"), ("4", "4"), ("auto", _("Auto"))))
326 config.scan.ter.networkScan = configElement_nonSave("config.scan.cab.networkScan", configSelection, 0, (("no", _("no")), ("yes", _("yes"))))
328 config.scan.scansat = {}
329 for sat in nimmanager.satList:
331 config.scan.scansat[sat[1]] = configElement_nonSave("config.scan.scansat[" + str(sat[1]) + "]", configSelection, 0, (("yes", _("yes")), ("no", _("no"))))
333 config.scan.satselection = []
335 for slot in nimmanager.nimslots:
336 if (nimmanager.getNimType(slot.slotid) == nimmanager.nimType["DVB-S"]):
337 print str(slot.slotid) + " : " + str(self.satList)
338 config.scan.satselection.append(configElement_nonSave("config.scan.satselection[" + str(slot.slotid) + "]", configSatlist, 0, self.satList[slot.slotid]))
340 config.scan.satselection.append(None)
342 self["config"].handleKey(config.key["prevElement"])
346 self["config"].handleKey(config.key["nextElement"])
349 def updateStatus(self):
352 def keyNumberGlobal(self, number):
353 print "You pressed number " + str(number)
354 if (self["config"].getCurrent()[1].parent.enabled == True):
355 self["config"].handleKey(config.key[str(number)])
357 def addSatTransponder(self, tlist, frequency, symbol_rate, polarisation, fec, inversion, orbital_position):
358 print "Add Sat: frequ: " + str(frequency) + " symbol: " + str(symbol_rate) + " pol: " + str(polarisation) + " fec: " + str(fec) + " inversion: " + str(inversion)
359 print "orbpos: " + str(orbital_position)
360 parm = eDVBFrontendParametersSatellite()
361 parm.frequency = frequency * 1000
362 parm.symbol_rate = symbol_rate * 1000
363 parm.polarisation = polarisation # eDVBFrontendParametersSatellite.Polarisation.Verti
364 parm.fec = fec # eDVBFrontendParametersSatellite.FEC.f3_4;
366 parm.inversion = inversion #eDVBFrontendParametersSatellite.Inversion.Off;
367 #parm.inversion = 2 #AUTO
368 parm.orbital_position = int(orbital_position)
371 # FIXME use correct parameters
372 def addCabTransponder(self, tlist, frequency, symbol_rate, modulation, fec, inversion):
373 print "Add Cab: frequ: " + str(frequency) + " symbol: " + str(symbol_rate) + " pol: " + str(modulation) + " fec: " + str(fec) + " inversion: " + str(inversion)
374 parm = eDVBFrontendParametersCable()
375 parm.frequency = frequency * 1000
376 parm.symbol_rate = symbol_rate * 1000
377 parm.modulation = modulation # modulation # eDVBFrontendParametersSatellite.Polarisation.Verti
378 parm.fec = fec # eDVBFrontendParametersSatellite.FEC.f3_4;
380 parm.inversion = inversion #eDVBFrontendParametersSatellite.Inversion.Off;
381 #parm.inversion = 2 #AUTO
384 def addTerTransponder(self, tlist, *args, **kwargs):
385 tlist.append(buildTerTransponder(*args, **kwargs))
390 if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"]):
391 if currentConfigSelectionElement(config.scan.type) == "single_transponder":
393 self.addSatTransponder(tlist, config.scan.sat.frequency.value[0],
394 config.scan.sat.symbolrate.value[0],
395 config.scan.sat.polarization.value,
396 config.scan.sat.fec.value,
397 config.scan.sat.inversion.value,
398 self.satList[config.scan.nims.value][config.scan.satselection[config.scan.nims.value].value][1])
399 elif currentConfigSelectionElement(config.scan.type) == "single_satellite":
400 getInitialTransponderList(tlist, int(self.satList[config.scan.nims.value][config.scan.satselection[config.scan.nims.value].value][1]))
401 flags |= eComponentScan.scanNetworkSearch
403 elif currentConfigSelectionElement(config.scan.type) == "multisat":
404 SatList = nimmanager.getSatListForNim(config.scan.nims.value)
406 for x in self.multiscanlist:
407 if x[1].parent.value == 0:
408 print " " + str(x[1].parent.configPath)
409 getInitialTransponderList(tlist, x[1].parent.configPath)
410 flags |= eComponentScan.scanNetworkSearch
412 elif (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"]):
413 if currentConfigSelectionElement(config.scan.typecable) == "single_transponder":
414 self.addCabTransponder(tlist, config.scan.cab.frequency.value[0],
415 config.scan.cab.symbolrate.value[0],
416 config.scan.cab.modulation.value,
417 config.scan.cab.fec.value,
418 config.scan.cab.inversion.value)
419 if currentConfigSelectionElement(config.scan.cab.networkScan) == "yes":
420 flags |= eComponentScan.scanNetworkSearch
421 elif currentConfigSelectionElement(config.scan.typecable) == "complete":
422 getInitialCableTransponderList(tlist, nimmanager.getCableDescription(config.scan.nims.value))
423 flags |= eComponentScan.scanNetworkSearch
425 elif (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"]):
426 if currentConfigSelectionElement(config.scan.typeterrestrial) == "single_transponder":
427 self.addTerTransponder(tlist,
428 config.scan.ter.frequency.value[0] * 1000000,
429 inversion = config.scan.ter.inversion.value,
430 bandwidth = config.scan.ter.bandwidth.value,
431 fechigh = config.scan.ter.fechigh.value,
432 feclow = config.scan.ter.feclow.value,
433 modulation = config.scan.ter.modulation.value,
434 transmission = config.scan.ter.transmission.value,
435 guard = config.scan.ter.guard.value,
436 hierarchy = config.scan.ter.hierarchy.value)
437 if currentConfigSelectionElement(config.scan.ter.networkScan) == "yes":
438 flags |= eComponentScan.scanNetworkSearch
439 elif currentConfigSelectionElement(config.scan.typeterrestrial) == "complete":
440 getInitialTerrestrialTransponderList(tlist, nimmanager.getTerrestrialDescription(config.scan.nims.value))
441 flags |= eComponentScan.scanNetworkSearch
443 for x in self["config"].list:
446 feid = config.scan.nims.value
447 # flags |= eComponentScan.scanSearchBAT
448 self.session.openWithCallback(self.doNothing, ServiceScan, [{"transponders": tlist, "feid": feid, "flags": flags}])
455 for x in self["config"].list:
459 class ScanSimple(Screen):
465 if nimmanager.getNimType(0) == nimmanager.nimType["DVB-S"] and nimmanager.getNimType(0) == nimmanager.getNimType(1):
466 sec = eDVBSatelliteEquipmentControl.getInstance()
468 exclusive_satellites = sec.get_exclusive_satellites(0,1)
470 exclusive_satellites = [0,0]
471 print "exclusive satellites", exclusive_satellites
472 two_sat_tuners = True
474 two_sat_tuners = False
477 slotid = x[1].parent.configPath
478 print "Scan Tuner", slotid, "-", currentConfigSelectionElement(x[1].parent)
479 if currentConfigSelectionElement(x[1].parent) == "yes":
481 if nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-S"]:
484 idx = exclusive_satellites[0]+1
487 exclusive_nim_sats = exclusive_satellites[idx+1:idx+1+exclusive_satellites[idx]]
488 print "exclusive_nim_sats", exclusive_nim_sats
489 SatList = nimmanager.getSatListForNim(slotid)
491 if not two_sat_tuners or (sat[1] in exclusive_nim_sats or slotid == 0):
493 getInitialTransponderList(tlist, sat[1])
494 elif nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-C"]:
495 getInitialCableTransponderList(tlist, nimmanager.getCableDescription(slotid))
496 elif nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-T"]:
497 getInitialTerrestrialTransponderList(tlist, nimmanager.getTerrestrialDescription(slotid))
498 scanList.append({"transponders": tlist, "feid": slotid, "flags": eComponentScan.scanNetworkSearch})
499 self.session.openWithCallback(self.doNothing, ServiceScan, scanList = scanList)
508 self["config"].handleKey(config.key["prevElement"])
511 self["config"].handleKey(config.key["nextElement"])
513 def Satexists(self, tlist, pos):
519 def ScanNimTwoNeeded(self):
520 if nimmanager.getNimType(0) != nimmanager.getNimType(1):
522 if nimmanager.getNimType(0) == nimmanager.nimType["DVB-S"]: #two dvb-s nims
523 if nimmanager.getNimConfigMode(1) in ["loopthrough", "satposdepends", "equal", "nothing"]:
525 sec = eDVBSatelliteEquipmentControl.getInstance()
527 exclusive_satellites = sec.get_exclusive_satellites(0,1)
528 if len(exclusive_satellites) == 0:
532 def __init__(self, session):
533 Screen.__init__(self, session)
535 self["actions"] = ActionMap(["SetupActions"],
538 "cancel": self.keyCancel,
539 "left": self.keyLeft,
540 "right": self.keyRight,
546 nimcount = nimmanager.getNimSocketCount()
548 nim = configElement_nonSave(0, configSelection, 0,(("yes", _("yes")),("no", _("no"))))
549 self.list.append(getConfigListEntry(_("Scan NIM") + " 0 (" + nimmanager.getNimTypeName(0) + ")", nim))
550 if nimcount > 1 and self.ScanNimTwoNeeded():
551 nim = configElement_nonSave(1, configSelection, 0, (("yes", _("yes")), ("no", _("no"))))
552 self.list.append(getConfigListEntry(_("Scan NIM") + " 1 (" + nimmanager.getNimTypeName(1) + ")", nim))
554 self["config"] = ConfigList(self.list)
555 self["header"] = Label(_("Automatic Scan"))
556 self["footer"] = Label(_("Press OK to scan"))