From 61beb211aeeaa4ffc7708cb15591ef1ce92589d5 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 7 Nov 2018 11:04:01 +0000 Subject: [PATCH] More sensible creation of BaseCamera class properties --- openflexure_microscope/camera/base.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/openflexure_microscope/camera/base.py b/openflexure_microscope/camera/base.py index 9c15682d..459bb888 100644 --- a/openflexure_microscope/camera/base.py +++ b/openflexure_microscope/camera/base.py @@ -73,17 +73,15 @@ class CameraEvent(object): class BaseCamera(object): - thread = None # Background thread that reads frames from camera - camera = None # Camera object, for direct access to camera - - frame = None # Current frame is stored here by background thread - last_access = 0 # Time of last client access to the camera - event = CameraEvent() - - # CONTEXT MANAGER AND OBJECT CLEANUP - def __init__(self): """Base implementation of StreamingCamera.""" + self.thread = None # Background thread that reads frames from camera + self.camera = None # Camera object, for direct access to camera + + self.frame = None # Current frame is stored here by background thread + self.last_access = 0 # Time of last client access to the camera + self.event = CameraEvent() + self.state = {} # Create dict for capture state self.settings = {} # Create dict to store settings