1 from enigma import eDVBDB
2 from Screen import Screen
3 from Components.SystemInfo import SystemInfo
4 from Components.ActionMap import ActionMap
5 from Components.ConfigList import ConfigListScreen
6 from Components.MenuList import MenuList
7 from Components.NimManager import nimmanager
8 from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement,\
10 from Components.Sources.List import List
11 from Screens.MessageBox import MessageBox
12 from Screens.ChoiceBox import ChoiceBox
14 from time import mktime, localtime
15 from datetime import datetime
17 class NimSetup(Screen, ConfigListScreen):
18 def createSimpleSetup(self, list, mode):
21 list.append(getConfigListEntry(_("Satellite"), nim.diseqcA))
22 list.append(getConfigListEntry(_("Send DiSEqC"), nim.simpleSingleSendDiSEqC))
24 list.append(getConfigListEntry(_("Port A"), nim.diseqcA))
26 if mode in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
27 list.append(getConfigListEntry(_("Port B"), nim.diseqcB))
28 if mode == "diseqc_a_b_c_d":
29 list.append(getConfigListEntry(_("Port C"), nim.diseqcC))
30 list.append(getConfigListEntry(_("Port D"), nim.diseqcD))
31 if mode != "toneburst_a_b":
32 list.append(getConfigListEntry(_("Set Voltage and 22KHz"), nim.simpleDiSEqCSetVoltageTone))
33 list.append(getConfigListEntry(_("Send DiSEqC only on satellite change"), nim.simpleDiSEqCOnlyOnSatChange))
35 def createPositionerSetup(self, list):
37 list.append(getConfigListEntry(_("Longitude"), nim.longitude))
38 list.append(getConfigListEntry(" ", nim.longitudeOrientation))
39 list.append(getConfigListEntry(_("Latitude"), nim.latitude))
40 list.append(getConfigListEntry(" ", nim.latitudeOrientation))
41 if SystemInfo["CanMeasureFrontendInputPower"]:
42 self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), nim.powerMeasurement)
43 list.append(self.advancedPowerMeasurement)
44 if nim.powerMeasurement.value:
45 list.append(getConfigListEntry(_("Power threshold in mA"), nim.powerThreshold))
46 self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), nim.turningSpeed)
47 list.append(self.turningSpeed)
48 if nim.turningSpeed.value == "fast epoch":
49 self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), nim.fastTurningBegin)
50 self.turnFastEpochEnd = getConfigListEntry(_("End time"), nim.fastTurningEnd)
51 list.append(self.turnFastEpochBegin)
52 list.append(self.turnFastEpochEnd)
54 if nim.powerMeasurement.value:
55 nim.powerMeasurement.value = False
56 nim.powerMeasurement.save()
58 def createConfigMode(self):
59 if self.nim.isCompatible("DVB-S"):
60 choices = { "nothing": _("nothing connected"),
61 "simple": _("simple"),
62 "advanced": _("advanced")}
63 #if len(nimmanager.getNimListOfType(nimmanager.getNimType(self.slotid), exception = x)) > 0:
64 # choices["equal"] = _("equal to")
65 # choices["satposdepends"] = _("second cable of motorized LNB")
66 if len(nimmanager.canEqualTo(self.slotid)) > 0:
67 choices["equal"] = _("equal to")
68 if len(nimmanager.canDependOn(self.slotid)) > 0:
69 choices["satposdepends"] = _("second cable of motorized LNB")
70 if len(nimmanager.canConnectTo(self.slotid)) > 0:
71 choices["loopthrough"] = _("loopthrough to")
72 self.nimConfig.configMode.setChoices(choices, default = "nothing")
74 def createSetup(self):
75 print "Creating setup"
78 self.configMode = None
79 self.diseqcModeEntry = None
80 self.advancedSatsEntry = None
81 self.advancedLnbsEntry = None
82 self.advancedDiseqcMode = None
83 self.advancedUsalsEntry = None
84 self.advancedLof = None
85 self.advancedPowerMeasurement = None
86 self.turningSpeed = None
87 self.turnFastEpochBegin = None
88 self.turnFastEpochEnd = None
89 self.uncommittedDiseqcCommand = None
90 self.cableScanType = None
91 self.have_advanced = False
92 self.advancedUnicable = None
93 self.advancedType = None
94 self.advancedManufacturer = None
95 self.advancedSCR = None
97 if self.nim.isCompatible("DVB-S"):
98 self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
99 self.list.append(self.configMode)
101 if self.nimConfig.configMode.value == "simple": #simple setup
102 self.diseqcModeEntry = getConfigListEntry(_("Mode"), self.nimConfig.diseqcMode)
103 self.list.append(self.diseqcModeEntry)
104 if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
105 self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
106 if self.nimConfig.diseqcMode.value == "positioner":
107 self.createPositionerSetup(self.list)
108 elif self.nimConfig.configMode.value == "equal":
110 nimlist = nimmanager.canEqualTo(self.nim.slot)
112 #choices.append((str(id), str(chr(65 + id))))
113 choices.append((str(id), nimmanager.getNimDescription(id)))
114 self.nimConfig.connectedTo.setChoices(choices)
115 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
116 self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
117 elif self.nimConfig.configMode.value == "satposdepends":
119 nimlist = nimmanager.canDependOn(self.nim.slot)
121 #choices.append((str(id), str(chr(65 + id))))
122 choices.append((str(id), nimmanager.getNimDescription(id)))
123 self.nimConfig.connectedTo.setChoices(choices)
124 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
125 self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
126 elif self.nimConfig.configMode.value == "loopthrough":
128 print "connectable to:", nimmanager.canConnectTo(self.slotid)
129 connectable = nimmanager.canConnectTo(self.slotid)
130 for id in connectable:
131 choices.append((str(id), nimmanager.getNimDescription(id)))
132 self.nimConfig.connectedTo.setChoices(choices)
133 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
134 self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
135 elif self.nimConfig.configMode.value == "nothing":
137 elif self.nimConfig.configMode.value == "advanced": # advanced
139 self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
140 self.list.append(self.advancedSatsEntry)
141 cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
142 satlist = self.nimConfig.advanced.sat.keys()
143 if cur_orb_pos is not None:
144 if cur_orb_pos not in satlist:
145 cur_orb_pos = satlist[0]
146 currSat = self.nimConfig.advanced.sat[cur_orb_pos]
147 self.fillListWithAdvancedSatEntrys(currSat)
148 self.have_advanced = True
149 if self.nim.description == "Alps BSBE2" and config.usage.setup_level.index >= 2: # expert
150 self.list.append(getConfigListEntry(_("Tone Amplitude"), self.nimConfig.toneAmplitude))
151 elif self.nim.isCompatible("DVB-C"):
152 self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
153 self.list.append(self.configMode)
154 if self.nimConfig.configMode.value == "enabled":
155 self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
156 self.list.append(self.cableScanType)
157 if self.nimConfig.cable.scan_type.value == "provider":
158 self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
160 if self.nimConfig.cable.scan_type.value == "bands":
161 self.list.append(getConfigListEntry(_("Scan band EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
162 self.list.append(getConfigListEntry(_("Scan band EU MID"), self.nimConfig.cable.scan_band_EU_MID))
163 self.list.append(getConfigListEntry(_("Scan band EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
164 self.list.append(getConfigListEntry(_("Scan band EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
165 self.list.append(getConfigListEntry(_("Scan band EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
166 self.list.append(getConfigListEntry(_("Scan band EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
167 self.list.append(getConfigListEntry(_("Scan band EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
168 self.list.append(getConfigListEntry(_("Scan band US LOW"), self.nimConfig.cable.scan_band_US_LOW))
169 self.list.append(getConfigListEntry(_("Scan band US MID"), self.nimConfig.cable.scan_band_US_MID))
170 self.list.append(getConfigListEntry(_("Scan band US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
171 self.list.append(getConfigListEntry(_("Scan band US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
172 self.list.append(getConfigListEntry(_("Scan band US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
173 elif self.nimConfig.cable.scan_type.value == "steps":
174 self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
175 self.list.append(getConfigListEntry(_("Scan QAM16"), self.nimConfig.cable.scan_mod_qam16))
176 self.list.append(getConfigListEntry(_("Scan QAM32"), self.nimConfig.cable.scan_mod_qam32))
177 self.list.append(getConfigListEntry(_("Scan QAM64"), self.nimConfig.cable.scan_mod_qam64))
178 self.list.append(getConfigListEntry(_("Scan QAM128"), self.nimConfig.cable.scan_mod_qam128))
179 self.list.append(getConfigListEntry(_("Scan QAM256"), self.nimConfig.cable.scan_mod_qam256))
180 self.list.append(getConfigListEntry(_("Scan SR6900"), self.nimConfig.cable.scan_sr_6900))
181 self.list.append(getConfigListEntry(_("Scan SR6875"), self.nimConfig.cable.scan_sr_6875))
182 self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
183 self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
184 self.have_advanced = False
185 elif self.nim.isCompatible("DVB-T"):
186 self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
187 self.list.append(self.configMode)
188 self.have_advanced = False
189 if self.nimConfig.configMode.value == "enabled":
190 self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
191 self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
193 self.have_advanced = False
194 self["config"].list = self.list
195 self["config"].l.setList(self.list)
198 checkList = (self.configMode, self.diseqcModeEntry, self.advancedSatsEntry, \
199 self.advancedLnbsEntry, self.advancedDiseqcMode, self.advancedUsalsEntry, \
200 self.advancedLof, self.advancedPowerMeasurement, self.turningSpeed, \
201 self.advancedType, self.advancedSCR, self.advancedManufacturer, self.advancedUnicable, \
202 self.uncommittedDiseqcCommand, self.cableScanType)
204 if self["config"].getCurrent() == x:
208 if self.have_advanced and self.nim.config_mode == "advanced":
209 self.fillAdvancedList()
211 if x in (self.turnFastEpochBegin, self.turnFastEpochEnd):
212 # workaround for storing only hour*3600+min*60 value in configfile
213 # not really needed.. just for cosmetics..
214 tm = localtime(x[1].value)
215 dt = datetime(1970, 1, 1, tm.tm_hour, tm.tm_min)
216 x[1].value = int(mktime(dt.timetuple()))
218 nimmanager.sec.update()
221 def fillListWithAdvancedSatEntrys(self, Sat):
222 lnbnum = int(Sat.lnb.value)
223 currLnb = self.nimConfig.advanced.lnb[lnbnum]
225 if isinstance(currLnb, ConfigNothing):
229 self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
230 self.list.append(self.advancedLnbsEntry)
233 self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
234 self.advancedLof = getConfigListEntry(_("LOF"), currLnb.lof)
235 self.list.append(self.advancedLof)
236 if currLnb.lof.value == "user_defined":
237 self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
238 self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
239 self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
240 # self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v))
242 if currLnb.lof.value == "unicable":
243 self.advancedUnicable = getConfigListEntry("Unicable "+_("Configuration Mode"), currLnb.unicable)
244 self.list.append(self.advancedUnicable)
245 if currLnb.unicable.value == "unicable_user":
246 self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.satcruser)
247 self.list.append(self.advancedSCR)
248 self.list.append(getConfigListEntry(_("Frequency"), currLnb.satcrvcouser[currLnb.satcruser.index]))
249 self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
250 self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
251 self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
252 elif currLnb.unicable.value == "unicable_matrix":
253 manufacturer_name = currLnb.unicableMatrixManufacturer.value
254 manufacturer = currLnb.unicableMatrix[manufacturer_name]
255 product_name = manufacturer.product.value
256 self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableMatrixManufacturer)
257 self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
258 self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
259 self.list.append(self.advancedManufacturer)
260 self.list.append(self.advancedType)
261 self.list.append(self.advancedSCR)
262 self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
263 elif currLnb.unicable.value == "unicable_lnb":
264 manufacturer_name = currLnb.unicableLnbManufacturer.value
265 manufacturer = currLnb.unicableLnb[manufacturer_name]
266 product_name = manufacturer.product.value
267 self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableLnbManufacturer)
268 self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
269 self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
270 self.list.append(self.advancedManufacturer)
271 self.list.append(self.advancedType)
272 self.list.append(self.advancedSCR)
273 self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
275 self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
276 self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
277 self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))
280 self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
281 self.list.append(self.advancedDiseqcMode)
282 if currLnb.diseqcMode.value != "none":
283 self.list.append(getConfigListEntry(_("Toneburst"), currLnb.toneburst))
284 self.list.append(getConfigListEntry(_("Committed DiSEqC command"), currLnb.commitedDiseqcCommand))
285 self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
286 self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
287 if currLnb.diseqcMode.value == "1_0":
288 self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
290 if currLnb.uncommittedDiseqcCommand.index:
291 if currLnb.commandOrder.value == "ct":
292 currLnb.commandOrder.value = "cut"
293 elif currLnb.commandOrder.value == "tc":
294 currLnb.commandOrder.value = "tcu"
296 if currLnb.commandOrder.index & 1:
297 currLnb.commandOrder.value = "tc"
299 currLnb.commandOrder.value = "ct"
300 self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
301 self.uncommittedDiseqcCommand = getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand)
302 self.list.append(self.uncommittedDiseqcCommand)
303 self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
304 if currLnb.diseqcMode.value == "1_2":
305 self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
306 self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
307 self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
308 self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
309 if SystemInfo["CanMeasureFrontendInputPower"]:
310 self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), currLnb.powerMeasurement)
311 self.list.append(self.advancedPowerMeasurement)
312 if currLnb.powerMeasurement.value:
313 self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
314 self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
315 self.list.append(self.turningSpeed)
316 if currLnb.turningSpeed.value == "fast epoch":
317 self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
318 self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
319 self.list.append(self.turnFastEpochBegin)
320 self.list.append(self.turnFastEpochEnd)
322 if currLnb.powerMeasurement.value:
323 currLnb.powerMeasurement.value = False
324 currLnb.powerMeasurement.save()
325 self.advancedUsalsEntry = getConfigListEntry(_("Use usals for this sat"), Sat.usals)
326 self.list.append(self.advancedUsalsEntry)
327 if not Sat.usals.value:
328 self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
332 def fillAdvancedList(self):
334 self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
335 self.list.append(self.configMode)
336 self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
337 self.list.append(self.advancedSatsEntry)
338 for x in self.nimConfig.advanced.sat.keys():
339 Sat = self.nimConfig.advanced.sat[x]
340 self.fillListWithAdvancedSatEntrys(Sat)
341 self["config"].list = self.list
344 old_configured_sats = nimmanager.getConfiguredSats()
346 new_configured_sats = nimmanager.getConfiguredSats()
347 self.unconfed_sats = old_configured_sats - new_configured_sats
348 self.satpos_to_remove = None
349 self.deleteConfirmed((None, "no"))
351 def deleteConfirmed(self, confirmed):
352 if confirmed[1] == "yes" or confirmed[1] == "yestoall":
353 eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove)
355 if self.satpos_to_remove is not None:
356 self.unconfed_sats.remove(self.satpos_to_remove)
358 self.satpos_to_remove = None
359 for orbpos in self.unconfed_sats:
360 self.satpos_to_remove = orbpos
361 orbpos = self.satpos_to_remove
363 # why we need this cast?
364 sat_name = str(nimmanager.getSatDescription(orbpos))
366 if orbpos > 1800: # west
367 orbpos = 3600 - orbpos
371 sat_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10)
373 if confirmed[1] == "yes" or confirmed[1] == "no":
374 self.session.openWithCallback(self.deleteConfirmed, ChoiceBox, _("Delete no more configured satellite\n%s?") %(sat_name), [(_("Yes"), "yes"), (_("No"), "no"), (_("Yes to all"), "yestoall"), (_("No to all"), "notoall")])
375 if confirmed[1] == "yestoall" or confirmed[1] == "notoall":
376 self.deleteConfirmed(confirmed)
378 if not self.satpos_to_remove:
381 def __init__(self, session, slotid):
382 Screen.__init__(self, session)
385 ConfigListScreen.__init__(self, self.list)
387 self["actions"] = ActionMap(["SetupActions", "SatlistShortcutAction"],
390 "cancel": self.keyCancel,
391 "nothingconnected": self.nothingConnectedShortcut
395 self.nim = nimmanager.nim_slots[slotid]
396 self.nimConfig = self.nim.config
397 self.createConfigMode()
401 ConfigListScreen.keyLeft(self)
405 ConfigListScreen.keyRight(self)
409 if self.nim.isCompatible("DVB-S"):
410 # reset connectedTo to all choices to properly store the default value
412 nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid)
414 choices.append((str(id), nimmanager.getNimDescription(id)))
415 self.nimConfig.connectedTo.setChoices(choices)
416 for x in self["config"].list:
419 def cancelConfirm(self, result):
423 for x in self["config"].list:
425 # we need to call saveAll to reset the connectedTo choices
429 def nothingConnectedShortcut(self):
430 if type(self["config"].getCurrent()[1]) is ConfigSatlist:
431 self["config"].getCurrent()[1].setValue("3601")
432 self["config"].invalidateCurrent()
434 class NimSelection(Screen):
435 def __init__(self, session):
436 Screen.__init__(self, session)
438 self.list = [None] * nimmanager.getSlotCount()
439 self["nimlist"] = List(self.list)
442 self.setResultClass()
444 self["actions"] = ActionMap(["OkCancelActions"],
446 "ok": self.okbuttonClick ,
450 def setResultClass(self):
451 self.resultclass = NimSetup
453 def okbuttonClick(self):
454 nim = self["nimlist"].getCurrent()
456 if nim is not None and not nim.empty:
457 self.session.openWithCallback(self.updateList, self.resultclass, nim.slot)
459 def showNim(self, nim):
462 def updateList(self):
464 for x in nimmanager.nim_slots:
466 nimConfig = nimmanager.getNimConfig(x.slot)
467 text = nimConfig.configMode.value
469 if x.isCompatible("DVB-S"):
470 if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends"):
471 text = { "loopthrough": _("loopthrough to"),
472 "equal": _("equal to"),
473 "satposdepends": _("second cable of motorized LNB") } [nimConfig.configMode.value]
474 text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
475 elif nimConfig.configMode.value == "nothing":
476 text = _("nothing connected")
477 elif nimConfig.configMode.value == "simple":
478 if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
479 text = _("Sats") + ": "
480 if nimConfig.diseqcA.orbital_position != 3601:
481 text += nimmanager.getSatName(int(nimConfig.diseqcA.value))
482 if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
483 if nimConfig.diseqcB.orbital_position != 3601:
484 text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value))
485 if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
486 if nimConfig.diseqcC.orbital_position != 3601:
487 text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value))
488 if nimConfig.diseqcD.orbital_position != 3601:
489 text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value))
490 elif nimConfig.diseqcMode.value == "positioner":
491 text = _("Positioner") + ":"
492 if nimConfig.positionerMode.value == "usals":
494 elif nimConfig.positionerMode.value == "manual":
498 elif nimConfig.configMode.value == "advanced":
500 elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
501 if nimConfig.configMode.value == "nothing":
502 text = _("nothing connected")
503 elif nimConfig.configMode.value == "enabled":
506 self.list.append((slotid, x.friendly_full_description, text, x))
507 self["nimlist"].setList(self.list)
508 self["nimlist"].updateList(self.list)