Merge commit 'origin/bug_449_fix_wlan_usbstick_recognition'
[enigma2.git] / lib / python / Components / FanControl.py
index cc133ac0a7bb4015f15b1e5199ed3a46520d751b..cee0523ee6b916f4f2365f4c22268411df751358 100644 (file)
@@ -11,6 +11,20 @@ class FanControl:
                else:
                        self.fancount = 0
                self.createConfig()
+               config.misc.standbyCounter.addNotifier(self.standbyCounterChanged, initial_call = False)
+
+       def leaveStandby(self):
+               for fanid in range(self.getFanCount()):
+                       cfg = self.getConfig(fanid)
+                       self.setVoltage(fanid, cfg.vlt.value)
+                       self.setPWM(fanid, cfg.pwm.value)
+
+       def standbyCounterChanged(self, configElement):
+               from Screens.Standby import inStandby
+               inStandby.onClose.append(self.leaveStandby)
+               for fanid in range(self.getFanCount()):
+                       self.setVoltage(fanid, 0)
+                       self.setPWM(fanid, 0)
 
        def createConfig(self):
                def setVlt(fancontrol, fanid, configElement):