X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/28dcf6be0ee22fedd728fef11ccff484f8a851e8..a7ed9db9532b7ac58dc3b923c0e3f9ee1789ddeb:/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py index 5dfacd8a..38e343f9 100644 --- a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py @@ -138,18 +138,26 @@ class TempFanControl(Screen, ConfigListScreen): }, -1) def save(self): - fancontrol.getConfig(0).vlt.save() - fancontrol.getConfig(0).pwm.save() + for count in range(fancontrol.getFanCount()): + fancontrol.getConfig(count).vlt.save() + fancontrol.getConfig(count).pwm.save() self.close() def revert(self): - fancontrol.getConfig(0).vlt.load() - fancontrol.getConfig(0).pwm.load() + for count in range(fancontrol.getFanCount()): + fancontrol.getConfig(count).vlt.load() + fancontrol.getConfig(count).pwm.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_EXTENSIONSMENU, fnc = main) + return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, fnc = startMenu) \ No newline at end of file