ManualFancontrol : fix default pwm 10->100 for ultimo
authorChang.H.S <jhs@dev3>
Wed, 9 Nov 2011 01:48:56 +0000 (10:48 +0900)
committerChang.H.S <jhs@dev3>
Wed, 9 Nov 2011 01:48:56 +0000 (10:48 +0900)
lib/python/Plugins/SystemPlugins/ManualFancontrol/InstandbyOn.py

index df7e5b6..e1c914f 100755 (executable)
@@ -5,10 +5,21 @@ from Components.ConfigList import ConfigListScreen
 from Components.config import config, ConfigSubsection, ConfigSelection, ConfigSlider
 from Components.Harddisk import harddiskmanager
 
+def getModel():
+       file = open("/proc/stb/info/vumodel", "r")
+       modelname = file.readline().strip()
+       file.close()
+       return modelname
+
 config.plugins.manualfancontrols = ConfigSubsection()
 config.plugins.manualfancontrols.standbymode = ConfigSelection(default = "yes", choices = [
        ("no", _("no")), ("yes", _("yes"))])
-config.plugins.manualfancontrols.pwmvalue = ConfigSlider(default = 10, increment = 5, limits = (0, 255))
+
+if getModel() == "ultimo":
+       config.plugins.manualfancontrols.pwmvalue = ConfigSlider(default = 100, increment = 5, limits = (0, 255))
+else:
+       config.plugins.manualfancontrols.pwmvalue = ConfigSlider(default = 10, increment = 5, limits = (0, 255))
+
 config.plugins.manualfancontrols.checkperiod = ConfigSelection(default = "10", choices = [
                ("5", "5 " + _("seconds")), ("10", "10 " + _("seconds")), ("30", "30 " + _("seconds")),
                ("60", "1 " + _("minute")), ("120", "2 " + _("minutes")),