diff --git a/oresat_cfc/drivers/pirt1280.py b/oresat_cfc/drivers/pirt1280.py index 6524503..e4637dd 100644 --- a/oresat_cfc/drivers/pirt1280.py +++ b/oresat_cfc/drivers/pirt1280.py @@ -247,7 +247,7 @@ def integration_time(self) -> int: @integration_time.setter def integration_time(self, value: int): - if value == self._integration_time: + if not self.is_enabled or value == self._integration_time: return # nothing todo # from the specified number of integration_time, get the number of integration_time diff --git a/oresat_cfc/services/camera.py b/oresat_cfc/services/camera.py index 3c449e1..ea5a876 100644 --- a/oresat_cfc/services/camera.py +++ b/oresat_cfc/services/camera.py @@ -199,8 +199,6 @@ def _on_read_cam_temp(self) -> int: def _on_read_cam_integration(self) -> int: """SDO read callback for camera integration time.""" - print(self._pirt1280.integration_time) - return self._pirt1280.integration_time def _on_write_cam_integration(self, value: int): @@ -211,6 +209,8 @@ def _on_write_cam_integration(self, value: int): def _on_read_last_display_capture(self) -> bytes: """SDO read callback for display image.""" + if not self._last_capture_obj.value: + return b"" return make_display_image(self._last_capture_obj.value, sat_percent=95, downscale_factor=2) def _on_read_cam_enabled(self) -> bytes: