diff --git a/FactoryCalib.blockly b/FactoryCalib.blockly index 2c856f562e58fc22e8048f69cbd39ec9cc0bbb34..b045b5c81ddfdff0001f4e3a2928080e52b33354 100644 --- a/FactoryCalib.blockly +++ b/FactoryCalib.blockly @@ -8,7 +8,7 @@ <field name="instance_name">txt_label_version</field> <value name="value"> <shadow type="text" id="T9nyAyJIRL7l_Nn(S-rd"> - <field name="TEXT">Version 2022/11/09</field> + <field name="TEXT">Version 2022/11/11</field> </shadow> </value> <next> @@ -25,7 +25,7 @@ <mutation items="1"/> <value name="value"> <shadow type="text" id="I~XAtEGN-;qa!e~~O$oI"> - <field name="TEXT">http://{}:1880/ui</field> + <field name="TEXT"><b>http://{}:1880/ui</b></field> </shadow> </value> <value name="ADD0"> diff --git a/FactoryCalib.py b/FactoryCalib.py index 0b7fbd5d45c2c2409cc82a5267968a5b85d8a08a..dd13f294a26679592d2ca7a792b50ef4db342aae 100644 --- a/FactoryCalib.py +++ b/FactoryCalib.py @@ -27,9 +27,9 @@ from lib.VGR_NodeRED import * controller_name = None -display.set_attr("txt_label_version.text", str('Version 2022/11/09')) +display.set_attr("txt_label_version.text", str('Version 2022/11/11')) controller_name = os.uname()[1] -display.set_attr("txt_label_message2.text", str('http://{}:1880/ui'.format(controller_name))) +display.set_attr("txt_label_message2.text", str('<b>http://{}:1880/ui</b>'.format(controller_name))) initlib_log(5) threading.Thread(target=thread_lights, daemon=True).start() initlib_Axes1Ref() diff --git a/lib/Sound.blockly b/lib/Sound.blockly index 4d1f454b83a436f88baf540a0381bda31df0a3ff..84f6fc160bb05708412be019ae69fe6b9f51e0c8 100644 --- a/lib/Sound.blockly +++ b/lib/Sound.blockly @@ -22,14 +22,24 @@ <field name="soundfile_name">06_Car_horn_short.wav</field> <field name="checkbox">FALSE</field> <next> - <block type="util_wait_until" id="W.zrhr|.}l^iCNGfTV#g"> + <block type="util_wait_for" id="k{9}Awc.DGB@^~!F/I]{"> + <field name="format">ms</field> <value name="value"> - <block type="logic_negate" id="a!B1!07i6DVS/P}@D:pv"> - <value name="BOOL"> - <block type="sound_is_playing_audiofile" id="ha5Cb*s3BP~~kM(69o9;"/> + <shadow type="math_number" id="utosu0_34q?8SSL%f]yD"> + <field name="NUM">200</field> + </shadow> + </value> + <next> + <block type="util_wait_until" id="W.zrhr|.}l^iCNGfTV#g"> + <value name="value"> + <block type="logic_negate" id="a!B1!07i6DVS/P}@D:pv"> + <value name="BOOL"> + <block type="sound_is_playing_audiofile" id="ha5Cb*s3BP~~kM(69o9;"/> + </value> + </block> </value> </block> - </value> + </next> </block> </next> </block> diff --git a/lib/Sound.py b/lib/Sound.py index 24b9b0669ab9a836b55db650cd15917859794cc8..45df03612380e89b94533d85a338c04d929f4601 100644 --- a/lib/Sound.py +++ b/lib/Sound.py @@ -12,6 +12,7 @@ def beep(): def thread_sound(): TXT_SSC_M.get_loudspeaker().play("06_Car_horn_short.wav", False) + time.sleep(0.2) while True: if (not (TXT_SSC_M.get_loudspeaker().is_playing())): break diff --git a/lib/display.qml b/lib/display.qml index 77620033450eadc199f0c4b25cf11860c6f3a051..88c5ef012db887611a5dfd594472ed833fff007d 100644 --- a/lib/display.qml +++ b/lib/display.qml @@ -17,7 +17,7 @@ TXTWindow { font.pixelSize: 16 elide: Text.ElideRight x: 20 - y: 181 + y: 50 width: 200 height: 15 } @@ -42,21 +42,21 @@ TXTWindow { } TXTButton { id: txt_button_save - text: "SAVE calibration" + text: "<h2>SAVE calibration</h2>" font.pixelSize: 16 enabled: true x: 40 - y: 60 + y: 90 width: 160 - height: 40 + height: 50 } TXTButton { id: txt_button_reset - text: "RESET to factory defaults" + text: "<h4><font color='#ff0000'>RESET to factory defaults</font></h4>" font.pixelSize: 16 enabled: true x: 40 - y: 130 + y: 160 width: 160 height: 30 } @@ -76,7 +76,7 @@ TXTWindow { font.pixelSize: 16 elide: Text.ElideRight x: 20 - y: 200 + y: 65 width: 200 height: 15 } diff --git a/lib/display.xml b/lib/display.xml index b2ebfeb30f5f347741fa4fceb0c837bf9df3a6b8..9982f2e43cf63c27eed7bc824eed8278c1125661 100644 --- a/lib/display.xml +++ b/lib/display.xml @@ -1 +1 @@ -<xml type="display" version="2"><item id="4" class="TXTLabel"><name>txt_label_message1</name><text>Open dashboard in WEB browser:</text><geometry><x>20</x><y>181</y><width>200</width><height>15</height></geometry></item><item id="40" class="StatusIndicator"><name>txt_status_indicator</name><color>#FF0000</color><active>false</active><geometry><x>215</x><y>5</y><width>20</width><height>20</height></geometry></item><item id="42" class="TXTLabel"><name>txt_label_model</name><text>Training Factory Industry 4.0 9V V.2</text><geometry><x>5</x><y>5</y><width>210</width><height>15</height></geometry></item><item id="43" class="TXTButton"><name>txt_button_save</name><enabled>true</enabled><text>SAVE calibration</text><geometry><x>40</x><y>60</y><width>160</width><height>40</height></geometry></item><item id="45" class="TXTButton"><name>txt_button_reset</name><enabled>true</enabled><text>RESET to factory defaults</text><geometry><x>40</x><y>130</y><width>160</width><height>30</height></geometry></item><item id="46" class="TXTLabel"><name>txt_label_version</name><text/><geometry><x>5</x><y>20</y><width>210</width><height>15</height></geometry></item><item id="47" class="TXTLabel"><name>txt_label_message2</name><text>http://[TXT40-IP]:1880/ui</text><geometry><x>20</x><y>200</y><width>200</width><height>15</height></geometry></item></xml> \ No newline at end of file +<xml type="display" version="2"><item id="4" class="TXTLabel"><name>txt_label_message1</name><text>Open dashboard in WEB browser:</text><geometry><x>20</x><y>50</y><width>200</width><height>15</height></geometry></item><item id="40" class="StatusIndicator"><name>txt_status_indicator</name><color>#FF0000</color><active>false</active><geometry><x>215</x><y>5</y><width>20</width><height>20</height></geometry></item><item id="42" class="TXTLabel"><name>txt_label_model</name><text>Training Factory Industry 4.0 9V V.2</text><geometry><x>5</x><y>5</y><width>210</width><height>15</height></geometry></item><item id="43" class="TXTButton"><name>txt_button_save</name><enabled>true</enabled><text><h2>SAVE calibration</h2></text><geometry><x>40</x><y>90</y><width>160</width><height>50</height></geometry></item><item id="45" class="TXTButton"><name>txt_button_reset</name><enabled>true</enabled><text><h4><font color='#ff0000'>RESET to factory defaults</font></h4></text><geometry><x>40</x><y>160</y><width>160</width><height>30</height></geometry></item><item id="46" class="TXTLabel"><name>txt_label_version</name><text/><geometry><x>5</x><y>20</y><width>210</width><height>15</height></geometry></item><item id="47" class="TXTLabel"><name>txt_label_message2</name><text>http://[TXT40-IP]:1880/ui</text><geometry><x>20</x><y>65</y><width>200</width><height>15</height></geometry></item></xml> \ No newline at end of file