more flexible diseqc / sat config
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 12 Nov 2008 15:34:46 +0000 (16:34 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 12 Nov 2008 15:34:46 +0000 (16:34 +0100)
25 files changed:
lib/python/Components/NimManager.py
lib/python/Screens/Satconfig.py
po/ar.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en.po
po/enigma2.pot
po/es.po
po/fi.po
po/fr.po
po/hr.po
po/hu.po
po/is.po
po/it.po
po/lt.po
po/nl.po
po/no.po
po/pl.po
po/pt.po
po/ru.po
po/sv.po
po/tr.po

index 41925ae..17297e6 100644 (file)
@@ -39,7 +39,7 @@ class SecConfigure:
                sec.addSatellite(orbpos)
                self.configuredSatellites.add(orbpos)
 
-       def addLNBSimple(self, sec, slotid, diseqcmode, toneburstmode = diseqcParam.NO, diseqcpos = diseqcParam.SENDNO, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0, turningSpeed = rotorParam.FAST, useInputPower=True, inputPowerDelta=50):
+       def addLNBSimple(self, sec, slotid, diseqcmode, toneburstmode = diseqcParam.NO, diseqcpos = diseqcParam.SENDNO, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0, turningSpeed = rotorParam.FAST, useInputPower=True, inputPowerDelta=50, fastDiSEqC = False, setVoltageTone = True):
                if orbpos is None or orbpos == 3601:
                        return
                #simple defaults
@@ -56,10 +56,16 @@ class SecConfigure:
                sec.setLNBThreshold(11700000)
                sec.setLNBIncreasedVoltage(lnbParam.OFF)
                sec.setRepeats(0)
-               sec.setFastDiSEqC(0)
+               sec.setFastDiSEqC(fastDiSEqC)
                sec.setSeqRepeat(0)
-               sec.setVoltageMode(switchParam.HV)
-               sec.setToneMode(switchParam.HILO)
+
+               if setVoltageTone:
+                       sec.setVoltageMode(switchParam.HV)
+                       sec.setToneMode(switchParam.HILO)
+               else:
+                       sec.setVoltageMode(switchParam._14V)
+                       sec.setToneMode(switchParam.OFF)
+
                sec.setCommandOrder(0)
 
                #user values
@@ -167,18 +173,25 @@ class SecConfigure:
                                        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)
+                                                       if nim.simpleSingleSendDiSEqC.value:
+                                                               self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA)
+                                                       else:
+                                                               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)
+                                                       fastDiSEqC = nim.simpleDiSEqCOnlyOnSatChange.value
+                                                       setVoltageTone = nim.simpleDiSEqCSetVoltageTone.value
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
                                                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)
+                                                       fastDiSEqC = nim.simpleDiSEqCOnlyOnSatChange.value
+                                                       setVoltageTone = nim.simpleDiSEqCSetVoltageTone.value
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcA.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcB.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcC.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BA, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
+                                                       self.addLNBSimple(sec, slotid = x, orbpos = nim.diseqcD.orbital_position, toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BB, fastDiSEqC = fastDiSEqC, setVoltageTone = setVoltageTone)
                                                elif nim.diseqcMode.value == "positioner":              #Positioner
                                                        if nim.latitudeOrientation.value == "north":
                                                                laValue = rotorParam.NORTH
@@ -893,6 +906,9 @@ def InitNimManager(nimmgr):
                                if id != x:
                                        choices.append((str(id), nimmgr.getNimDescription(id)))
                        nim.connectedTo = ConfigSelection(choices = choices)
+                       nim.simpleSingleSendDiSEqC = ConfigYesNo(default=False)
+                       nim.simpleDiSEqCSetVoltageTone = ConfigYesNo(default=True)
+                       nim.simpleDiSEqCOnlyOnSatChange = ConfigYesNo(default=False)
                        nim.diseqcA = getConfigSatlist(192, [(3601, _('nothing connected'), 1)] + nimmgr.satList)
                        nim.diseqcB = getConfigSatlist(130, [(3601, _('nothing connected'), 1)] + nimmgr.satList)
                        nim.diseqcC = ConfigSatlist(list = [(3601, _('nothing connected'), 1)] + nimmgr.satList)
