Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LaserControl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FlexSensor-public
LaserControl
Commits
d1016488
Commit
d1016488
authored
Jan 22, 2024
by
Christoph Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
LaserConfig.yaml
+1
-1
1 addition, 1 deletion
LaserConfig.yaml
src/LaserControl/controller/LaserCon.py
+8
-8
8 additions, 8 deletions
src/LaserControl/controller/LaserCon.py
src/LaserControl/libs/__init__.py
+1
-7
1 addition, 7 deletions
src/LaserControl/libs/__init__.py
with
10 additions
and
16 deletions
LaserConfig.yaml
+
1
−
1
View file @
d1016488
# - Configuration file stored 2024-01-
1
2 15:
20:23.25186
2 -
# - Configuration file stored 2024-01-
2
2 15:
16:36.65675
2 -
LaserConfig
:
#!!python/object:controller.LaserConfig
wl_sweep_start
:
857
# wl_sweep_start: None
wl_sweep_stop
:
870
# wl_sweep_stop: None
...
...
This diff is collapsed.
Click to expand it.
src/LaserControl/controller/LaserCon.py
+
8
−
8
View file @
d1016488
...
...
@@ -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) **********
"
)
...
...
This diff is collapsed.
Click to expand it.
src/LaserControl/libs/__init__.py
+
1
−
7
View file @
d1016488
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment