st ten 10 print_button and instructions wip
This commit is contained in:
parent
89fae6cfa1
commit
bd37d53bb4
@ -62,27 +62,33 @@ class Test_Instructions(Test_Test):
|
|||||||
return show
|
return show
|
||||||
|
|
||||||
def toggle_icons(self):
|
def toggle_icons(self):
|
||||||
self.flag = not self.flag
|
default_image_path = os.path.join("config", "instruction_images", self.config["machine"]["instruction_folder"],
|
||||||
|
"DEFAULT.svg")
|
||||||
|
|
||||||
for elem in self.tape_ids:
|
if self.svg_path is None or self.svg_path == default_image_path:
|
||||||
if self.flag:
|
if hasattr(self,
|
||||||
self.show_tape(elem)
|
"print_b") and not self.done: # Verifica se il pulsante di stampa è abilitato e non è stato premuto
|
||||||
else:
|
self.flag = not self.flag
|
||||||
self.hide_tape(elem)
|
|
||||||
|
|
||||||
for elem in self.monitored_ids:
|
for elem in self.tape_ids:
|
||||||
sensor_index = int(elem.attrib['id'].split("_")[1]) - 3
|
if self.flag:
|
||||||
if self.inputs[sensor_index]:
|
self.show_tape(elem)
|
||||||
self.show_ok(elem)
|
else:
|
||||||
self.show_icon(elem)
|
self.hide_tape(elem)
|
||||||
else:
|
|
||||||
self.show_ko(elem)
|
|
||||||
if self.flag:
|
|
||||||
self.show_icon(elem)
|
|
||||||
else:
|
|
||||||
self.hide_icon(elem)
|
|
||||||
|
|
||||||
self.show_svg()
|
for elem in self.monitored_ids:
|
||||||
|
sensor_index = int(elem.attrib['id'].split("_")[1]) - 3
|
||||||
|
if self.inputs[sensor_index]:
|
||||||
|
self.show_ok(elem)
|
||||||
|
self.show_icon(elem)
|
||||||
|
else:
|
||||||
|
self.show_ko(elem)
|
||||||
|
if self.flag:
|
||||||
|
self.show_icon(elem)
|
||||||
|
else:
|
||||||
|
self.hide_icon(elem)
|
||||||
|
|
||||||
|
self.show_svg()
|
||||||
|
|
||||||
def print_button(self):
|
def print_button(self):
|
||||||
super().get([{
|
super().get([{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user