Commit 75abfa2c authored by vertighel's avatar vertighel
Browse files

refactor: rimuove classi commentate da api/camera.py; v0.7

parent 94419ade
Loading
Loading
Loading
Loading
Loading
+0 −83
Original line number Diff line number Diff line
@@ -196,89 +196,6 @@ class SnapshotState(BaseResource):
        res = constants.camera_state.get(raw, "Off")
        return self.make_response(res, raw_data=raw)

# class Snapshot(BaseResource):
#     """Manage the acquisition of an image using the sequencer."""

#     async def get(self):
#         """Retrieve the status of the image process."""
        
#         data = {
#             "paused": seq.tpl.paused if seq.tpl else None,
#             "quitting": seq.tpl.aborted if seq.tpl else None,
#         }
#         return self.make_response(data)

#     async def post(self):
#         """Start a new image."""
#         data = await self.get_payload()
#         # Templates are Layer 2
#         await self.run_blocking(seq.tpl.run, data)
#         return self.make_response(getattr(seq.tpl, 'filenames', []))

#     async def delete(self):
#         """Stop the image process."""
        
#         res = await self.run_blocking(seq.tpl.abort)
#         return self.make_response(res)

# class SnapshotRecenter(BaseResource):
#     """Manage the recentering via the the apply_offset function"""

#     async def get(self):
#         """Retrieve the recenter status and parameters of the box."""
        
#         res = {
#             "recenter": getattr(seq.tpl, 'recenter', None),
#             "box": getattr(seq.tpl, 'box', None),
#         }
#         return self.make_response(res)

#     async def put(self):
#         """Set a given box to the recentering function"""
        
#         data = await self.get_payload()
#         if seq.tpl:
#             seq.tpl.box = data
#         return self.make_response(getattr(seq.tpl, 'box', None))

#     async def post(self):
#         """Enable the recentering function."""
        
#         if seq.tpl:
#             seq.tpl.recenter = True
#         return self.make_response(True)

#     async def delete(self):
#         """Disable the recentering function."""
        
#         if seq.tpl:
#             seq.tpl.recenter = False
#         return self.make_response(False)

# class SnapshotDomeslewing(BaseResource):
#     """Get dome slewing status"""

#     async def get(self):
#         """Retrieve the domeslewing status"""
        
#         res = {"domeslewing": getattr(seq.tpl, 'domeslewing', None)}
#         return self.make_response(res)

#     async def post(self):
#         """Enable the domeslewing function."""
        
#         if seq.tpl:
#             seq.tpl.domeslewing = True
#         return self.make_response(True)

#     async def delete(self):
#         """Disable the domeslewing function."""
        
#         if seq.tpl:
#             seq.tpl.domeslewing = False
#         return self.make_response(False)


class Connection(BaseResource):
    '''Manage the connection to ASCOM.'''

+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "noctua"
version = "0.6"
version = "0.7"
authors = [
    { name="Davide Ricci", email="davide.ricci@inaf.it" },
]