From 2aa5cf5a1bfe64fbb1ef6b082920c82ff927007a Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Nov 2008 00:23:39 +0100 Subject: fix rotor input current measurement default value for dm8000 --- lib/python/Components/NimManager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/python/Components/NimManager.py') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 3c7a147e..434ab4aa 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -1,3 +1,5 @@ +from Tools.HardwareInfo import HardwareInfo + from config import config, ConfigSubsection, ConfigSelection, ConfigFloat, \ ConfigSatlist, ConfigYesNo, ConfigInteger, ConfigSubList, ConfigNothing, \ ConfigSubDict, ConfigOnOff, ConfigDateTime @@ -153,6 +155,7 @@ class SecConfigure: for slot in nim_slots: x = slot.slot nim = slot.config + hw = HardwareInfo() if slot.isCompatible("DVB-S"): print "slot: " + str(x) + " configmode: " + str(nim.configMode.value) if nim.configMode.value in [ "loopthrough", "satposdepends", "nothing" ]: @@ -185,7 +188,7 @@ class SecConfigure: loValue = rotorParam.EAST else: loValue = rotorParam.WEST - inputPowerDelta=50 + inputPowerDelta=hw.get_device_name() == "dm8000" and 50 or 15 useInputPower=False turning_speed=0 if nim.powerMeasurement.value: @@ -842,6 +845,7 @@ def InitSecParams(): def InitNimManager(nimmgr): InitSecParams() + hw = HardwareInfo() config.Nims = ConfigSubList() for x in range(len(nimmgr.nim_slots)): @@ -972,7 +976,7 @@ def InitNimManager(nimmgr): nim.advanced.lnb[x].latitude = ConfigFloat(default = [50,767], limits = [(0,359),(0,999)]) nim.advanced.lnb[x].latitudeOrientation = ConfigSelection(choices = [("north", _("North")), ("south", _("South"))], default = "north") nim.advanced.lnb[x].powerMeasurement = ConfigYesNo(default=True) - nim.advanced.lnb[x].powerThreshold = ConfigInteger(default=50, limits=(0, 100)) + nim.advanced.lnb[x].powerThreshold = ConfigInteger(default=hw.get_device_name() == "dm8000" and 15 or 50, limits=(0, 100)) nim.advanced.lnb[x].turningSpeed = ConfigSelection(choices = [("fast", _("Fast")), ("slow", _("Slow")), ("fast epoch", _("Fast epoch"))], default = "fast") btime = datetime(1970, 1, 1, 7, 0); nim.advanced.lnb[x].fastTurningBegin = ConfigDateTime(default=mktime(btime.timetuple()), formatstring = _("%H:%M"), increment = 600) -- cgit v1.2.3 From cb725de8216cb61d0a889b3a6a7651619161ef08 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Nov 2008 00:28:33 +0100 Subject: 15 <-> 50 --- lib/python/Components/NimManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python/Components/NimManager.py') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 434ab4aa..1ee8dddd 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -188,7 +188,7 @@ class SecConfigure: loValue = rotorParam.EAST else: loValue = rotorParam.WEST - inputPowerDelta=hw.get_device_name() == "dm8000" and 50 or 15 + inputPowerDelta=hw.get_device_name() == "dm8000" and 15 or 50 useInputPower=False turning_speed=0 if nim.powerMeasurement.value: -- cgit v1.2.3 From d3a03446578d5cf77ea3f2128aa3aeee434a23b8 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Nov 2008 00:52:00 +0100 Subject: fix typos --- lib/python/Components/NimManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/python/Components/NimManager.py') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 1ee8dddd..3c1fe455 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -659,7 +659,7 @@ class NimManager: def canEqualTo(self, slotid): type = self.getNimType(slotid) - if self.getNimConfig(slotid) == "DVB-S2": + if type == "DVB-S2": type = "DVB-S" nimList = self.getNimListOfType(type, slotid) for nim in nimList[:]: @@ -667,10 +667,10 @@ class NimManager: if mode.configMode.value == "loopthrough" or mode.configMode.value == "satposdepends": nimList.remove(nim) return nimList - + def canDependOn(self, slotid): type = self.getNimType(slotid) - if self.getNimConfig(slotid) == "DVB-S2": + if type == "DVB-S2": type = "DVB-S" nimList = self.getNimListOfType(type, slotid) positionerList = [] -- cgit v1.2.3 From ae5651346d0b371a89287365003466fef729b72a Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Nov 2008 01:01:18 +0100 Subject: add possibility to select "second cable of motorized LNB" also when the rotor is configured in advanced mode --- lib/python/Components/NimManager.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/python/Components/NimManager.py') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 3c1fe455..32fca47f 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -683,6 +683,13 @@ class NimManager: if lnb != 0: nimHaveRotor = True break + if not nimHaveRotor: + for sat in mode.advanced.sat.values(): + lnb_num = int(sat.lnb.value) + diseqcmode = lnb_num and mode.advanced.lnb[lnb_num].diseqcMode.value or "" + if diseqcmode == "1_2": + nimHaveRotor = True + break if nimHaveRotor: alreadyConnected = False for testnim in nimList: -- cgit v1.2.3