Commit bac20647 authored by Jerome Carnis's avatar Jerome Carnis 🦊
Browse files

deviceEigerP11.py: fix macroserver type

parent b4a0fdad
...@@ -4,7 +4,7 @@ import os ...@@ -4,7 +4,7 @@ import os
import time import time
from time import sleep from time import sleep
from threading import Thread from threading import Thread
from typing import Any, Dict, List, Optional, Tuple, Union from typing import Any, cast, Dict, List, Optional, Tuple, Union
import numpy as np import numpy as np
...@@ -28,6 +28,7 @@ from kamzik3.devices.device import Device ...@@ -28,6 +28,7 @@ from kamzik3.devices.device import Device
from kamzik3.devices.deviceTango import DeviceTango from kamzik3.devices.deviceTango import DeviceTango
from kamzik3.devices.general.deviceScanner import DeviceScanner from kamzik3.devices.general.deviceScanner import DeviceScanner
from kamzik3.macro.macro import Macro from kamzik3.macro.macro import Macro
from kamzik3.macro.macroServer import MacroServer
from kamzik3.macro.scan import Scan from kamzik3.macro.scan import Scan
from kamzik3.macro.step import Step, StepDeviceMethod from kamzik3.macro.step import Step, StepDeviceMethod
from kamzik3.snippets.snippetsDecorators import expose_method from kamzik3.snippets.snippetsDecorators import expose_method
...@@ -398,7 +399,7 @@ class EigerSwScanner(DeviceScanner): ...@@ -398,7 +399,7 @@ class EigerSwScanner(DeviceScanner):
raise DeviceError( raise DeviceError(
"kamzik session is None, can't get the device MacroServer" "kamzik session is None, can't get the device MacroServer"
) )
macro_server = kamzik3.session.get_device("MacroServer") macro_server = cast(MacroServer, kamzik3.session.get_device("MacroServer"))
current_scan_count = macro_server.get_macro_count() current_scan_count = macro_server.get_macro_count()
if current_scan_count != self.last_scan_count: if current_scan_count != self.last_scan_count:
self._init_new_scan(scanner_input, scanner_attributes, parent_macro) self._init_new_scan(scanner_input, scanner_attributes, parent_macro)
...@@ -420,7 +421,7 @@ class EigerSwScanner(DeviceScanner): ...@@ -420,7 +421,7 @@ class EigerSwScanner(DeviceScanner):
kamzik3.session.get_value(ATTR_SCAN_COUNT) kamzik3.session.get_value(ATTR_SCAN_COUNT)
) )
) )
macro_server = kamzik3.session.get_device("MacroServer") macro_server = cast(MacroServer, kamzik3.session.get_device("MacroServer"))
scan_prefix = macro_server.get_value(ATTR_MACRO_PREFIX) scan_prefix = macro_server.get_value(ATTR_MACRO_PREFIX)
scan_count = macro_server.get_macro_count() scan_count = macro_server.get_macro_count()
scan_dir_name = "{}_{}".format(scan_prefix, scan_count - 1) scan_dir_name = "{}_{}".format(scan_prefix, scan_count - 1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment