Tidied up
This commit is contained in:
parent
4793de1283
commit
2574e38b47
2 changed files with 0 additions and 36 deletions
|
|
@ -46,17 +46,3 @@ class SnapshotStream(Resource):
|
|||
microscope.camera.start_worker()
|
||||
|
||||
return Response(microscope.camera.get_frame(), mimetype="image/jpeg")
|
||||
|
||||
|
||||
def add_streams_to_labthing(labthing, prefix=""):
|
||||
"""
|
||||
Add all stream resources to a labthing
|
||||
"""
|
||||
labthing.add_resource(
|
||||
MjpegStream, f"{prefix}/streams/mjpeg", endpoint="MjpegStream"
|
||||
)
|
||||
labthing.register_property(MjpegStream)
|
||||
labthing.add_resource(
|
||||
SnapshotStream, f"{prefix}/streams/snapshot", endpoint="SnapshotStream"
|
||||
)
|
||||
labthing.register_property(SnapshotStream)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue