aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-06-08 12:01:25 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-06-08 12:01:25 +0000
commit49fbebfa0877a8c794163b5b0fcb89fd38141c1b (patch)
treebc91516d2c6bc86296ee30b5809cb9f1cce55c2b /lib/python/Components
parent02c6d19ed834d530384050a5831f16ec2b7aaaf0 (diff)
downloadenigma2-49fbebfa0877a8c794163b5b0fcb89fd38141c1b.tar.gz
enigma2-49fbebfa0877a8c794163b5b0fcb89fd38141c1b.zip
hopefully fix "secondary cable from motorized tuner" setting
some code cleanups now link tuners in all directions should be possible
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/NimManager.py76
1 files changed, 43 insertions, 33 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py
index bcdd9440..d69f7b8f 100644
--- a/lib/python/Components/NimManager.py
+++ b/lib/python/Components/NimManager.py
@@ -79,7 +79,7 @@ class SecConfigure:
sec.setRotorPosNum(0) # USALS
self.satList.append(int(x[0]))
- sec.setLNBTunerMask(tunermask)
+ sec.setLNBSlotMask(tunermask)
def setSatposDepends(self, sec, nim1, nim2):
print "tuner", nim1, "depends on satpos of", nim2
@@ -125,38 +125,42 @@ class SecConfigure:
if slot.isCompatible("DVB-S"):
print "slot: " + str(x) + " configmode: " + str(nim.configMode.value)
print "diseqcmode: ", nim.configMode.value
- if nim.configMode.value in [ "loopthrough", "satposdepends", "equal", "nothing" ]:
+ if nim.configMode.value in [ "loopthrough", "satposdepends", "nothing" ]:
pass
- elif nim.configMode.value == "simple": #simple config
- 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
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.A, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.SENDNO)
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.B, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.SENDNO)
- elif nim.diseqcMode.value == "diseqc_a_b": #DiSEqC A/B
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA)
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB)
- elif nim.diseqcMode.value == "diseqc_a_b_c_d": #DiSEqC A/B/C/D
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA)
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB)
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcC.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BA)
- self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcD.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BB)
- elif nim.diseqcMode.value == "positioner": #Positioner
- if nim.latitudeOrientation.value == "north":
- laValue = rotorParam.NORTH
- else:
- laValue = rotorParam.SOUTH
- if nim.longitudeOrientation.value == "east":
- loValue = rotorParam.EAST
- else:
- loValue = rotorParam.WEST
- self.addLNBSimple(sec, slotid = x, diseqcmode = 3,
- longitude = nim.longitude.float,
- loDirection = loValue,
- latitude = nim.latitude.float,
- laDirection = laValue)
- elif nim.configMode.value == "advanced": #advanced config
- self.updateAdvanced(sec, x)
+ else:
+ sec.setSlotNotLinked(x)
+ if nim.configMode.value == "equal":
+ pass
+ elif nim.configMode.value == "simple": #simple config
+ 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
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.A, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.SENDNO)
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.B, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.SENDNO)
+ elif nim.diseqcMode.value == "diseqc_a_b": #DiSEqC A/B
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA)
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB)
+ elif nim.diseqcMode.value == "diseqc_a_b_c_d": #DiSEqC A/B/C/D
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA)
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB)
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcC.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BA)
+ self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcD.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BB)
+ elif nim.diseqcMode.value == "positioner": #Positioner
+ if nim.latitudeOrientation.value == "north":
+ laValue = rotorParam.NORTH
+ else:
+ laValue = rotorParam.SOUTH
+ if nim.longitudeOrientation.value == "east":
+ loValue = rotorParam.EAST
+ else:
+ loValue = rotorParam.WEST
+ self.addLNBSimple(sec, slotid = x, diseqcmode = 3,
+ longitude = nim.longitude.float,
+ loDirection = loValue,
+ latitude = nim.latitude.float,
+ laDirection = laValue)
+ elif nim.configMode.value == "advanced": #advanced config
+ self.updateAdvanced(sec, x)
print "sec config completed"
def updateAdvanced(self, sec, slotid):
@@ -285,7 +289,7 @@ class SecConfigure:
else:
sec.setUseInputpower(False)
- sec.setLNBTunerMask(tunermask)
+ sec.setLNBSlotMask(tunermask)
# finally add the orbital positions
for y in lnbSat[x]:
@@ -726,6 +730,12 @@ def InitSecParams():
x.addNotifier(lambda configElement: secClass.setParam(secClass.MOTOR_COMMAND_RETRIES, configElement.value))
config.sec.motor_command_retries = x
+# TODO add support for satpos depending nims to advanced nim configuration
+# so a second/third/fourth cable from a motorized lnb can used behind a
+# diseqc 1.0 / diseqc 1.1 / toneburst switch
+# the C(++) part should can handle this
+# the configElement should be only visible when diseqc 1.2 is disabled
+
def InitNimManager(nimmgr):
InitSecParams()