index 6dc9f41..6489f28 100644 (file)
@@ -14,16 +14,21 @@ from datetime import datetime
 
 class NimSetup(Screen, ConfigListScreen):
        def createSimpleSetup(self, list, mode):
+               nim = self.nimConfig
                if mode == "single":
-                       list.append(getConfigListEntry(_("Satellite"), self.nimConfig.diseqcA))
+                       list.append(getConfigListEntry(_("Satellite"), nim.diseqcA))
+                       list.append(getConfigListEntry(_("Send DiSEqC"), nim.simpleSingleSendDiSEqC))
                else:
-                       list.append(getConfigListEntry(_("Port A"), self.nimConfig.diseqcA))
+                       list.append(getConfigListEntry(_("Port A"), nim.diseqcA))
 
                if mode in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
-                       list.append(getConfigListEntry(_("Port B"), self.nimConfig.diseqcB))
+                       list.append(getConfigListEntry(_("Port B"), nim.diseqcB))
                        if mode == "diseqc_a_b_c_d":
-                               list.append(getConfigListEntry(_("Port C"), self.nimConfig.diseqcC))
-                               list.append(getConfigListEntry(_("Port D"), self.nimConfig.diseqcD))
+                               list.append(getConfigListEntry(_("Port C"), nim.diseqcC))
+                               list.append(getConfigListEntry(_("Port D"), nim.diseqcD))
+                       if mode != "toneburst_a_b":
+                               list.append(getConfigListEntry(_("Set Voltage and 22KHz"), nim.simpleDiSEqCSetVoltageTone))
+                               list.append(getConfigListEntry(_("Send DiSEqC only on satellite change"), nim.simpleDiSEqCOnlyOnSatChange))
 
        def createPositionerSetup(self, list):
                nim = self.nimConfig
@@ -88,7 +93,7 @@ class NimSetup(Screen, ConfigListScreen):
                        self.list.append(self.configMode)
 
                        if self.nimConfig.configMode.value == "simple":                 #simple setup
-                               self.diseqcModeEntry = getConfigListEntry(_("DiSEqC Mode"), self.nimConfig.diseqcMode)
+                               self.diseqcModeEntry = getConfigListEntry(_("Mode"), self.nimConfig.diseqcMode)
                                self.list.append(self.diseqcModeEntry)
                                if self.nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
                                        self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
index 0c9f024..7ff6583 100755 (executable)
--- a/po/ar.po
+++ b/po/ar.po
@@ -820,7 +820,7 @@ msgstr "دايزك أ/ب"
 msgid "DiSEqC A/B/C/D"
 msgstr "دايزك أ/ب/ج/د"
 
-msgid "DiSEqC Mode"
+msgid "Mode"
 msgstr "وضع الدايزك"
 
 msgid "DiSEqC mode"
index 331ebe3..7935a92 100755 (executable)
--- a/po/ca.po
+++ b/po/ca.po
@@ -851,8 +851,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "Mode DiSEqC"
+msgid "Mode"
+msgstr "Mode"
 
 msgid "DiSEqC mode"
 msgstr "mode DiSEqC"
index 1638798..711b820 100755 (executable)
--- a/po/cs.po
+++ b/po/cs.po
@@ -840,8 +840,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Mód"
+msgid "Mode"
+msgstr "Mód"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC Mód"
index 55016cd..c4d8a94 100755 (executable)
--- a/po/da.po
+++ b/po/da.po
@@ -849,8 +849,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Type"
+msgid "Mode"
+msgstr "Type"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC type"
index e5f33ee..e506fd9 100755 (executable)
--- a/po/de.po
+++ b/po/de.po
@@ -879,8 +879,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC-Modus"
+msgid "Mode"
+msgstr "Modus"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC-Modus"
index 3053587..322659a 100755 (executable)
--- a/po/el.po
+++ b/po/el.po
@@ -841,8 +841,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Mode"
+msgid "Mode"
+msgstr "Mode"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC mode"
index daff316..a6b3fd6 100644 (file)
--- a/po/en.po
+++ b/po/en.po
@@ -815,7 +815,7 @@ msgstr ""
 msgid "DiSEqC A/B/C/D"
 msgstr ""
 
-msgid "DiSEqC Mode"
+msgid "Mode"
 msgstr ""
 
 msgid "DiSEqC mode"
