Separated updating/writing from saving config
This commit is contained in:
parent
8087e4d445
commit
e9d74c07e6
5 changed files with 27 additions and 21 deletions
|
|
@ -65,7 +65,7 @@ def attach_microscope():
|
|||
logging.debug("First request made. Populating microscope with hardware...")
|
||||
|
||||
logging.debug("Creating camera object...")
|
||||
api_camera = StreamingCamera(config=api_microscope.rc.asdict())
|
||||
api_camera = StreamingCamera(config=api_microscope.rc.read())
|
||||
|
||||
logging.debug("Creating stage object...")
|
||||
api_stage = Stage("/dev/ttyUSB0")
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@ class ConfigAPI(MicroscopeView):
|
|||
|
||||
print(payload.json)
|
||||
|
||||
self.microscope.apply_config(payload.json)
|
||||
self.microscope.write_config(payload.json)
|
||||
self.microscope.save_config()
|
||||
|
||||
return jsonify(self.microscope.config)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue