Пример #1
0
 def check_fan(self):
     if SbigDriver.is_fanning():
         self.console.raise_text("Fan: ON", 2)
         time.sleep(1)
     else:
         self.console.raise_text("Fan: OFF", 2)
         time.sleep(1)
Пример #2
0
 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())
Пример #3
0
 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())
Пример #4
0
    def fan_status(self):
        # Acquiring the Lock
        self.lock.set_acquire()
        status = True

        try:
            # Doing requisition to Driver
            status = SbigDriver.is_fanning()
        except Exception as e:
            self.console.raise_text("Error acquiring the status of Fan.\n{}".format(e))

        # Release the Lock
        self.lock.set_release()

        return "ON" if status else "OFF"
Пример #5
0
    def fan_status(self):
        # Acquiring the Lock
        self.lock.set_acquire()
        status = True

        try:
            # Doing requisition to Driver
            status = SbigDriver.is_fanning()
        except Exception as e:
            self.console.raise_text("Error acquiring the status of Fan.\n{}".format(e))

        # Release the Lock
        self.lock.set_release()

        return "ON" if status else "OFF"