Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2228687aa0
|
|
@ -8,7 +8,7 @@
|
|||
height="654"
|
||||
viewBox="0 0 894.99999 654"
|
||||
sodipodi:docname="98FA186CP-extra.svg"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.94413322"
|
||||
inkscape:cx="408.31102"
|
||||
inkscape:cx="407.78144"
|
||||
inkscape:cy="392.95302"
|
||||
inkscape:window-width="1388"
|
||||
inkscape:window-height="864"
|
||||
|
|
@ -74,12 +74,14 @@
|
|||
height="59.835232"
|
||||
preserveAspectRatio="none"
|
||||
xlink:href="img/arw-yel-down.png"
|
||||
id="sensor_4"
|
||||
x="262.62048"
|
||||
y="-450.58066"
|
||||
inkscape:label="sensor_4"
|
||||
id="warning_4"
|
||||
x="449.76074"
|
||||
y="65.996582"
|
||||
inkscape:label="warning_4"
|
||||
inkscape:svg-dpi="1"
|
||||
transform="rotate(69.001261)" /><text
|
||||
transform="rotate(2.1363764)"
|
||||
inkscape:transform-center-x="-21.708642"
|
||||
inkscape:transform-center-y="4.6743811" /><text
|
||||
xml:space="preserve"
|
||||
style="font-size:53.3333px;fill:#000000"
|
||||
x="497.68134"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
|
|
@ -8,7 +8,7 @@
|
|||
height="654"
|
||||
viewBox="0 0 894.99999 654"
|
||||
sodipodi:docname="98FA186CP.svg"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
|
|
@ -26,13 +26,13 @@
|
|||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.335206"
|
||||
inkscape:cx="445.24965"
|
||||
inkscape:cy="375.59747"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:cx="444.87517"
|
||||
inkscape:cy="375.223"
|
||||
inkscape:window-width="1452"
|
||||
inkscape:window-height="752"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="114"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="g1"><sodipodi:guide
|
||||
position="107.5056,304.31054"
|
||||
orientation="0,678.40002"
|
||||
|
|
@ -70,18 +70,19 @@
|
|||
y="89.829666"
|
||||
inkscape:label="sensor_5"
|
||||
inkscape:svg-dpi="1" /><image
|
||||
width="59.486801"
|
||||
height="59.835232"
|
||||
width="58.575958"
|
||||
height="54.877026"
|
||||
preserveAspectRatio="none"
|
||||
xlink:href="img/arw-yel-down.png"
|
||||
id="sensor_3"
|
||||
x="325.79425"
|
||||
y="-403.88071"
|
||||
inkscape:label="sensor_4"
|
||||
id="warning_3"
|
||||
x="433.88287"
|
||||
y="78.405182"
|
||||
inkscape:label="warning_3"
|
||||
inkscape:svg-dpi="1"
|
||||
transform="rotate(63.41855)"
|
||||
inkscape:transform-center-x="11.98317"
|
||||
inkscape:transform-center-y="-19.472651" /><text
|
||||
transform="matrix(0.99889056,0.04709187,0.04796822,0.99884886,0,0)"
|
||||
inkscape:transform-center-x="22.314742"
|
||||
inkscape:transform-center-y="0.778857"
|
||||
style="stroke-width:1.05467" /><text
|
||||
xml:space="preserve"
|
||||
style="font-size:53.3333px;fill:#000000"
|
||||
x="515.61926"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
BIN
config/instruction_images/st-ten-11/img/warning.png
Normal file
BIN
config/instruction_images/st-ten-11/img/warning.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -94,6 +94,8 @@ def read_steps(row, config, defaults=None, unsupported_steps=None):
|
|||
"chan_sel": safe_parse(row.get("canale_di_prova", defaults["canale_di_prova"])),
|
||||
"ext_flush_time": safe_parse(row.get("tempo_svuotamento_esterno", defaults["tempo_svuotamento_esterno"])),
|
||||
"ext_blow_time": safe_parse(row.get("tempo_soffiaggio_esterno", defaults["tempo_soffiaggio_esterno"])),
|
||||
"pid_pressure_correction": safe_parse(
|
||||
row.get("pid_pressure_correction", defaults["pid_pressure_correction"])),
|
||||
},
|
||||
"leak_2": {
|
||||
"pre_filling_time": safe_parse(row.get("tempo_pre_riempimento_2", defaults["tempo_pre_riempimento_2"])),
|
||||
|
|
@ -120,6 +122,7 @@ def read_steps(row, config, defaults=None, unsupported_steps=None):
|
|||
"chan_sel": safe_parse(row.get("canale_di_prova_2", defaults["canale_di_prova_2"])),
|
||||
"ext_flush_time": safe_parse(row.get("tempo_svuotamento_esterno_2", defaults["tempo_svuotamento_esterno"])),
|
||||
"ext_blow_time": safe_parse(row.get("tempo_soffiaggio_esterno_2", defaults["tempo_soffiaggio_esterno"])),
|
||||
"pid_pressure_correction": safe_parse(row.get("pid_pressure_correction", defaults["pid_pressure_correction_2"])),
|
||||
},
|
||||
"vision": {
|
||||
"recipe": row.get("ricetta_visione", defaults["ricetta_visione"]),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class Test_Instructions(Test_Test):
|
|||
self.expected_input_state = True if step.step_type == "instruction" or "instruction_extra" else False
|
||||
|
||||
self.monitored_ids=self.svg_root.xpath(f'''.//*[starts-with(@id, 'sensor_')]''')
|
||||
|
||||
self.warning_ids=self.svg_root.xpath(f'''.//*[starts-with(@id, 'warning_')]''')
|
||||
self.tape_ids=self.svg_root.xpath(f'''.//*[starts-with(@id, 'tape_')]''')
|
||||
|
||||
self.done = False
|
||||
|
|
@ -70,12 +70,35 @@ class Test_Instructions(Test_Test):
|
|||
def toggle_icons(self, step=None):
|
||||
self.flag = not self.flag
|
||||
|
||||
# Handle tape_ids
|
||||
for elem in self.tape_ids:
|
||||
if self.flag:
|
||||
self.show_tape(elem)
|
||||
else:
|
||||
self.hide_tape(elem)
|
||||
|
||||
for elem in self.warning_ids:
|
||||
warning_name = elem.attrib['id']
|
||||
warning_index_part = warning_name.split("_")[1]
|
||||
|
||||
try:
|
||||
warning_index = int(warning_index_part) - 3
|
||||
except ValueError:
|
||||
warning_index = warning_index_part
|
||||
|
||||
if warning_index not in self.inputs:
|
||||
self.inputs[warning_index] = False
|
||||
|
||||
if self.inputs[warning_index]:
|
||||
self.show_ok(elem)
|
||||
self.show_icon(elem)
|
||||
else:
|
||||
self.show_warning_ko(elem)
|
||||
if self.flag:
|
||||
self.show_icon(elem)
|
||||
else:
|
||||
self.hide_icon(elem)
|
||||
|
||||
for elem in self.monitored_ids:
|
||||
sensor_name = elem.attrib['id']
|
||||
sensor_index_part = sensor_name.split("_")[1]
|
||||
|
|
@ -143,6 +166,9 @@ class Test_Instructions(Test_Test):
|
|||
def hide_icon(self,id):
|
||||
id.set("display", "none")
|
||||
|
||||
def show_warning_ko(self,id):
|
||||
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}img/warning.png"
|
||||
|
||||
def show_tape(self,id):
|
||||
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}img/tape_black.png"
|
||||
id.set("display", "inline")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user