Skip to content

Commit

Permalink
nimmanager: remove empty_slots variable
Browse files Browse the repository at this point in the history
It seems that empty_slots variable is a leftover since we dont use this variable on DVB-C/T/ATSC config.
  • Loading branch information
athoik authored and teamblue-e2 committed Mar 14, 2019
1 parent 934b2c6 commit 2412e3d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/python/Components/NimManager.py
Expand Up @@ -1377,13 +1377,13 @@ def t2miRawModeChanged(configElement):
if os.path.exists("/proc/stb/frontend/%d/t2mirawmode" % slot):
open("/proc/stb/frontend/%d/t2mirawmode" % slot, "w").write(configElement.value)

def createSatConfig(nim, slot_id, empty_slots):
def createSatConfig(nim, slot_id):
nim.toneAmplitude = ConfigSelection([("11", "340mV"), ("10", "360mV"), ("9", "600mV"), ("8", "700mV"), ("7", "800mV"), ("6", "900mV"), ("5", "1100mV")], "7")
nim.toneAmplitude.fe_id = slot_id - empty_slots
nim.toneAmplitude.fe_id = slot_id
nim.toneAmplitude.slot_id = slot_id
nim.toneAmplitude.addNotifier(toneAmplitudeChanged)
nim.scpcSearchRange = ConfigSelection([("0", _("no")), ("1", _("yes"))], "0")
nim.scpcSearchRange.fe_id = slot_id - empty_slots
nim.scpcSearchRange.fe_id = slot_id
nim.scpcSearchRange.slot_id = slot_id
nim.scpcSearchRange.addNotifier(scpcSearchRangeChanged)
nim.t2miRawMode = ConfigSelection([("disable", _("disabled")), ("enable", _("enabled"))], "disable")
Expand Down Expand Up @@ -1562,7 +1562,6 @@ def hotswitchableConfigChanged(nim, slot, fe_id, configElement=None):
print "[InitNimManager] disable hotswitchable tuner"
nim.configMode.value = nim.configMode.default = "nothing"

empty_slots = 0
for slot in nimmgr.nim_slots:
slot_id = slot.slot
if update_slots and (slot_id not in update_slots):
Expand All @@ -1584,13 +1583,12 @@ def hotswitchableConfigChanged(nim, slot, fe_id, configElement=None):
else:
nim.configMode = ConfigSelection(choices = { "nothing": _("disabled") }, default="nothing")
if not slot.canBeCompatible("DVB-S"):
empty_slots += 1
if slot.type is not None:
print "[InitNimManager] pls add support for this frontend type!", slot.type
fe_id = slot_id - empty_slots
fe_id = slot_id

if slot.canBeCompatible("DVB-S"):
createSatConfig(nim, slot_id, empty_slots)
createSatConfig(nim, slot_id)
if slot.canBeCompatible("DVB-C"):
createCableConfig(nim, slot_id)
if slot.canBeCompatible("DVB-T"):
Expand Down

0 comments on commit 2412e3d

Please sign in to comment.