- self.InitTimer = eTimer()
- if self.initConfig not in self.InitTimer.callback:
- self.InitTimer.callback.append(self.initConfig)
- print "<SimpleFancontrol> init : Timer loop start!!"
- self.InitTimer.startLongTimer(3)
- print "<SimpleFancontrol> init : self.fanoffmode : ", self.fanoffmode
- print "<SimpleFancontrol> init : config.plugins.simplefancontrols.pwmvalue.value : ", config.plugins.simplefancontrols.pwmvalue.value
-
- def initConfig(self):
- print "<SimpleFancontrol>Try initConfig..."
- if NavigationInstance.instance is None:
- self.InitTimer.startLongTimer(1)
- else:
- if config.plugins.simplefancontrols.pwmvalue.value == 0:
- NavigationInstance.instance.record_event.append(self.getRecordEvent_onFanOFF)
- recordings = NavigationInstance.instance.getRecordings()
- print "<SimpleFancontrol> initConfig : recordings : ", recordings
- if recordings:
- self.setPWM(self.default_pwm_value_onRecordings)
- else:
- self.setPWM(0)
+ if self.fanoffmode == 'ON':
+ self.checkStatusLoopStart()
+
+ config.misc.standbyCounter.addNotifier(self.standbyBegin, initial_call = False)
+ print "<ManualFancontrol> init : self.fanoffmode : ", self.fanoffmode
+ print "<ManualFancontrol> init : config.plugins.manualfancontrols.pwmvalue.value : ", config.plugins.manualfancontrols.pwmvalue.value
+
+ def checkStatusLoopStart(self):
+ print "<ManualFancontrol> checkStatusLoopStart"
+ self.checkStstusTimer.start(int(config.plugins.manualfancontrols.checkperiod.value) * 1000)
+
+ def checkStatusLoopStop(self):
+ print "<ManualFancontrol> checkStatusLoopStop"
+ self.checkStstusTimer.stop()
+
+ def checkStstus(self):
+ from Screens.Standby import inStandby
+ print "<ManualFancontrol> checkStstus, fanoffmode : %s, "%self.fanoffmode,"inStandby : ",inStandby and True or False
+ if self.fanoffmode is 'ON' : # pwmvalue is '0'
+ if self.isRecording() or self.isHDDActive():
+ self.setPWM(self.minimum_pwm)
+ else:
+ self.setPWM(0)
+ elif inStandby : # standby mode but pwm > 0
+ if self.isRecording() or self.isHDDActive():
+ self.setPWM(config.plugins.manualfancontrols.pwmvalue.value)