Skip to content
Snippets Groups Projects
Commit d1016488 authored by Christoph Schmidt's avatar Christoph Schmidt
Browse files

Updated files, now takes the simulator if the laser-lib has not been found

parent 2b89e8a4
No related branches found
No related tags found
No related merge requests found
# - Configuration file stored 2024-01-12 15:20:23.251862 -
# - Configuration file stored 2024-01-22 15:16:36.656752 -
LaserConfig: #!!python/object:controller.LaserConfig
wl_sweep_start: 857 # wl_sweep_start: None
wl_sweep_stop: 870 # wl_sweep_stop: None
......
......@@ -14,14 +14,14 @@ if os.getenv("LASER_SIM") == "TRUE":
from LaserControl.libs.LaserLibSimulator import LaserLibSimulator as LaserLib#, LaserLibSimulator
print("********** SIMUALTOR **********")
else:
#try:
#dir = pathlib.Path(f"{os.path.dirname(os.path.realpath(__file__))}/../libs")
#dir = str(dir.resolve())
#with os.add_dll_directory(dir):
#os.environ['PATH'] = dir + os.pathsep + os.environ['PATH']
#from LaserControl.libs.LaserLib import laserSacher as LaserLib
#except Exception as e:
# from LaserControl.libs.LaserLibSimulator import LaserLibSimulator as LaserLib
try:
dir = pathlib.Path(f"{os.path.dirname(os.path.realpath(__file__))}/../libs")
dir = str(dir.resolve())
with os.add_dll_directory(dir):
os.environ['PATH'] = dir + os.pathsep + os.environ['PATH']
from LaserControl.libs.LaserLib import laserSacher as LaserLib
except Exception as e:
from LaserControl.libs.LaserLibSimulator import LaserLibSimulator as LaserLib
print(f"********** SIMUALTOR (Fallback) **********")
......
......@@ -8,9 +8,3 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../../'))
dir = pathlib.Path(f"{os.path.dirname(os.path.realpath(__file__))}")
dir = str(dir.resolve().as_posix())
print(dir)
\ No newline at end of file
with os.add_dll_directory(dir):
#os.environ['PATH'] = dir + os.pathsep + os.environ['PATH']
#cdll.LoadLibrary("EposCmd64.dll")
from .LaserLib import *
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment