def set_fan_off(self): self.lock.set_acquire() try: SbigDriver.stop_fan() except Exception as e: self.console.raise_text("Error off/on the Fan.\n{}".format(e)) finally: self.lock.set_release() self.fanField.setText(self.fan_status())
def s_fan(self): self.lock.set_acquire() try: if SbigDriver.is_fanning(): SbigDriver.stop_fan() self.fanField.setText('Fan Off') else: SbigDriver.start_fan() self.fanField.setText('Fan On') except Exception as e: self.console.raise_text("Error off/on the Fan.\n{}".format(e)) finally: self.lock.set_release() self.fanField.setText(self.fan_status())