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

Updated imports for simulator

parent b6a562e1
No related branches found
No related tags found
No related merge requests found
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
#======================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
\ No newline at end of file
......@@ -2,9 +2,17 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyNamespacePackagesService">
<option name="namespacePackageFolders">
<list>
<option value="$MODULE_DIR$/src/LaserControl" />
</list>
</option>
</component>
</module>
\ No newline at end of file
......@@ -4,12 +4,25 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="a50ed504-7e8f-431b-bd6d-7011e1ba5ef6" name="Changes" comment="Removed old source">
<list default="true" id="a50ed504-7e8f-431b-bd6d-7011e1ba5ef6" name="Changes" comment="Updated imports for simulator">
<change afterPath="$PROJECT_DIR$/src/LaserControl/libs_/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/lasercontrol.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/lasercontrol.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/LaserConfig.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/LaserConfig.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/examples/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/controller/ErrorConverter.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/controller/ErrorConverter.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/controller/LaserCon.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/controller/LaserCon.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/LaserLibSimulator.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/libs/LaserLibSimulator.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/controller/LaserControlController.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/controller/LaserControlController.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/model/LaserControlModel.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/model/LaserControlModel.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LaserControl/view/LaserControlView.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/view/LaserControlView.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/__init__.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/EposCmd64.dll" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/EposCmd64.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/EposCmd64.lib" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/EposCmd64.lib" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/LaserLib.pyd" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/LaserLib_.pyd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/LaserLibSimulator.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/LaserLibSimulator.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/LaserSceleton.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/LaserSceleton.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/libs/dc_motor.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/libs_/dc_motor.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -28,9 +41,9 @@
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 4
}]]></component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 4
}</component>
<component name="ProjectId" id="2YWpcvYpVcWaxnmlV5VcPRCDFRU" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
......@@ -43,21 +56,27 @@
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "true",
"ignore.virus.scanning.warn.message": "true",
"last_opened_file_path": "H:/ET PhD - Dokumente/Silicon Photonics/FlexSensor 6/flexsensor-public/lasercontrol/src/LaserControl/view",
"last_opened_file_path": "H:/ET PhD - Dokumente/Silicon Photonics/FlexSensor 6/flexsensor-public/lasercontrol/src/LaserControl/libs",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PythonContentEntriesConfigurable",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\libs" />
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\libs" />
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\view" />
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\model" />
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\controller" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl" />
</key>
</component>
<component name="RunManager">
<configuration name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
......@@ -66,7 +85,7 @@
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="LASER_SIM" value="TRUE" />
<env name="LASER_SIM" value="FALSE" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.10 (lasercontrol) (2)" />
......@@ -93,7 +112,8 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1700651272522</updated>
<workItem from="1700651273767" duration="1075000" />
<workItem from="1700651273767" duration="3373000" />
<workItem from="1700728983624" duration="3471000" />
</task>
<task id="LOCAL-00001" summary="Updated import statements">
<option name="closed" value="true" />
......@@ -111,7 +131,15 @@
<option name="project" value="LOCAL" />
<updated>1700652165504</updated>
</task>
<option name="localTasksCounter" value="3" />
<task id="LOCAL-00003" summary="Updated imports for simulator">
<option name="closed" value="true" />
<created>1700652568711</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1700652568711</updated>
</task>
<option name="localTasksCounter" value="4" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -120,9 +148,10 @@
<component name="VcsManagerConfiguration">
<MESSAGE value="Updated import statements" />
<MESSAGE value="Removed old source" />
<option name="LAST_COMMIT_MESSAGE" value="Removed old source" />
<MESSAGE value="Updated imports for simulator" />
<option name="LAST_COMMIT_MESSAGE" value="Updated imports for simulator" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/lasercontrol$main.coverage" NAME="main Coverage Results" MODIFIED="1700652441160" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
<SUITE FILE_PATH="coverage/lasercontrol$main.coverage" NAME="main Coverage Results" MODIFIED="1700739934989" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
</component>
</project>
\ No newline at end of file
# - Configuration file stored 2023-11-22 12:20:51.760060 -
# - Configuration file stored 2023-11-23 12:45:38.730755 -
LaserConfig: #!!python/object:controller.LaserConfig
wl_sweep_start: 840 # wl_sweep_start: None
wl_sweep_stop: 850 # wl_sweep_stop: None
velocity: 2.0 # velocity: None
acceleration: 1.0 # acceleration: None
velocity: 1.0 # velocity: None
acceleration: 2.0 # acceleration: None
deceleration: 1.0 # deceleration: None
available_ports: ['USB0', 'USB1', 'USB2', 'USB3', 'USB4', 'USB5', 'USB6', 'USB7', 'USB8', 'USB9'] # available_ports: None
port: "USB0" # port: None
......@@ -14,7 +14,10 @@ if __name__ == "__main__":
]
)
if not QApplication.instance():
app = QApplication(sys.argv)
else:
app = QApplication.instance()
conf = Laser.Config()
#conf.load("config.yaml")
......@@ -27,4 +30,4 @@ if __name__ == "__main__":
window.show()
sys.exit(app.exec_())
\ No newline at end of file
sys.exit(app.exec())
\ No newline at end of file
......@@ -7,4 +7,4 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
from .controller.LaserControlController import LaserControlController as Controller
from .model.LaserControlModel import LaserControlModel as Model
from .view.LaserControlView import LaserControlView as View
from LaserConfig import LaserConfig as Config
\ No newline at end of file
from .LaserConfig import LaserConfig as Config
\ No newline at end of file
from controller.LaserControlErrors import LaserNotConnectedError
from LaserControl.controller.LaserControlErrors import LaserNotConnectedError
class ErrorConverter:
......
......@@ -5,12 +5,21 @@ import sys
import tempfile
from contextlib import contextmanager
from controller.ErrorConverter import ErrorConverter
from PySide6.QtWidgets import QFileDialog, QApplication
from LaserControl.controller.ErrorConverter import ErrorConverter
if os.getenv("LASER_SIM") == "TRUE":
from libs.LaserLibSimulator import LaserLibSimulator as LaserLib
from LaserControl.libs.LaserLibSimulator import LaserLibSimulator as LaserLib
else:
from libs.LaserLib import laserSacher as LaserLib
try:
from LaserControl.libs import laserSacher as LaserLib
except Exception as e:
from LaserControl.libs.LaserLibSimulator import LaserLibSimulator as LaserLib
@contextmanager
def stdout_redirector(stream):
......
......@@ -4,11 +4,11 @@ from multiprocessing import Value, Lock, Process
from PySide6.QtCore import QThreadPool
from model.LaserControlModel import LaserControlModel
from controller.LaserCon import LaserCon
from controller.multiprocess.LaserStateArray import LaserStateArray
from controller.multiprocess.move_to_wavelength import move_to_wavelength
from controller.multiprocess.wavelength_sweep import wavelength_sweep
from LaserControl.model.LaserControlModel import LaserControlModel
from LaserControl.controller.LaserCon import LaserCon
from LaserControl.controller.multiprocess.LaserStateArray import LaserStateArray
from LaserControl.controller.multiprocess.move_to_wavelength import move_to_wavelength
from LaserControl.controller.multiprocess.wavelength_sweep import wavelength_sweep
class LaserControlController:
......
......@@ -3,7 +3,7 @@ import time
from random import randint
from libs.LaserSceleton import LaserScelton
from LaserControl.libs.LaserSceleton import LaserScelton
class LaserLibSimulator(LaserScelton):
......
File moved
#import mcpy
from LaserConfig import LaserConfig
from model.LaserControlSignals import LaserControlSignals
from LaserControl.LaserConfig import LaserConfig
from LaserControl.model.LaserControlSignals import LaserControlSignals
#from LaserControl.model.LaserControlSignals import LaserControllerSignals
......
......@@ -2,10 +2,10 @@ import logging
from PySide6.QtWidgets import QMainWindow
from controller.LaserControlController import LaserControlController
from view.Ui_LaserControlWindow import Ui_LaserControlWindow
from model.LaserControlModel import LaserControlModel
from view.WidgetLaserInformation import WidgetLaserInformation
from LaserControl.controller.LaserControlController import LaserControlController
from LaserControl.view.Ui_LaserControlWindow import Ui_LaserControlWindow
from LaserControl.model.LaserControlModel import LaserControlModel
from LaserControl.view.WidgetLaserInformation import WidgetLaserInformation
class LaserControlView(QMainWindow):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment