X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a7d4b01c25a9bbe388edf11ef6a7e5682f600e38..79da420aa414522f8b5477053f0b46e6311f1cc1:/lib/python/Components/NimManager.py diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 088c71bf..aae7dabc 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -84,8 +84,8 @@ class SecConfigure: for x in self.NimManager.satList: print "Add sat " + str(x[0]) self.addSatellite(sec, int(x[0])) - sec.setVoltageMode(0) - sec.setToneMode(0) + sec.setVoltageMode(switchParam.HV) + sec.setToneMode(switchParam.HILO) sec.setRotorPosNum(0) # USALS sec.setLNBSlotMask(tunermask) @@ -123,7 +123,7 @@ class SecConfigure: for slot in nim_slots: if slot.type is not None: - used_nim_slots.append((slot.slot, slot.description, slot.config.configMode.value != "nothing" and True or False)) + used_nim_slots.append((slot.slot, slot.description, slot.config.configMode.value != "nothing" and True or False, slot.isCompatible("DVB-S2"))) eDVBResourceManager.getInstance().setFrontendSlotInformations(used_nim_slots) for slot in nim_slots: @@ -155,7 +155,6 @@ class SecConfigure: nim = slot.config if slot.isCompatible("DVB-S"): print "slot: " + str(x) + " configmode: " + str(nim.configMode.value) - print "diseqcmode: ", nim.diseqcMode.value if nim.configMode.value in [ "loopthrough", "satposdepends", "nothing" ]: pass else: @@ -163,6 +162,7 @@ class SecConfigure: if nim.configMode.value == "equal": pass elif nim.configMode.value == "simple": #simple config + print "diseqcmode: ", nim.diseqcMode.value if nim.diseqcMode.value == "single": #single self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.NONE, diseqcpos = diseqcParam.SENDNO) elif nim.diseqcMode.value == "toneburst_a_b": #Toneburst A/B @@ -276,8 +276,9 @@ class SecConfigure: elif dm == "1_2": sec.setDiSEqCMode(diseqcParam.V1_2) - if self.satposdepends.has_key(slotid): # only useable with rotors - tunermask |= (1 << self.satposdepends[slotid]) + if self.satposdepends.has_key(slotid): + for slot in self.satposdepends[slotid]: + tunermask |= (1 << slot) if dm != "none": if currLnb.toneburst.value == "none": @@ -363,20 +364,23 @@ class SecConfigure: # finally add the orbital positions for y in lnbSat[x]: self.addSatellite(sec, y) - currSat = config.Nims[slotid].advanced.sat[y] - + if x > 32: + satpos = x > 32 and (3604-(36 - x)) or y + else: + satpos = y + currSat = config.Nims[slotid].advanced.sat[satpos] if currSat.voltage.value == "polarization": sec.setVoltageMode(switchParam.HV) elif currSat.voltage.value == "13V": sec.setVoltageMode(switchParam._14V) elif currSat.voltage.value == "18V": sec.setVoltageMode(switchParam._18V) - - if currSat.tonemode == "band": + + if currSat.tonemode.value == "band": sec.setToneMode(switchParam.HILO) - elif currSat.tonemode == "on": + elif currSat.tonemode.value == "on": sec.setToneMode(switchParam.ON) - elif currSat.tonemode == "off": + elif currSat.tonemode.value == "off": sec.setToneMode(switchParam.OFF) if not currSat.usals.value and x < 34: @@ -669,7 +673,14 @@ class NimManager: positionerList = [] for nim in nimList[:]: mode = self.getNimConfig(nim) - if mode.configMode.value == "simple" and mode.diseqcMode.value == "positioner": + nimHaveRotor = mode.configMode.value == "simple" and mode.diseqcMode.value == "positioner" + if not nimHaveRotor and mode.configMode.value == "advanced": + for x in range(3601, 3605): + lnb = int(mode.advanced.sat[x].lnb.value) + if lnb != 0: + nimHaveRotor = True + break + if nimHaveRotor: alreadyConnected = False for testnim in nimList: testmode = self.getNimConfig(testnim) @@ -847,21 +858,12 @@ def InitNimManager(nimmgr): choices["loopthrough"] = _("loopthrough to") nim.configMode = ConfigSelection(choices = choices, default = "nothing") - #important - check if just the 2nd one is LT only and the first one is DVB-S - # CHECKME: is this logic correct for >2 slots? -# if nim.configMode.value in ["loopthrough", "satposdepends", "equal"]: -# if x == 0: # first one can never be linked to anything -# # reset to simple -# nim.configMode.value = "simple" -# nim.configMode.save() -# else: - #FIXME: make it better - for y in nimmgr.nim_slots: - if y.slot == 0: - if not y.isCompatible("DVB-S"): - # reset to simple - nim.configMode.value = "simple" - nim.configMode.save() +# for y in nimmgr.nim_slots: +# if y.slot == 0: +# if not y.isCompatible("DVB-S"): +# # reset to simple +# nim.configMode.value = "simple" +# nim.configMode.save() nim.diseqcMode = ConfigSelection( choices = [ @@ -900,7 +902,7 @@ def InitNimManager(nimmgr): # advanced config: nim.advanced = ConfigSubsection() - tmp = [(3601, _('All Satellites 1'), 1), (3602, _('All Satellites 2'), 1), (3603, _('All Satellites 3'), 1), (3604, _('All Satellites 4'), 1)] + tmp = [(3601, _('All Satellites')+' 1', 1), (3602, _('All Satellites')+' 2', 1), (3603, _('All Satellites')+' 3', 1), (3604, _('All Satellites')+' 4', 1)] nim.advanced.sats = getConfigSatlist(192,nimmgr.satList+tmp) nim.advanced.sat = ConfigSubDict() lnbs = [("0", "not available")]