diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-10 10:18:28 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-10 10:18:28 +0100 |
| commit | 4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c (patch) | |
| tree | 1ae11748c8a14720c98fb666ffaf8615fd5ff038 /lib/python/Components/NimManager.py | |
| parent | acbad24424304473f967b678bd9deb51f73acf27 (diff) | |
| parent | 752d9da39e993387fefbd9ccbf39e5cb8f85735e (diff) | |
| download | enigma2-4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c.tar.gz enigma2-4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c.zip | |
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Components/NimManager.py')
| -rw-r--r-- | lib/python/Components/NimManager.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 3c7a147e..32fca47f 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 15 or 50 useInputPower=False turning_speed=0 if nim.powerMeasurement.value: @@ -656,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[:]: @@ -664,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 = [] @@ -680,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: @@ -842,6 +852,7 @@ def InitSecParams(): def InitNimManager(nimmgr): InitSecParams() + hw = HardwareInfo() config.Nims = ConfigSubList() for x in range(len(nimmgr.nim_slots)): @@ -972,7 +983,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) |