index 375931b..9c131a7 100644 (file)
@@ -783,7 +783,7 @@ msgid "DiSEqC A/B/C/D"
 msgstr ""
 
 #: ../lib/python/Screens/Satconfig.py:74
-msgid "DiSEqC Mode"
+msgid "Mode"
 msgstr ""
 
 #: ../lib/python/Screens/Satconfig.py:180
index 59a8303..1e42b60 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -856,8 +856,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "Modo DiSEqC"
+msgid "Mode"
+msgstr "Modo"
 
 msgid "DiSEqC mode"
 msgstr "Modo DiSEqC"
index 19a3ddd..4f9e023 100755 (executable)
--- a/po/fi.po
+++ b/po/fi.po
@@ -854,8 +854,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC-tila"
+msgid "Mode"
+msgstr "Tila"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC-tila"
index b71e1ce..885e305 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -854,8 +854,8 @@ msgstr ""
 msgid "DiSEqC A/B/C/D"
 msgstr ""
 
-msgid "DiSEqC Mode"
-msgstr "Mode DiSEqC"
+msgid "Mode"
+msgstr "Mode"
 
 msgid "DiSEqC mode"
 msgstr "Mode DiSEqC"
index 26b554f..e051eea 100755 (executable)
--- a/po/hr.po
+++ b/po/hr.po
@@ -840,8 +840,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Mod"
+msgid "Mode"
+msgstr "Mod"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC mod"
index 345f90b..098761c 100755 (executable)
--- a/po/hu.po
+++ b/po/hu.po
@@ -852,8 +852,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC mód"
+msgid "Mode"
+msgstr "Mód"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC mód"
index 71e0d6d..facb246 100755 (executable)
--- a/po/is.po
+++ b/po/is.po
@@ -848,8 +848,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Gerð"
+msgid "Mode"
+msgstr "Gerð"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC gerð"
index 0b1bde2..b81e982 100755 (executable)
--- a/po/it.po
+++ b/po/it.po
@@ -847,8 +847,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "Modalità DiSEqc"
+msgid "Mode"
+msgstr "ModalitÃ"
 
 msgid "DiSEqC mode"
 msgstr "Modalità DiSEqC"
index 2cdc4f7..61714a9 100755 (executable)
--- a/po/lt.po
+++ b/po/lt.po
@@ -856,8 +856,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC pasirinkimas"
+msgid "Mode"
+msgstr "Pasirinkimas"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC pasirinkimas"
index e63e24b..8627e0f 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -861,8 +861,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC-modus"
+msgid "Mode"
+msgstr "Modus"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC-modus"
index a16e088..520816f 100755 (executable)
--- a/po/no.po
+++ b/po/no.po
@@ -844,8 +844,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC-Modus"
+msgid "Mode"
+msgstr "Modus"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC-Modus"
index eef53bc..b3332c1 100755 (executable)
--- a/po/pl.po
+++ b/po/pl.po
@@ -851,8 +851,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "Tryb DiSEqC"
+msgid "Mode"
+msgstr "Tryb"
 
 msgid "DiSEqC mode"
 msgstr "Tryb DiSEqC"
index d37a8e8..72df8b2 100755 (executable)
--- a/po/pt.po
+++ b/po/pt.po
@@ -847,8 +847,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "Modo DiSEqC"
+msgid "Mode"
+msgstr "Modo"
 
 msgid "DiSEqC mode"
 msgstr "Modo DiSEqC"
index d5c8fff..2407e7d 100755 (executable)
--- a/po/ru.po
+++ b/po/ru.po
@@ -823,8 +823,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC-режим"
+msgid "Mode"
+msgstr "режим"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC-режим"
index 8f8cb01..1474d7f 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -868,8 +868,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Läge"
+msgid "Mode"
+msgstr "Läge"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC läge"
index aa9ffc7..720e17b 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -866,8 +866,8 @@ msgstr "DiSEqC A/B"
 msgid "DiSEqC A/B/C/D"
 msgstr "DiSEqC A/B/C/D"
 
-msgid "DiSEqC Mode"
-msgstr "DiSEqC Modu"
+msgid "Mode"
+msgstr "Modu"
 
 msgid "DiSEqC mode"
 msgstr "DiSEqC modu"