Skip to content

Commit

Permalink
Move retrieval of "label" field from configuration file at Instrument…
Browse files Browse the repository at this point in the history
… level
  • Loading branch information
mmouchous-ledger committed Nov 26, 2024
1 parent c1bb3fb commit 7a16420
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion laserstudio/instruments/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, config: dict):
"""
:param config: YAML configuration object
"""
super().__init__()
super().__init__(config=config)

# To refresh image regularly, in real-time
self.refresh_interval = cast(int, config.get("refresh_interval_ms", 200))
Expand Down
4 changes: 4 additions & 0 deletions laserstudio/instruments/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
class Instrument(QObject):
# Signal emitted when the instrument has a parameter which changed in another way than UI interface
parameter_changed = pyqtSignal(str, QVariant)

def __init__(self, config: dict):
super().__init__()
self.label = config.get("label")
1 change: 0 additions & 1 deletion laserstudio/instruments/laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def __init__(self, config: dict):
# Sweep parameters, in order to change the current_percentage
# regularly, within a random value from sweep_min to sweep_max,
# each sweep_freq applications
self.label = config.get("label")
self.sweep_max = 100.0
self.sweep_min = 0.0
self.sweep_freq = 100
Expand Down
2 changes: 1 addition & 1 deletion laserstudio/instruments/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class ProbeInstrument(Instrument):
def __init__(self, config: dict):
super().__init__()
super().__init__(config=config)
# Set manual position relative to the center position
# of the camera, eg in the StageSight coordinates.
self._fixed_pos: Optional[tuple[float, float]] = None
Expand Down
2 changes: 1 addition & 1 deletion laserstudio/instruments/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, config: dict):
"""
:param config: YAML configuration object
"""
super().__init__()
super().__init__(config=config)

device_type = config.get("type")
# To refresh stage position in the view, in real-time
Expand Down

0 comments on commit 7a16420

Please sign in to comment.