instruction folder

This commit is contained in:
stten7 2024-02-01 14:50:45 +01:00
parent 4f0e3fedb9
commit 6d1f6c71b9
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
[machine]
description = ST-TEN-7 SECONDO BANCO IVECO DAILY ELETTRICO
instruction_folder = st-ten-5
[hardware_config]
archive_synchronizer: present
@ -8,9 +9,9 @@ label_printer: present
extra_label_printer: present
remote_api: absent
tecna_t3: present
digital_io: absent
digital_io: present
barcode_recipe_selection: present
show_instructions: no
show_instructions: yes
[tecna_t3]
port: COM4

View File

@ -14,9 +14,10 @@ from lxml import etree
class Test_Instructions(Test_Test):
def __init__(self, components=None, recipe=None, step=None, run_once=False, reset_on_start=False, enable_override=True,bench_name="generic"):
def __init__(self,config ,components=None, recipe=None, step=None, run_once=False, reset_on_start=False, enable_override=True,bench_name="generic"):
super().__init__(components=components, recipe=recipe, step=step, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
self.bench_name = bench_name
self.config = config
self.recipe=recipe
self.svgWidget=None
self.svg_root=None
@ -26,7 +27,7 @@ class Test_Instructions(Test_Test):
self.layout = QVBoxLayout()
self.layout.addWidget(self.svg_widget)
self.svg_w.setLayout(self.layout)
self.svg_path=os.path.join("config","instruction_images",self.bench_name,"")
self.svg_path=os.path.join("config","instruction_images",self.config["machine"]["instruction_folder"],"")
self.timer = QTimer()
self.timer.timeout.connect(self.toggle_icons)
self.expected_input_state=True