X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2FSystemPlugins%2FManualFancontrol%2Fplugin.py;h=9715bcbc866eb56333c5e559895fa7872071d0a4;hp=d38ed8cbb738fe3b79ae9d57faa7a8bc3575b839;hb=ae49c64044d1a591af5d8a5f1bfa79d9f43e080b;hpb=131b56110765786c73f5406979fdbbab0afb2d81 diff --git a/lib/python/Plugins/SystemPlugins/ManualFancontrol/plugin.py b/lib/python/Plugins/SystemPlugins/ManualFancontrol/plugin.py index d38ed8c..9715bcb 100755 --- a/lib/python/Plugins/SystemPlugins/ManualFancontrol/plugin.py +++ b/lib/python/Plugins/SystemPlugins/ManualFancontrol/plugin.py @@ -7,6 +7,7 @@ from Components.Sources.StaticText import StaticText from Plugins.Plugin import PluginDescriptor from Plugins.SystemPlugins.ManualFancontrol.InstandbyOn import instandbyon import NavigationInstance +from enigma import eTimer class ManualFancontrol(Screen,ConfigListScreen): skin = """ @@ -41,11 +42,21 @@ class ManualFancontrol(Screen,ConfigListScreen): self.oldfanoffmode = instandbyon.fanoffmode if instandbyon.fanoffmode is 'ON' : instandbyon.checkStatusLoopStop() + self.checkFanTimer = eTimer() + self.checkFanTimer.callback.append(self.fan_pwm_error) + self.onLayoutFinish.append(self.checkFan) + + def checkFan(self): + if not instandbyon.check_fan_pwm(): + self.checkFanTimer.start(10,True) + + def fan_pwm_error(self): + self.session.openWithCallback(self.close, MessageBox, _("Can not open 'fan_pwm'"), MessageBox.TYPE_ERROR) def displayCurrentValue(self): currrent_val = self["config"].getCurrent()[0]+" : "+str(self["config"].getCurrent()[1].value) self["current"].setText(_(currrent_val)) - print currrent_val +# print currrent_val def selectionChanged(self): if self["config"].getCurrent() == self.pwmEntry: @@ -90,12 +101,12 @@ class ManualFancontrol(Screen,ConfigListScreen): def keySave(self): if instandbyon.fanoffmode is 'OFF' and config.plugins.manualfancontrols.pwmvalue.value == 0: - print " instandbyon.fanoffmode 'OFF' -> 'ON'" +# print "[ManualFancontrol] instandbyon.fanoffmode 'OFF' -> 'ON'" instandbyon.fanoffmode = 'ON' instandbyon.addRecordEventCB() instandbyon.checkStatusLoopStart() elif instandbyon.fanoffmode is 'ON' and config.plugins.manualfancontrols.pwmvalue.value != 0: - print " instandbyon.fanoffmode 'ON' -> 'OFF'" +# print "[ManualFancontrol] instandbyon.fanoffmode 'ON' -> 'OFF'" instandbyon.fanoffmode = 'OFF' instandbyon.removeRecordEventCB() # instandbyon.checkStatusLoopStop() # stoped at init