Skip to content

Commit

Permalink
Suppress "Exposure sequence complete" messages when quiet.
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Jan 13, 2025
1 parent 5b35503 commit ae6e68c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions andor2_camd
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class CameraDaemon:
print(f'failed to set exposure ({exposure_seconds}s) with status {status}')
return status

def __run_exposure_sequence(self):
def __run_exposure_sequence(self, quiet):
"""Worker thread that acquires frames and their times.
Tagged frames are pushed to the acquisition queue
for further processing on another thread"""
Expand Down Expand Up @@ -481,7 +481,8 @@ class CameraDaemon:
'shutter_reference': self._shutter_count_reference
}, outfile)

log.info(self._config.log_name, 'Exposure sequence complete')
if not quiet:
log.info(self._config.log_name, 'Exposure sequence complete')
self._status = CameraStatus.Idle

@Pyro4.expose
Expand Down Expand Up @@ -1128,7 +1129,7 @@ class CameraDaemon:
self._sequence_frame_limit = count
self._sequence_frame_count = 0
self._stop_acquisition = False
self._acquisition_thread = threading.Thread(target=self.__run_exposure_sequence)
self._acquisition_thread = threading.Thread(target=self.__run_exposure_sequence, args=(quiet,))
self._acquisition_thread.daemon = False
self._acquisition_thread.start()
self._status = CameraStatus.Acquiring
Expand Down

0 comments on commit ae6e68c

Please sign in to comment.