From 9ef5b8eaa067430868c27f7ef063ecf32e84ea68 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Dec 2008 23:23:40 +0100 Subject: RemainingToText.py: more flexible use --- lib/python/Components/Converter/RemainingToText.py | 34 ++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/Converter/RemainingToText.py b/lib/python/Components/Converter/RemainingToText.py index adefe9cf..4249e30a 100644 --- a/lib/python/Components/Converter/RemainingToText.py +++ b/lib/python/Components/Converter/RemainingToText.py @@ -2,19 +2,43 @@ from Components.Converter.Converter import Converter from Components.Element import cached class RemainingToText(Converter, object): + DEFAULT = 0 + WITH_SECONDS = 1 + NO_SECONDS = 2 + def __init__(self, type): Converter.__init__(self, type) + if type == "WithSeconds": + self.type = self.WITH_SECONDS + elif type == "NoSeconds": + self.type = self.NO_SECONDS + else: + self.type = self.DEFAULT @cached def getText(self): - r = self.source.time - if r is None: + time = self.source.time + if time is None: return "" (duration, remaining) = self.source.time - if remaining is not None: - return "+%d min" % (remaining / 60) + + if self.type == self.WITH_SECONDS: + if remaining is not None: + return "%d:%02d:%02d" % (remaining / 3600, (remaining / 60) - ((remaining / 3600) * 60), remaining % 60) + else: + return "%02d:%02d:%02d" % (duration / 3600, (duration / 60) - ((duration / 3600) * 60), duration % 60) + elif self.type == self.NO_SECONDS: + if remaining is not None: + return "+%d:%02d" % (remaining / 3600, (remaining / 60) - ((remaining / 3600) * 60)) + else: + return "%02d:%02d" % (duration / 3600, (duration / 60) - ((duration / 3600) * 60)) + elif self.type == self.DEFAULT: + if remaining is not None: + return "+%d min" % (remaining / 60) + else: + return "%d min" % (duration / 60) else: - return "%d min" % (duration / 60) + return "???" text = property(getText) -- cgit v1.2.3 From efe45cc966495fe6d581a465df5a3c6a1280d633 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Dec 2008 23:37:05 +0100 Subject: ServicePosition.py: add Option "ShowNoSeconds" --- lib/python/Components/Converter/ServicePosition.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/Converter/ServicePosition.py b/lib/python/Components/Converter/ServicePosition.py index b488258b..d7a55dae 100644 --- a/lib/python/Components/Converter/ServicePosition.py +++ b/lib/python/Components/Converter/ServicePosition.py @@ -19,6 +19,7 @@ class ServicePosition(Converter, Poll, object): self.negate = 'Negate' in args self.detailed = 'Detailed' in args self.showHours = 'ShowHours' in args + self.showNoSeconds = 'ShowNoSeconds' in args if self.detailed: self.poll_interval = 100 @@ -34,7 +35,7 @@ class ServicePosition(Converter, Poll, object): elif type == "Gauge": self.type = self.TYPE_GAUGE else: - raise "type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours}" + raise "type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours|NoSeconds}" self.poll_enabled = self.type != self.TYPE_LENGTH @@ -94,9 +95,15 @@ class ServicePosition(Converter, Poll, object): if not self.detailed: if self.showHours: - return sign + "%d:%02d:%02d" % (l/3600, l%3600/60, l%60) + if self.showNoSeconds: + return sign + "%d:%02d" % (l/3600, l%3600/60) + else: + return sign + "%d:%02d:%02d" % (l/3600, l%3600/60, l%60) else: - return sign + "%d:%02d" % (l/60, l%60) + if self.showNoSeconds: + return sign + "%d" % (l/60) + else: + return sign + "%d:%02d" % (l/60, l%60) else: if self.showHours: return sign + "%d:%02d:%02d:%03d" % ((l/3600/90000), (l/90000)%3600/60, (l/90000)%60, (l%90000)/90) -- cgit v1.2.3 From 2db3e8afead0a9ee14871c8436691755be22a5ca Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 6 Nov 2008 00:17:52 +0100 Subject: Patch by Anders Holst: * ConfigElement.addNotifier takes a new optional argument immediate_feedback (which is True by default). If True the notifier is called whenever an editing key is pressed in the element. When False, the notifier is only called when editing is finished, i.e the element is deselected or the dialog closed. * ConfigSet is updated in accordance with Teros suggestion so that it behaves like the others and feedback can be given immediately. * All ConfigElements are modified to check whether they have changed since last selected (by a new variable last_value). * UsageConfig.py is updated to use immediate_feedback=False in the case of validating the speeds. (The only case so far where this setting is needed, but with the possibility more uses may follow.) --- lib/python/Components/UsageConfig.py | 8 +++--- lib/python/Components/config.py | 53 +++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 14 deletions(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 6ed87840..2ea91aeb 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -89,8 +89,8 @@ def InitUsageConfig(): config.seek.speeds_backward = ConfigSet(default=[8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) config.seek.speeds_slowmotion = ConfigSet(default=[2, 4, 8], choices=[2, 4, 6, 8, 12, 16, 25]) - config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2"]) - config.seek.enter_backward = ConfigSelection(default = "2", choices = ["2"]) + config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) + config.seek.enter_backward = ConfigSelection(default = "1", choices = ["1", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) config.seek.stepwise_minspeed = ConfigSelection(default = "16", choices = ["Never", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) config.seek.stepwise_repeat = ConfigSelection(default = "3", choices = ["2", "3", "4", "5", "6"]) @@ -104,14 +104,14 @@ def InitUsageConfig(): configElement.value = [2] updateChoices(config.seek.enter_forward, configElement.value) - config.seek.speeds_forward.addNotifier(updateEnterForward) + config.seek.speeds_forward.addNotifier(updateEnterForward, immediate_feedback = False) def updateEnterBackward(configElement): if not configElement.value: configElement.value = [2] updateChoices(config.seek.enter_backward, configElement.value) - config.seek.speeds_backward.addNotifier(updateEnterBackward) + config.seek.speeds_backward.addNotifier(updateEnterBackward, immediate_feedback = False) def updateChoices(sel, choices): if choices: diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index cfa4318c..1efb8a56 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -31,8 +31,10 @@ class ConfigElement(object): object.__init__(self) self.saved_value = None + self.last_value = None self.save_disabled = False self.notifiers = [] + self.notifiers_final = [] self.enabled = True self.callNotifiersOnSaveAndCancel = False @@ -85,10 +87,16 @@ class ConfigElement(object): for x in self.notifiers: x(self) - def addNotifier(self, notifier, initial_call = True): + def changedFinal(self): + for x in self.notifiers_final: + x(self) + + def addNotifier(self, notifier, initial_call = True, immediate_feedback = True): assert callable(notifier), "notifiers must be callable" - self.notifiers.append(notifier) - + if immediate_feedback: + self.notifiers.append(notifier) + else: + self.notifiers_final.append(notifier) # CHECKME: # do we want to call the notifier # - at all when adding it? (yes, though optional) @@ -110,7 +118,9 @@ class ConfigElement(object): pass def onDeselect(self, session): - pass + if not self.last_value == self.value: + self.changedFinal() + self.last_value = self.value KEY_LEFT = 0 KEY_RIGHT = 1 @@ -143,6 +153,7 @@ class ConfigSelection(ConfigElement): ConfigElement.__init__(self) self._value = None self.setChoices(choices, default) + self.last_value = self._value def setChoices(self, choices, default = None): self.choices = [] @@ -262,7 +273,8 @@ class ConfigBoolean(ConfigElement): def __init__(self, default = False, descriptions = {False: "false", True: "true"}): ConfigElement.__init__(self) self.descriptions = descriptions - self.value = self.default = default + self.value = self.last_value = self.default = default + def handleKey(self, key): if key in [KEY_LEFT, KEY_RIGHT]: self.value = not self.value @@ -309,6 +321,11 @@ class ConfigBoolean(ConfigElement): else: self.value = False + def onDeselect(self, session): + if not self.last_value == self.value: + self.changedFinal() + self.last_value = self.value + class ConfigYesNo(ConfigBoolean): def __init__(self, default = False): ConfigBoolean.__init__(self, default = default, descriptions = {False: _("no"), True: _("yes")}) @@ -326,7 +343,7 @@ class ConfigDateTime(ConfigElement): ConfigElement.__init__(self) self.increment = increment self.formatstring = formatstring - self.value = self.default = int(default) + self.value = self.last_value = self.default = int(default) def handleKey(self, key): if key == KEY_LEFT: @@ -367,6 +384,7 @@ class ConfigSequence(ConfigElement): self.default = default self.value = copy.copy(default) + self.last_value = copy.copy(default) self.endNotifier = [] @@ -507,6 +525,11 @@ class ConfigSequence(ConfigElement): def fromstring(self, value): return [int(x) for x in value.split(self.seperator)] + def onDeselect(self, session): + if not self.last_value == self._value: + self.changedFinal() + self.last_value = copy.copy(self._value) + class ConfigIP(ConfigSequence): def __init__(self, default, auto_jump = False): ConfigSequence.__init__(self, seperator = ".", limits = [(0,255),(0,255),(0,255),(0,255)], default = default) @@ -685,7 +708,7 @@ class ConfigText(ConfigElement, NumericalTextInput): self.offset = 0 self.overwrite = fixed_size self.help_window = None - self.value = self.default = default + self.value = self.last_value = self.default = default def validateMarker(self): if self.fixed_size: @@ -851,6 +874,9 @@ class ConfigText(ConfigElement, NumericalTextInput): if self.help_window: session.deleteDialog(self.help_window) self.help_window = None + if not self.last_value == self.value: + self.changedFinal() + self.last_value = self.value def getHTML(self, id): return '
\n' @@ -925,6 +951,9 @@ class ConfigNumber(ConfigText): def onDeselect(self, session): self.marked_pos = 0 self.offset = 0 + if not self.last_value == self.value: + self.changedFinal() + self.last_value = self.value class ConfigSearchText(ConfigText): def __init__(self, default = "", fixed_size = False, visible_width = False): @@ -955,7 +984,7 @@ class ConfigDirectory(ConfigText): class ConfigSlider(ConfigElement): def __init__(self, default = 0, increment = 1, limits = (0, 100)): ConfigElement.__init__(self) - self.value = self.default = default + self.value = self.last_value = self.default = default self.min = limits[0] self.max = limits[1] self.increment = increment @@ -1027,7 +1056,7 @@ class ConfigSet(ConfigElement): default = [] self.pos = -1 default.sort() - self.default = default + self.last_value = self.default = default self.value = default+[] def toggleChoice(self, choice): @@ -1036,6 +1065,7 @@ class ConfigSet(ConfigElement): else: self.value.append(choice) self.value.sort() + self.changed() def handleKey(self, key): if key in KEY_NUMBERS + [KEY_DELETE, KEY_BACKSPACE]: @@ -1082,7 +1112,9 @@ class ConfigSet(ConfigElement): def onDeselect(self, session): self.pos = -1 - self.changed() + if not self.last_value == self.value: + self.changedFinal() + self.last_value = self.value+[] def tostring(self, value): return str(value) @@ -1099,6 +1131,7 @@ class ConfigLocations(ConfigElement): self.locations = [] self.mountpoints = [] harddiskmanager.on_partition_list_change.append(self.mountpointsChanged) + self.value = default+[] def setValue(self, value): loc = [x[0] for x in self.locations if x[3]] -- cgit v1.2.3 From 647889e65bc8aabd907bc327e62c6209a947ae1b Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 12 Dec 2008 12:58:25 +0100 Subject: cleanup --- lib/python/Components/ServiceScan.py | 86 ++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 47 deletions(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/ServiceScan.py b/lib/python/Components/ServiceScan.py index 5a7b3dea..5d624264 100644 --- a/lib/python/Components/ServiceScan.py +++ b/lib/python/Components/ServiceScan.py @@ -36,54 +36,46 @@ class ServiceScan: tp_text = "" if transponder: tp_type = transponder.getSystem() - if not tp_type[0]: - tp_type = tp_type[1] - if tp_type == iDVBFrontend.feSatellite: - network = _("Satellite") - tp = transponder.getDVBS() - if not tp[0]: - tp = tp[1] - orb_pos = tp.orbital_position - try: - sat_name = str(nimmgr.getSatDescription(orb_pos)) - except KeyError: - sat_name = "" - if orb_pos > 1800: # west - orb_pos = 3600 - orb_pos - h = _("W") - else: - h = _("E") - if sat_name.find("%d.%d" % (orb_pos/10, orb_pos%10)) != -1: - network = sat_name - else: - network = ("%s %d.%d %s") % (sat_name, orb_pos / 10, orb_pos % 10, h) - tp_text = ("%s %s %d%c / %d / %s") %( { 0 : "DVB-S", 1 : "DVB-S2" }[tp.system], - { 0 : "Auto", 1 : "QPSK", 2 : "M8PSK", 3 : "QAM16" }[tp.modulation], - tp.frequency/1000, - { 0 : 'H', 1 : 'V', 2 : 'L', 3 : 'R' }[tp.polarisation], - tp.symbol_rate/1000, - { 0 : "AUTO", 1 : "1/2", 2 : "2/3", 3 : "3/4", 4 : "5/6", - 5 : "7/8", 6 : "8/9", 7 : "3/5", 8 : "4/5", 9 : "9/10", - 15 : "NONE" }[tp.fec] ) - elif tp_type == iDVBFrontend.feCable: - network = _("Cable") - tp = transponder.getDVBC() - if not tp[0]: - tp = tp[1] - tp_text = ("DVB-C %s %d / %d / %s") %( { 0 : "AUTO", 1 : "QAM16", 2 : "QAM32", 3 : "QAM64", 4 : "QAM128", 5 : "QAM256" }[tp.modulation], - tp.frequency, - tp.symbol_rate/1000, - { 0 : "AUTO", 1 : "1/2", 2 : "2/3", 3 : "3/4", 4 : "5/6", 5 : "7/8", 6 : "8/9", 15 : "NONE" }[tp.fec_inner] ) - elif tp_type == iDVBFrontend.feTerrestrial: - network = _("Terrestrial") - tp = transponder.getDVBT() - if not tp[0]: - tp = tp[1] - tp_text = ("DVB-T %s %d %s") %( { 0 : "QPSK", 1 : "QAM16", 2 : "QAM64", 3 : "AUTO"}[tp.modulation], - tp.frequency, - { 0 : "Bw 8MHz", 1 : "Bw 7MHz", 2 : "Bw 6MHz", 3 : "Bw Auto" }[tp.bandwidth]) + if tp_type == iDVBFrontend.feSatellite: + network = _("Satellite") + tp = transponder.getDVBS() + orb_pos = tp.orbital_position + try: + sat_name = str(nimmgr.getSatDescription(orb_pos)) + except KeyError: + sat_name = "" + if orb_pos > 1800: # west + orb_pos = 3600 - orb_pos + h = _("W") else: - print "unknown transponder type in scanStatusChanged" + h = _("E") + if sat_name.find("%d.%d" % (orb_pos/10, orb_pos%10)) != -1: + network = sat_name + else: + network = ("%s %d.%d %s") % (sat_name, orb_pos / 10, orb_pos % 10, h) + tp_text = ("%s %s %d%c / %d / %s") %( { 0 : "DVB-S", 1 : "DVB-S2" }[tp.system], + { 0 : "Auto", 1 : "QPSK", 2 : "M8PSK", 3 : "QAM16" }[tp.modulation], + tp.frequency/1000, + { 0 : 'H', 1 : 'V', 2 : 'L', 3 : 'R' }[tp.polarisation], + tp.symbol_rate/1000, + { 0 : "AUTO", 1 : "1/2", 2 : "2/3", 3 : "3/4", 4 : "5/6", + 5 : "7/8", 6 : "8/9", 7 : "3/5", 8 : "4/5", 9 : "9/10", + 15 : "NONE" }[tp.fec] ) + elif tp_type == iDVBFrontend.feCable: + network = _("Cable") + tp = transponder.getDVBC() + tp_text = ("DVB-C %s %d / %d / %s") %( { 0 : "AUTO", 1 : "QAM16", 2 : "QAM32", 3 : "QAM64", 4 : "QAM128", 5 : "QAM256" }[tp.modulation], + tp.frequency, + tp.symbol_rate/1000, + { 0 : "AUTO", 1 : "1/2", 2 : "2/3", 3 : "3/4", 4 : "5/6", 5 : "7/8", 6 : "8/9", 15 : "NONE" }[tp.fec_inner] ) + elif tp_type == iDVBFrontend.feTerrestrial: + network = _("Terrestrial") + tp = transponder.getDVBT() + tp_text = ("DVB-T %s %d %s") %( { 0 : "QPSK", 1 : "QAM16", 2 : "QAM64", 3 : "AUTO"}[tp.modulation], + tp.frequency, + { 0 : "Bw 8MHz", 1 : "Bw 7MHz", 2 : "Bw 6MHz", 3 : "Bw Auto" }[tp.bandwidth]) + else: + print "unknown transponder type in scanStatusChanged" self.network.setText(network) self.transponder.setText(tp_text) -- cgit v1.2.3 From b833353b5285a547eb18c079aa860c9ee2765d6e Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 13 Dec 2008 01:33:05 +0100 Subject: add possibility to set manual lnb priority (only in advanced sat config) range 0..64 to decrease priorities (this is lower as all auto given priorities) range 14000..14064 this is higher than auto given rotor priorities range 19000..19064 this is higher than each auto given priorities --- lib/dvb/sec.cpp | 28 ++++++++++++++++++++++++---- lib/dvb/sec.h | 5 ++++- lib/python/Components/NimManager.py | 10 ++++++++++ lib/python/Screens/Satconfig.py | 1 + 4 files changed, 39 insertions(+), 5 deletions(-) (limited to 'lib/python/Components') diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 751a5453..1022b955 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -140,7 +140,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite { bool rotor=false; eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx]; - if ( lnb_param.slot_mask & slot_id ) // lnb for correct tuner? + if ( lnb_param.m_slot_mask & slot_id ) // lnb for correct tuner? { int ret = 0; eDVBSatelliteDiseqcParameters &di_param = lnb_param.m_diseqc_parameters; @@ -297,6 +297,9 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite ret=0; } + if (ret && lnb_param.m_prio != -1) + ret = lnb_param.m_prio; + eSecDebugNoSimulate("ret %d, score old %d", ret, score); if (ret > score) { @@ -309,7 +312,12 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite } } if (score && satcount) - score -= (satcount-1); + { + if (score > (satcount-1)) + score -= (satcount-1); + else + score = 1; // min score + } if (score && direct_connected) score += 5; // increase score for tuners with direct sat connection eSecDebugNoSimulate("final score %d", score); @@ -963,7 +971,8 @@ RESULT eDVBSatelliteEquipmentControl::clear() for (int i=0; i <= m_lnbidx; ++i) { m_lnbs[i].m_satellites.clear(); - m_lnbs[i].slot_mask = 0; + m_lnbs[i].m_slot_mask = 0; + m_lnbs[i].m_prio = -1; // auto } m_lnbidx=-1; @@ -1021,7 +1030,7 @@ RESULT eDVBSatelliteEquipmentControl::setLNBSlotMask(int slotmask) { eSecDebug("eDVBSatelliteEquipmentControl::setLNBSlotMask(%d)", slotmask); if ( currentLNBValid() ) - m_lnbs[m_lnbidx].slot_mask = slotmask; + m_lnbs[m_lnbidx].m_slot_mask = slotmask; else return -ENOENT; return 0; @@ -1067,6 +1076,17 @@ RESULT eDVBSatelliteEquipmentControl::setLNBIncreasedVoltage(bool onoff) return 0; } +RESULT eDVBSatelliteEquipmentControl::setLNBPrio(int prio) +{ + eSecDebug("eDVBSatelliteEquipmentControl::setLNBPrio(%d)", prio); + if ( currentLNBValid() ) + m_lnbs[m_lnbidx].m_prio = prio; + else + return -ENOENT; + return 0; +} + + /* DiSEqC Specific Parameters */ RESULT eDVBSatelliteEquipmentControl::setDiSEqCMode(int diseqcmode) { diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 27dcedd5..2efd0b49 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -231,7 +231,7 @@ public: #ifndef SWIG t_12V_relais_state m_12V_relais_state; // 12V relais output on/off - __u8 slot_mask; // useable by slot ( 1 | 2 | 4...) + int m_slot_mask; // useable by slot ( 1 | 2 | 4...) unsigned int m_lof_hi, // for 2 band universal lnb 10600 Mhz (high band offset frequency) m_lof_lo, // for 2 band universal lnb 9750 Mhz (low band offset frequency) @@ -242,6 +242,8 @@ public: std::map m_satellites; eDVBSatelliteDiseqcParameters m_diseqc_parameters; eDVBSatelliteRotorParameters m_rotor_parameters; + + int m_prio; // to override automatic tuner management ... -1 is Auto #endif }; @@ -304,6 +306,7 @@ public: RESULT setLNBLOFH(int lofh); RESULT setLNBThreshold(int threshold); RESULT setLNBIncreasedVoltage(bool onoff); + RESULT setLNBPrio(int prio); /* DiSEqC Specific Parameters */ RESULT setDiSEqCMode(int diseqcmode); RESULT setToneburst(int toneburst); diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index edd3bbbb..168962e9 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -381,6 +381,8 @@ class SecConfigure: sec.setLNBSlotMask(tunermask) + sec.setLNBPrio(int(currLnb.prio.value)) + # finally add the orbital positions for y in lnbSat[x]: self.addSatellite(sec, y) @@ -1026,6 +1028,14 @@ def InitNimManager(nimmgr): nim.advanced.lnb[x].fastTurningBegin = ConfigDateTime(default=mktime(btime.timetuple()), formatstring = _("%H:%M"), increment = 600) etime = datetime(1970, 1, 1, 19, 0); nim.advanced.lnb[x].fastTurningEnd = ConfigDateTime(default=mktime(etime.timetuple()), formatstring = _("%H:%M"), increment = 600) + prio_list = [ ("-1", _("Auto")) ] + for prio in range(65): + prio_list.append((str(prio), str(prio))) + for prio in range(14000,14065): + prio_list.append((str(prio), str(prio))) + for prio in range(19000,19065): + prio_list.append((str(prio), str(prio))) + nim.advanced.lnb[x].prio = ConfigSelection(default="-1", choices=prio_list) elif slot.isCompatible("DVB-C"): nim.configMode = ConfigSelection( choices = { diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 6489f28f..5628926f 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -283,6 +283,7 @@ class NimSetup(Screen, ConfigListScreen): self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold)) # self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v)) self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage)) + self.list.append(getConfigListEntry(_("Priority"), currLnb.prio)) def fillAdvancedList(self): self.list = [ ] -- cgit v1.2.3