Skip to content
Snippets Groups Projects
Commit 8678bca9 authored by David Hammer's avatar David Hammer
Browse files

Add cool scene

parent 02a09112
No related branches found
No related tags found
2 merge requests!120DetectorAssembler: go to ERROR if trying to match without geometry,!118Draft: MID: put arbiter on manager scene
This commit is part of merge request !120. Comments created here will be created in the context of that merge request.
...@@ -342,7 +342,7 @@ class CompactDeviceLinkList(VerticalLayout): ...@@ -342,7 +342,7 @@ class CompactDeviceLinkList(VerticalLayout):
@titled("Assembler status", width=8 * NARROW_INC) @titled("Assembler status", width=8 * NARROW_INC)
@boxed @boxed
class AssemblerDeviceStatus(VerticalLayout): class AssemblerDeviceStatus(VerticalLayout):
def __init__(self, device_id): def __init__(self, device_id, geometry_device_id):
super().__init__(padding=0) super().__init__(padding=0)
name = DisplayLabelModel( name = DisplayLabelModel(
keys=[f"{device_id}.deviceId"], keys=[f"{device_id}.deviceId"],
...@@ -396,11 +396,29 @@ class AssemblerDeviceStatus(VerticalLayout): ...@@ -396,11 +396,29 @@ class AssemblerDeviceStatus(VerticalLayout):
width=14 * BASE_INC, width=14 * BASE_INC,
height=BASE_INC, height=BASE_INC,
), ),
DisplayLabelModel( # note: link based on current value when generating
keys=[f"{device_id}.geometryDevice"], DeviceSceneLinkModel(
text=geometry_device_id,
keys=[f"{geometry_device_id}.availableScenes"],
target="overview",
target_window=SceneTargetWindow.Dialog,
width=14 * BASE_INC, width=14 * BASE_INC,
height=BASE_INC, height=BASE_INC,
), # TODO: some day, get dynamic link to this friend ),
HorizontalLayout(
LabelModel(
text="My geometry:",
width=7 * BASE_INC,
height=BASE_INC,
),
DisplayStateColorModel(
show_string=True,
keys=[f"{device_id}.geometryState"],
width=7 * BASE_INC,
height=BASE_INC,
),
padding=0,
),
] ]
) )
...@@ -1095,11 +1113,11 @@ def correction_constant_dashboard( ...@@ -1095,11 +1113,11 @@ def correction_constant_dashboard(
@scene_generator @scene_generator
def detector_assembler_overview(device_id, schema): def detector_assembler_overview(device_id, schema, geometry_device_id):
schema_hash = schema_to_hash(schema) schema_hash = schema_to_hash(schema)
return VerticalLayout( return VerticalLayout(
HorizontalLayout( HorizontalLayout(
AssemblerDeviceStatus(device_id), AssemblerDeviceStatus(device_id, geometry_device_id),
PreviewSettings(device_id, schema_hash, "preview.assembled"), PreviewSettings(device_id, schema_hash, "preview.assembled"),
), ),
PreviewDisplayArea( PreviewDisplayArea(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment