Loading openflexure_microscope/api/v1/blueprints/base.py +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ class ConfigAPI(MicroscopeView): :>header Content-Type: application/json :status 200: state available """ return jsonify(self.microscope.read_config()) return jsonify(self.microscope.read_config(json_safe=True)) def post(self): """ Loading Loading @@ -175,7 +175,7 @@ class ConfigAPI(MicroscopeView): self.microscope.write_config(payload.json) self.microscope.save_config() return jsonify(self.microscope.config) return jsonify(self.microscope.read_config(json_safe=True)) def construct_blueprint(microscope_obj): Loading openflexure_microscope/microscope.py +3 −3 Original line number Diff line number Diff line Loading @@ -200,14 +200,14 @@ class Microscope(object): # Cache config self.rc.write(config) def read_config(self): def read_config(self, json_safe=False): """ Read an updated config including camera settings. """ # If attached to a camera if self.camera: # Update camera config params from StreamingCamera object self.rc.write(self.camera.config) self.rc.write(self.camera.read_config()) # If attached to a stage if self.stage: Loading @@ -225,7 +225,7 @@ class Microscope(object): self.rc.write(backlash) return self.rc.read() return self.rc.read(json_safe=json_safe) def save_config(self): """ Loading Loading
openflexure_microscope/api/v1/blueprints/base.py +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ class ConfigAPI(MicroscopeView): :>header Content-Type: application/json :status 200: state available """ return jsonify(self.microscope.read_config()) return jsonify(self.microscope.read_config(json_safe=True)) def post(self): """ Loading Loading @@ -175,7 +175,7 @@ class ConfigAPI(MicroscopeView): self.microscope.write_config(payload.json) self.microscope.save_config() return jsonify(self.microscope.config) return jsonify(self.microscope.read_config(json_safe=True)) def construct_blueprint(microscope_obj): Loading
openflexure_microscope/microscope.py +3 −3 Original line number Diff line number Diff line Loading @@ -200,14 +200,14 @@ class Microscope(object): # Cache config self.rc.write(config) def read_config(self): def read_config(self, json_safe=False): """ Read an updated config including camera settings. """ # If attached to a camera if self.camera: # Update camera config params from StreamingCamera object self.rc.write(self.camera.config) self.rc.write(self.camera.read_config()) # If attached to a stage if self.stage: Loading @@ -225,7 +225,7 @@ class Microscope(object): self.rc.write(backlash) return self.rc.read() return self.rc.read(json_safe=json_safe) def save_config(self): """ Loading