Exemplo n.º 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)
Exemplo n.º 2
0
Arquivo: fan.py Projeto: hiyoku/ccd10
 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())
Exemplo n.º 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())
Exemplo n.º 4
0
Arquivo: fan.py Projeto: hiyoku/ccd10
    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"
Exemplo n.º 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"