X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/737d231c90d1e7ca5971346a4acddad5a6a58a1c..574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f:/lib/python/Components/NimManager.py diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 4be10d53..48778571 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -112,7 +112,7 @@ class SecConfigure: def getRoot(self, slotid, connto): visited = [] - while (self.NimManager.getNimConfig(connto).configMode.value in ["satposdepends", "equal", "loopthrough"]): + while (self.NimManager.getNimConfig(connto).configMode.value in ("satposdepends", "equal", "loopthrough")): connto = int(self.NimManager.getNimConfig(connto).connectedTo.value) if connto in visited: # prevent endless loop return slotid @@ -168,7 +168,7 @@ class SecConfigure: hw = HardwareInfo() if slot.isCompatible("DVB-S"): print "slot: " + str(x) + " configmode: " + str(nim.configMode.value) - if nim.configMode.value in [ "loopthrough", "satposdepends", "nothing" ]: + if nim.configMode.value in ( "loopthrough", "satposdepends", "nothing" ): pass else: sec.setSlotNotLinked(x) @@ -287,8 +287,8 @@ class SecConfigure: sec.setLNBSatCR(manufacturer.scr[product_name].index) sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000) elif currLnb.unicable.value == "unicable_lnb": - manufacturer_name = currLnb.unicableMatrixManufacturer.value - manufacturer = currLnb.unicableMatrix[manufacturer_name] + manufacturer_name = currLnb.unicableLnbManufacturer.value + manufacturer = currLnb.unicableLnb[manufacturer_name] product_name = manufacturer.product.value sec.setLNBSatCR(manufacturer.scr[product_name].index) sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000) @@ -447,7 +447,7 @@ class NIM(object): def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None): self.slot = slot - if type not in ["DVB-S", "DVB-C", "DVB-T", "DVB-S2", None]: + if type not in ("DVB-S", "DVB-C", "DVB-T", "DVB-S2", None): print "warning: unknown NIM type %s, not using." % type type = None @@ -458,20 +458,20 @@ class NIM(object): def isCompatible(self, what): compatible = { - None: [None], - "DVB-S": ["DVB-S", None], - "DVB-C": ["DVB-C", None], - "DVB-T": ["DVB-T", None], - "DVB-S2": ["DVB-S", "DVB-S2", None] + None: (None,), + "DVB-S": ("DVB-S", None), + "DVB-C": ("DVB-C", None), + "DVB-T": ("DVB-T", None), + "DVB-S2": ("DVB-S", "DVB-S2", None) } return what in compatible[self.type] def connectableTo(self): connectable = { - "DVB-S": ["DVB-S", "DVB-S2"], - "DVB-C": ["DVB-C"], - "DVB-T": ["DVB-T"], - "DVB-S2": ["DVB-S", "DVB-S2"] + "DVB-S": ("DVB-S", "DVB-S2"), + "DVB-C": ("DVB-C",), + "DVB-T": ("DVB-T",), + "DVB-S2": ("DVB-S", "DVB-S2") } return connectable[self.type] @@ -781,10 +781,10 @@ class NimManager: if configMode == "simple": dm = nim.diseqcMode.value - if dm in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: + if dm in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcA.orbital_position != 3601: list.append(self.satList[nim.diseqcA.index-1]) - if dm in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: + if dm in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcB.orbital_position != 3601: list.append(self.satList[nim.diseqcB.index-1]) if dm == "diseqc_a_b_c_d": @@ -835,9 +835,13 @@ class NimManager: def InitSecParams(): config.sec = ConfigSubsection() - x = ConfigInteger(default=15, limits = (0, 9999)) - x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE, configElement.value)) - config.sec.delay_after_continuous_tone_change = x + x = ConfigInteger(default=25, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC, configElement.value)) + config.sec.delay_after_continuous_tone_disable_before_diseqc = x + + x = ConfigInteger(default=10, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_CONT_TONE_CHANGE, configElement.value)) + config.sec.delay_after_final_continuous_tone_change = x x = ConfigInteger(default=10, limits = (0, 9999)) x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_VOLTAGE_CHANGE, configElement.value))