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)
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:
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:
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
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":
# 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:
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)
for x in self.satList:
list.append(x)
elif configMode == "advanced":
- for x in self.satList:
- if int(nim.advanced.sat[x[0]].lnb.value) != 0:
- list.append(x)
+ for x in range(3601, 3605):
+ if int(nim.advanced.sat[x].lnb.value) != 0:
+ for x in self.satList:
+ list.append(x)
+ if not list:
+ for x in self.satList:
+ if int(nim.advanced.sat[x[0]].lnb.value) != 0:
+ list.append(x)
return list
def getRotorSatListForNim(self, slotid):
for x in self.satList:
list.append(x)
elif configMode == "advanced":
- for x in self.satList:
- nim = config.Nims[slotid]
- lnbnum = int(nim.advanced.sat[x[0]].lnb.value)
- if lnbnum != 0:
- lnb = nim.advanced.lnb[lnbnum]
- if lnb.diseqcMode.value == "1_2":
+ nim = config.Nims[slotid]
+ for x in range(3601, 3605):
+ if int(nim.advanced.sat[x].lnb.value) != 0:
+ for x in self.satList:
list.append(x)
+ if not list:
+ for x in self.satList:
+ lnbnum = int(nim.advanced.sat[x[0]].lnb.value)
+ if lnbnum != 0:
+ lnb = nim.advanced.lnb[lnbnum]
+ if lnb.diseqcMode.value == "1_2":
+ list.append(x)
return list
def InitSecParams():
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 = [
# 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")]