SFELPHOTON-1337: SwissMX split/ cleanup/move repositories

This commit is contained in:
2024-09-24 18:56:27 +02:00
parent e63c814662
commit 3a0367073e
8 changed files with 130 additions and 40 deletions

View File

@@ -45,7 +45,7 @@ all = 0xff
class IlluminationControl(object):
def __init__(self,hostname: str="129.129.221.92",port: int=1003):
def __init__(self,hostname: str="129.129.221.71",port: int=1003):
if hostname is None: #simulated mode
self._sim={'stat':0}
_log.info('simulated mode:{}'.format(self._sim))
@@ -59,7 +59,10 @@ class IlluminationControl(object):
# connect to XT-PICO
self._socket=s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(1)
s.connect((self._hostname, self._port))
try:
s.connect((self._hostname, self._port))
except socket.timeout as e:
_log.error(f"{e} can't connect to: {self._hostname}:{self._port}")
def disconnect(self):
try: