Example #1
0
 def stop_taking_photo(self):
     if getlinkstatus() is True:
         if not self.continuousShooterThread.wait_temperature:
             self.continuousShooterThread.stop_continuous_shooter()
         self.continuousShooterThread.stop_continuous_shooter()
         # self.standby_mode()
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #2
0
 def start_taking_photo(self):
     try:
         if getlinkstatus() is True:
             self.continuousShooterThread.start_continuous_shooter()
             self.continuousShooterThread.start()
         else:
             self.console.raise_text("The camera is not connected", 3)
     except Exception as e:
         print(e)
Example #3
0
 def stop_taking_photo(self):
     try:
         if getlinkstatus() is True:
             self.continuousShooterThread.stop_continuous_shooter()
         else:
             self.console.raise_text("The camera is not connected!", 3)
     except Exception as e:
         self.console.raise_text(
             "Error stop_continuous_shooter! {}".format(e), 3)
Example #4
0
 def start_taking_photo(self):
     try:
         if getlinkstatus() is True:
             self.shooter_mode()
             self.continuousShooterThread.start_continuous_shooter()
             self.continuousShooterThread.start()
         else:
             self.console.raise_text("The camera is not connected", 3)
     except Exception as e:
         print(e)
Example #5
0
 def button_fan_func(self):
     if getlinkstatus() is True:
         try:
             self.fan.set_fan()
             self.console.raise_text('State changed Fan!', 2)
         except Exception:
             self.console.raise_text("The camera is not connected!", 3)
             self.console.raise_text('State Fan unchanged', 3)
     else:
         self.console.raise_text("The camera is not connected!", 3)
         self.console.raise_text('State Fan unchanged', 3)
Example #6
0
 def start_taking_photo(self):
     try:
         if getlinkstatus() is True:
             self.shooter_mode()
             self.continuousShooterThread.start_continuous_shooter()
             self.continuousShooterThread.start()
         else:
             self.console.raise_text("Error start_taking_photo!", 3)
     except Exception as e:
         self.console.raise_text("Error start_taking_photo! {}".format(e),
                                 3)
Example #7
0
 def button_fan_func(self):
     if getlinkstatus() is True:
         try:
             self.fan.set_fan()
             self.console.raise_text('State changed Fan!', 2)
         except Exception:
             self.console.raise_text("The camera is not connected!", 3)
             self.console.raise_text('State Fan unchanged', 3)
     else:
         self.console.raise_text("The camera is not connected!", 3)
         self.console.raise_text('State Fan unchanged', 3)
Example #8
0
 def set_temperature(self, value):
     if getlinkstatus() is True:
         self.lock.set_acquire()
         try:
             set_temperature(regulation=True, setpoint=value, autofreeze=False)
         except Exception as e:
             self.console.raise_text("Error setting the temperature.\n{}".format(e), 3)
         finally:
             self.lock.set_release()
             self.console.raise_text("Temperature set to {}°C".format(int(value)), 1)
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #9
0
 def set_temperature(self, value):
     if getlinkstatus() is True:
         self.lock.set_acquire()
         try:
             set_temperature(regulation=True, setpoint=value, autofreeze=False)
         except Exception as e:
             self.console.raise_text("Error setting the temperature.\n{}".format(e), 3)
         finally:
             self.lock.set_release()
             self.console.raise_text("Temperature set to {}".format(int(value)), 1)
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #10
0
    def info_cam(self):
        try:
            if getlinkstatus() is True:
                self.firmware, self.model, self.y_pixels, self.x_pixels = \
                    self.cam.get_firmware_and_model_and_pixels()
            else:
                self.firmware, self.model, self.y_pixels, self.x_pixels = "????", "????", \
                                                                          "????", "????"

            self.info_port_ccd_f.setText(self.firmware)
            self.info_camera_model_f.setText(self.model)
            self.info_pixel_array_f.setText(str(self.y_pixels) + " x " + str(self.x_pixels))

        except Exception as e:
            print("CCDInfos get_firmware_and_model_and_pixels -> {}".format(e))
            self.firmware, self.model, self.y_pixels, self.x_pixels = "????", "????", \
                                                                      "????", "????"
Example #11
0
    def get_temperature(self):
        temp = "None"
        try:
            if getlinkstatus() is True:
                if not self.lock.is_locked():
                    self.lock.set_acquire()
                    temp = tuple(get_temperature())[3]
                    self.temp = temp
                    self.lock.set_release()
                else:
                    temp = "None"
            else:
                # if getlinkstatus() is True:
                #     sleep(1)
                #     self.lock.set_acquire()
                #     temp = tuple(get_temperature())[3]
                #     self.lock.set_release()
                temp = "None"
        except Exception as e:
            self.console.raise_text("Unable to retrieve the temperature.\n{}".format(e), 3)

        return temp
Example #12
0
    def get_temperature(self):
        temp = "None"
        try:
            if getlinkstatus() is True:
                if not self.lock.is_locked():
                    self.lock.set_acquire()
                    temp = tuple(get_temperature())[3]
                    self.temp = temp
                    self.lock.set_release()
                else:
                    temp = "None"
            else:
                # if getlinkstatus() is True:
                #     sleep(1)
                #     self.lock.set_acquire()
                #     temp = tuple(get_temperature())[3]
                #     self.lock.set_release()
            # else:
                temp = "None"
        except Exception as e:
            self.console.raise_text("Unable to retrieve the temperature.\n{}".format(e), 3)

        return temp
Example #13
0
 def check_link(self):
     return getlinkstatus()
Example #14
0
 def stop_taking_photo(self):
     if getlinkstatus() is True:
         self.continuousShooterThread.stop_continuous_shooter()
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #15
0
 def stop_taking_photo(self):
     if getlinkstatus() is True:
         self.continuousShooterThread.stop_continuous_shooter()
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #16
0
 def check_link(self):
     return getlinkstatus()
Example #17
0
 def stop_ephemeris_shooter(self):
     if getlinkstatus() is True:
         self.ephemerisShooterThread.stop_shooter()
         # self.standby_mode()
     else:
         self.console.raise_text("The camera is not connected!", 3)
Example #18
0
 def stop_ephemeris_shooter(self):
     if getlinkstatus() is True:
         self.ephemerisShooterThread.stop_shooter()
     else:
         self.console.raise_text("The camera is not connected!", 3)