aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-03-24 11:29:50 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-03-31 11:04:13 +0200
commitb3634186b1ede88201f68838e40a977c1beeff1a (patch)
treed4ec8e0c36eba1f175fc16e9d51036b2e3646719 /lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
parentdcaeeda79416cf9a2f41da09bcfca84de127605d (diff)
downloadenigma2-b3634186b1ede88201f68838e40a977c1beeff1a.tar.gz
enigma2-b3634186b1ede88201f68838e40a977c1beeff1a.zip
add possibility to separately set fan voltage and fan pwm for standby and normal run
when a recording starts in standby switch to normal mode and vice versa this fixes bug #430 (thx to Dr.Best)
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py')
-rw-r--r--lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
index 38e343f9..c8af9cdd 100644
--- a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
@@ -12,7 +12,7 @@ from Components.FanControl import fancontrol
class TempFanControl(Screen, ConfigListScreen):
skin = """
- <screen position="90,100" size="570,420" title="Fan Control" >
+ <screen position="center,center" size="570,420" title="Fan Control" >
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
@@ -22,7 +22,7 @@ class TempFanControl(Screen, ConfigListScreen):
<widget source="yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
<widget source="blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
- <widget name="config" position="10,50" size="550,90" scrollbarMode="showOnDemand" />
+ <widget name="config" position="10,50" size="550,120" scrollbarMode="showOnDemand" />
<widget source="SensorTempText0" render="Label" position="10,150" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
<widget source="SensorTemp0" render="Label" position="100,150" zPosition="1" size="100,20" font="Regular;19" halign="right">
@@ -90,7 +90,7 @@ class TempFanControl(Screen, ConfigListScreen):
<convert type="SensorToText"></convert>
</widget>
</screen>"""
-
+
def __init__(self, session, args = None):
Screen.__init__(self, session)
@@ -125,6 +125,9 @@ class TempFanControl(Screen, ConfigListScreen):
for count in range(fancontrol.getFanCount()):
self.list.append(getConfigListEntry(_("Fan %d Voltage") % (count + 1), fancontrol.getConfig(count).vlt))
self.list.append(getConfigListEntry(_("Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm))
+ self.list.append(getConfigListEntry(_("Standby Fan %d Voltage") % (count + 1), fancontrol.getConfig(count).vlt_standby))
+ self.list.append(getConfigListEntry(_("Standby Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm_standby))
+
ConfigListScreen.__init__(self, self.list, session = self.session)
#self["config"].list = self.list
#self["config"].setList(self.list)
@@ -136,28 +139,31 @@ class TempFanControl(Screen, ConfigListScreen):
"red": self.revert,
"green": self.save
}, -1)
-
+
def save(self):
for count in range(fancontrol.getFanCount()):
fancontrol.getConfig(count).vlt.save()
fancontrol.getConfig(count).pwm.save()
+ fancontrol.getConfig(count).vlt_standby.save()
+ fancontrol.getConfig(count).pwm_standby.save()
self.close()
-
+
def revert(self):
for count in range(fancontrol.getFanCount()):
fancontrol.getConfig(count).vlt.load()
fancontrol.getConfig(count).pwm.load()
+ fancontrol.getConfig(count).vlt_standby.load()
+ fancontrol.getConfig(count).pwm_standby.load()
self.close()
-
+
def main(session, **kwargs):
session.open(TempFanControl)
def startMenu(menuid):
if menuid != "system":
return []
-
return [(_("Temperature and Fan control"), main, "tempfancontrol", 80)]
def Plugins(**kwargs):
return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, fnc = startMenu)
- \ No newline at end of file
+