local_contact_panel.py: added config for autoamtion, currently just the sleep between mount and wait.
Build and Publish / test (push) Failing after 2m12s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped

This commit is contained in:
2026-07-03 11:28:07 +02:00
parent 6a90a01dbe
commit fdd0bd3868
+24
View File
@@ -35,6 +35,7 @@ from aare.daq import auth
from aare.common.beamline import mx_beamline
from aare.daq.config import BeamlineConfig
from aare.daq.daq import AareDAQ
from aare.daq.config_model import LocalContactConfigModel
from aare.daq.server_exception_handler import register_exception_handlers
@@ -760,6 +761,29 @@ async def local_contact_resync_detector_metadata(
"payload": payload,
}
@app.get("/local_contact/config")
async def local_contact_config(token: str = Depends(oauth2_scheme)) -> LocalContactConfigModel:
"""
Return Local Contact config values. Staff only.
"""
data = auth.parse_token(token)
auth.check_jwt_staff_only(data)
return daq.get_local_contact_config()
@app.put("/local_contact/config")
async def local_contact_set_config(
payload: LocalContactConfigModel,
token: str = Depends(oauth2_scheme),
) -> LocalContactConfigModel:
"""
Update Local Contact config values. Staff only.
"""
data = auth.parse_token(token)
auth.check_jwt_staff_only(data)
return daq.set_local_contact_config(payload)
@app.post("/beamline/goto_abr_meas_pos")
async def goto_abr_meas_pos(token: str = Depends(oauth2_scheme)):
"""