This commit is contained in:
2025-12-08 16:51:41 +08:00
parent b8819ce014
commit a244db00b3

View File

@@ -334,9 +334,17 @@ class AndorCamera(CameraBase):
return []
try:
# Check if camera is available
if self.camera is None:
logger.error("Camera object is None, cannot get new frame")
return []
# Wait for frame and read available frames from camera
logger.debug("Waiting for frame...")
self.camera.wait_for_frame()
logger.debug("Reading multiple images...")
frames_data = self.camera.read_multiple_images()
logger.debug(f"Read {len(frames_data) if frames_data else 0} frames")
if frames_data and len(frames_data) > 0:
# Copy frames to buffer
@@ -370,10 +378,13 @@ class AndorCamera(CameraBase):
self.pre_frame_idx = self.current_frame_idx
return frame_indices
else:
logger.warning("No frames available from camera")
return []
except Exception as e:
import traceback
logger.error(f"Error getting new frame: {e}")
logger.error(f"Traceback: {traceback.format_exc()}")
return []
def set_ROI(