aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Satconfig.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-02 14:35:58 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-02 14:35:58 +0000
commitf97a4e53dcd9321cfe4d026f8efac3a3fea1cb6a (patch)
tree87447df391296618793c1bd99761d9ec1d681a64 /lib/python/Screens/Satconfig.py
parent7ee3f3b8aaf43c8c712ce1c4c1d8b8c52e692e12 (diff)
downloadenigma2-f97a4e53dcd9321cfe4d026f8efac3a3fea1cb6a.tar.gz
enigma2-f97a4e53dcd9321cfe4d026f8efac3a3fea1cb6a.zip
dont use and show input power measurement (for rotor running detection),
when the hardware doesn't support it
Diffstat (limited to 'lib/python/Screens/Satconfig.py')
-rw-r--r--lib/python/Screens/Satconfig.py56
1 files changed, 33 insertions, 23 deletions
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py
index e32c45fb..5415ae05 100644
--- a/lib/python/Screens/Satconfig.py
+++ b/lib/python/Screens/Satconfig.py
@@ -1,5 +1,6 @@
from enigma import eDVBDB
from Screen import Screen
+from Components.SystemInfo import SystemInfo
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
@@ -29,18 +30,22 @@ class NimSetup(Screen, ConfigListScreen):
list.append(getConfigListEntry(" ", nim.longitudeOrientation))
list.append(getConfigListEntry(_("Latitude"), nim.latitude))
list.append(getConfigListEntry(" ", nim.latitudeOrientation))
-
- self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), nim.powerMeasurement)
- list.append(self.advancedPowerMeasurement)
- if nim.powerMeasurement.value:
- list.append(getConfigListEntry(_("Power threshold in mA"), nim.powerThreshold))
- self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), nim.turningSpeed)
- list.append(self.turningSpeed)
- if nim.turningSpeed.value == "fast epoch":
- self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), nim.fastTurningBegin)
- self.turnFastEpochEnd = getConfigListEntry(_("End time"), nim.fastTurningEnd)
- list.append(self.turnFastEpochBegin)
- list.append(self.turnFastEpochEnd)
+ if SystemInfo["CanMeasureFrontendInputPower"]:
+ self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), nim.powerMeasurement)
+ list.append(self.advancedPowerMeasurement)
+ if nim.powerMeasurement.value:
+ list.append(getConfigListEntry(_("Power threshold in mA"), nim.powerThreshold))
+ self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), nim.turningSpeed)
+ list.append(self.turningSpeed)
+ if nim.turningSpeed.value == "fast epoch":
+ self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), nim.fastTurningBegin)
+ self.turnFastEpochEnd = getConfigListEntry(_("End time"), nim.fastTurningEnd)
+ list.append(self.turnFastEpochBegin)
+ list.append(self.turnFastEpochEnd)
+ else:
+ if nim.powerMeasurement.value:
+ nim.powerMeasurement.value = False
+ nim.powerMeasurement.save()
def createSetup(self):
print "Creating setup"
@@ -199,17 +204,22 @@ class NimSetup(Screen, ConfigListScreen):
self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
- self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), currLnb.powerMeasurement)
- self.list.append(self.advancedPowerMeasurement)
- if currLnb.powerMeasurement.value:
- self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
- self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
- self.list.append(self.turningSpeed)
- if currLnb.turningSpeed.value == "fast epoch":
- self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
- self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
- self.list.append(self.turnFastEpochBegin)
- self.list.append(self.turnFastEpochEnd)
+ if SystemInfo["CanMeasureFrontendInputPower"]:
+ self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), currLnb.powerMeasurement)
+ self.list.append(self.advancedPowerMeasurement)
+ if currLnb.powerMeasurement.value:
+ self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
+ self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
+ self.list.append(self.turningSpeed)
+ if currLnb.turningSpeed.value == "fast epoch":
+ self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
+ self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
+ self.list.append(self.turnFastEpochBegin)
+ self.list.append(self.turnFastEpochEnd)
+ else:
+ if currLnb.powerMeasurement.value:
+ currLnb.powerMeasurement.value = False
+ currLnb.powerMeasurement.save()
self.advancedLof = getConfigListEntry(_("LOF"), currLnb.lof)
self.list.append(self.advancedLof)
if currLnb.lof.value == "user_defined":