Fixed picamera setup

This commit is contained in:
Joel Collins 2020-01-29 16:16:09 +00:00
parent 7458d278d8
commit 265eed7bfa
4 changed files with 18 additions and 21 deletions

View file

@ -21,8 +21,8 @@ def recalibrate(microscope):
"""
scamera = microscope.camera
with scamera.lock:
assert not scamera.status["record_active"], "Can't recalibrate while recording!"
streaming = scamera.status["stream_active"]
assert not scamera.record_active, "Can't recalibrate while recording!"
streaming = scamera.stream_active
if streaming:
logging.info("Stopping stream before recalibration")
scamera.stop_stream_recording(resolution=(640, 480))

View file

@ -53,7 +53,7 @@ class MoveStageAPI(View):
logging.warning("Unable to move. No stage found.")
# TODO: Make schema for microscope status
return jsonify(microscope.status["stage"]["position"])
return jsonify(microscope.state["stage"]["position"])
@ThingAction