Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
calng
Commits
7bb78f18
Commit
7bb78f18
authored
3 years ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
manager: Add slot to (re-)apply managed values
parent
afdb4806
No related branches found
No related tags found
2 merge requests
!12
Snapshot: field test deployed version as of end of run 202201
,
!3
Base correction device, CalCat interaction, DSSC and AGIPD devices
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/CalibrationManager.py
+19
-0
19 additions, 0 deletions
src/calng/CalibrationManager.py
with
19 additions
and
0 deletions
src/calng/CalibrationManager.py
+
19
−
0
View file @
7bb78f18
...
...
@@ -413,6 +413,13 @@ class CalibrationManager(DeviceClientBase, Device):
self
.
state
=
State
.
CHANGING
background
(
self
.
_instantiate_pipeline
())
@Slot
(
displayedName
=
'
Apply managed values
'
,
description
=
'
Set all managed keys to the values currently active on
'
'
the manager, replacing any manual change.
'
,
allowedStates
=
[
State
.
ACTIVE
])
async
def
applyManagedValues
(
self
):
background
(
self
.
_apply_managed_values
())
managed
=
Node
(
ManagedKeysNode
,
...
...
@@ -1228,6 +1235,18 @@ class CalibrationManager(DeviceClientBase, Device):
self
.
_set_status
(
'
All devices instantiated
'
)
self
.
state
=
State
.
ACTIVE
async
def
_apply_managed_values
(
self
):
"""
Apply all managed keys to local values.
"""
for
daq_key
,
local_key
in
ManagedKeysNode
.
DAQ_KEYS
.
items
():
await
self
.
_set_on_daq
(
daq_key
,
get_property
(
self
,
f
'
managed.
{
local_key
}
'
))
for
key
in
self
.
_managed_keys
:
value
=
get_property
(
self
,
f
'
managed.
{
key
}
'
)
if
not
ismethod
(
value
):
await
self
.
_set_on_corrections
(
key
,
value
)
def
_call
(
self
,
device_ids
,
slot
,
*
args
):
"""
Call the same slot on a list of devices.
"""
...
...
This diff is collapsed.
Click to expand it.
David Hammer
@hammerd
mentioned in commit
3566342d
·
2 years ago
mentioned in commit
3566342d
mentioned in commit 3566342d031db1bb435b6430f100afdbaaa6c4bf
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment