wip st-ten-2 support for multimeter and no camera/neopixel
This commit is contained in:
parent
fca98bdd0f
commit
887766f8ce
@ -1,3 +1,9 @@
|
|||||||
|
[hardware_config]
|
||||||
|
tecna_t3: present
|
||||||
|
neo_pixels: present
|
||||||
|
galaxy_camera: present
|
||||||
|
multimeter: absent
|
||||||
|
|
||||||
[galaxy_camera]
|
[galaxy_camera]
|
||||||
horizontal_resolution: 2448
|
horizontal_resolution: 2448
|
||||||
vertical_resolution: 2048
|
vertical_resolution: 2048
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[hostnames]
|
[hostnames]
|
||||||
ST-RES-1: stres1
|
ST-TEN-2: stten2
|
||||||
ST-TEN-1: stten1
|
ST-TEN-1: stten1
|
||||||
this: this
|
this: this
|
||||||
mino: mino
|
mino: mino
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
[tecna_t3]
|
[hardware_config]
|
||||||
port: COM5
|
tecna_t3: present
|
||||||
|
neo_pixels: absent
|
||||||
[neo_pixels]
|
galaxy_camera: absent
|
||||||
port: COM4
|
multimeter: present
|
||||||
baudrate: 9600
|
vision_saver: absent
|
||||||
|
vision: absent
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@ from .remote_api import RemoteAPI
|
|||||||
from .serial_label_printer import Serial_Label_Printer
|
from .serial_label_printer import Serial_Label_Printer
|
||||||
from .tecna_marposs_provaset_t3p import TecnaMarpossProvasetT3P
|
from .tecna_marposs_provaset_t3p import TecnaMarpossProvasetT3P
|
||||||
from .test_component import TestComponent
|
from .test_component import TestComponent
|
||||||
from .vision import Vision
|
#from .vision import Vision
|
||||||
from .vision_saver import VisionSaver
|
from .vision_saver import VisionSaver
|
||||||
|
|||||||
12
src/main.py
12
src/main.py
@ -54,7 +54,7 @@ try:
|
|||||||
# IMPORT PROJECT ONLY AFTER SETTING UP SIGNAL, FAULTHANDLER AND LOGGHING
|
# IMPORT PROJECT ONLY AFTER SETTING UP SIGNAL, FAULTHANDLER AND LOGGHING
|
||||||
from components import (ArchiveSynchronizer, GalaxyCamera, NeoPixels,
|
from components import (ArchiveSynchronizer, GalaxyCamera, NeoPixels,
|
||||||
Os_Label_Printer, RemoteAPI,
|
Os_Label_Printer, RemoteAPI,
|
||||||
TecnaMarpossProvasetT3P, Vision, VisionSaver)
|
TecnaMarpossProvasetT3P, VisionSaver)
|
||||||
from lib.db import Users
|
from lib.db import Users
|
||||||
from lib.helpers import ConfigReader
|
from lib.helpers import ConfigReader
|
||||||
from PyQt5.QtCore import QObject, QThread, pyqtSignal
|
from PyQt5.QtCore import QObject, QThread, pyqtSignal
|
||||||
@ -84,8 +84,16 @@ try:
|
|||||||
"remote_api": {"c": RemoteAPI, "k": {"main": self}},
|
"remote_api": {"c": RemoteAPI, "k": {"main": self}},
|
||||||
"tecna_t3": {"c": TecnaMarpossProvasetT3P, "k": {"paused": True}},
|
"tecna_t3": {"c": TecnaMarpossProvasetT3P, "k": {"paused": True}},
|
||||||
"vision_saver": {"c": VisionSaver, "t": False},
|
"vision_saver": {"c": VisionSaver, "t": False},
|
||||||
"vision": {"c": Vision, "k": {"paused": True}},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for key in self.components_specs.copy().keys():
|
||||||
|
if key in self.config["hardware_config"].keys() and self.config["hardware_config"][key] != "present":
|
||||||
|
self.components_specs.pop(key)
|
||||||
|
if self.config["hardware_config"]["vision"] is "present":
|
||||||
|
from src.components.vision import Vision
|
||||||
|
self.components_specs["vision"]= {"c": Vision, "k": {"paused": True}}
|
||||||
|
|
||||||
self.components = {}
|
self.components = {}
|
||||||
self.threads = {}
|
self.threads = {}
|
||||||
for component_name, spec in self.components_specs.items():
|
for component_name, spec in self.components_specs.items():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user