From a9edc1c6cef7bfaaee41f89241188d4bf60b1a32 Mon Sep 17 00:00:00 2001 From: lepshiy Date: Thu, 21 Nov 2024 11:49:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20metadata=20=D0=B2=20bort-rtr=20=D0=9D=D0=B0?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D0=B2=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/frame-ecm-list/frm-ecm-list.gd | 1 + scenes/frame-ecm-list/frm-ecm-list.tscn | 8 +- scenes/pribor-rtr/bort-rtr.tscn | 158 +++++++++++------------- scenes/настройки/настройки.gd | 67 +++++++++- scenes/настройки/настройки.tscn | 51 ++++++-- scenes/работа/CharacterBody2D.gd | 28 ++--- scripts/yems-boards.gd | 1 - 7 files changed, 198 insertions(+), 116 deletions(-) diff --git a/scenes/frame-ecm-list/frm-ecm-list.gd b/scenes/frame-ecm-list/frm-ecm-list.gd index c073e96c..72ae31d4 100644 --- a/scenes/frame-ecm-list/frm-ecm-list.gd +++ b/scenes/frame-ecm-list/frm-ecm-list.gd @@ -4,6 +4,7 @@ class_name frm_ecm_list extends NinePatchRect ## Called when the node enters the scene tree for the first time. func _ready(): $grd_forced/btn_cancel.button_connect('pressed', Callable(self, 'on_btn_cancel_pressed').bind($grd_forced/btn_cancel)) + $grd_forced/btn_panika.button_connect('pressed', Callable(self, 'on_btn_panika_pressed').bind($grd_forced/btn_panika)) func on_btn_cancel_pressed(btn): diff --git a/scenes/frame-ecm-list/frm-ecm-list.tscn b/scenes/frame-ecm-list/frm-ecm-list.tscn index 3b8c4c1c..e5eeda44 100644 --- a/scenes/frame-ecm-list/frm-ecm-list.tscn +++ b/scenes/frame-ecm-list/frm-ecm-list.tscn @@ -57,7 +57,7 @@ size_flags_vertical = 3 tooltip_text = "Включает принудительную помеху" strips_rotation = 15.0 text = "СРН" -metadata/rfi_name = "ozp1" +metadata/rfi_name = "srn" [node name="btn_jtids" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")] editor_description = "Кнопка для принудительного включения группы секторов в режим JTIDS" @@ -66,7 +66,7 @@ size_flags_horizontal = 3 size_flags_vertical = 3 strips_rotation = 15.0 text = "СПРС" -metadata/rfi_name = "ozp1" +metadata/rfi_name = "sprs" [node name="btn_kupd" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")] layout_mode = 2 @@ -75,7 +75,7 @@ size_flags_vertical = 3 tooltip_text = "Кнопка для принудительного включения группы секторов в режим КУПД" strips_rotation = 15.0 text = "КУПД" -metadata/rfi_name = "ozp1" +metadata/rfi_name = "kupd" [node name="btn_panika" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")] layout_mode = 2 @@ -84,7 +84,7 @@ size_flags_vertical = 3 tooltip_text = "Кнопка для принудительного включения группы секторов в режим КУПД" strips_rotation = 15.0 text = "Паника" -metadata/rfi_name = "ozp1" +metadata/rfi_name = "" [node name="btn_cancel" parent="grd_forced" groups=["прин-секторы-срн"] instance=ExtResource("4_7ys3c")] layout_mode = 2 diff --git a/scenes/pribor-rtr/bort-rtr.tscn b/scenes/pribor-rtr/bort-rtr.tscn index ef41d32b..08140145 100644 --- a/scenes/pribor-rtr/bort-rtr.tscn +++ b/scenes/pribor-rtr/bort-rtr.tscn @@ -70,10 +70,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 1" -metadata/value0 = "SelfTest[1].DevList[1].DevList[0]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[0]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[0]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[0]['ErCode']", "SelfTest[1].DevList[1].DevList[0]['ErCode']", "SelfTest[2].DevList[1].DevList[0]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[0]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[0]['TestPassed']" +metadata/value2 = "SelfTest[0].DevList[1].DevList[0]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[0]['ErrorText']", "SelfTest[1].DevList[1].DevList[0]['ErrorText']", "SelfTest[2].DevList[1].DevList[0]['ErrorText']"] [node name="kanal2" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -94,10 +94,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 2" -metadata/value0 = "SelfTest[1].DevList[1].DevList[1]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[1]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[1]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[1]['ErCode']", "SelfTest[1].DevList[1].DevList[1]['ErCode']", "SelfTest[2].DevList[1].DevList[1]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[1]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[1]['TestPassedt']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[1]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[1]['ErrorText']", "SelfTest[1].DevList[1].DevList[1]['ErrorText']", "SelfTest[2].DevList[1].DevList[1]['ErrorText']"] [node name="kanal3" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -118,10 +118,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 3" -metadata/value0 = "SelfTest[1].DevList[1].DevList[2]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[2]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[2]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[2]['ErCode']", "SelfTest[1].DevList[1].DevList[2]['ErCode']", "SelfTest[2].DevList[1].DevList[2]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[2]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[2]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[2]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[2]['ErrorText']", "SelfTest[1].DevList[1].DevList[2]['ErrorText']", "SelfTest[2].DevList[1].DevList[2]['ErrorText']"] [node name="kanal4" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -142,10 +142,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 4" -metadata/value0 = "SelfTest[1].DevList[1].DevList[3]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[3]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[3]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[3]['ErCode']", "SelfTest[1].DevList[1].DevList[3]['ErCode']", "SelfTest[2].DevList[1].DevList[3]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[3]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[3]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[3]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[3]['ErrorText']", "SelfTest[1].DevList[1].DevList[3]['ErrorText']", "SelfTest[2].DevList[1].DevList[3]['ErrorText']"] [node name="kanal5" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -166,10 +166,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 5" -metadata/value0 = "SelfTest[1].DevList[1].DevList[4]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[4]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[4]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[4]['ErCode']", "SelfTest[1].DevList[1].DevList[4]['ErCode']", "SelfTest[2].DevList[1].DevList[4]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[4]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[4]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[4]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[4]['ErrorText']", "SelfTest[1].DevList[1].DevList[4]['ErrorText']", "SelfTest[2].DevList[1].DevList[4]['ErrorText']"] [node name="kanal6" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -190,10 +190,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 6" -metadata/value0 = "SelfTest[1].DevList[1].DevList[5]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[5]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[5]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[5]['ErCode']", "SelfTest[1].DevList[1].DevList[5]['ErCode']", "SelfTest[2].DevList[1].DevList[5]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[5]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[5]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[5]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[5]['ErrorText']", "SelfTest[1].DevList[1].DevList[5]['ErrorText']", "SelfTest[2].DevList[1].DevList[5]['ErrorText']"] [node name="kanal7" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -214,10 +214,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 7" -metadata/value0 = "SelfTest[1].DevList[1].DevList[6]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[6]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[6]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[6]['ErCode']", "SelfTest[1].DevList[1].DevList[6]['ErCode']", "SelfTest[2].DevList[1].DevList[6]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[6]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[6]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[6]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[6]['ErrorText']", "SelfTest[1].DevList[1].DevList[6]['ErrorText']", "SelfTest[2].DevList[1].DevList[6]['ErrorText']"] [node name="kanal8" parent="konverter/grid" instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -238,10 +238,10 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Канал 8" -metadata/value0 = "SelfTest[1].DevList[1].DevList[7]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[1].DevList[7]['CurrentValue']" -metadata/value2 = "SelfTest[0].DevList[1].DevList[7]['ErCode']" -metadata/state = ["SelfTest[0].DevList[1].DevList[7]['ErCode']", "SelfTest[1].DevList[1].DevList[7]['ErCode']", "SelfTest[2].DevList[1].DevList[7]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[1].DeviceList[7]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[1].DevList[7]['TestPassed']" +metadata/value2 = "SelfTest[0].SystemList[1].DeviceList[7]['TestPassed']" +metadata/state = ["SelfTest[0].DevList[1].DevList[7]['ErrorText']", "SelfTest[1].DevList[1].DevList[7]['ErrorText']", "SelfTest[2].DevList[1].DevList[7]['ErrorText']"] [node name="antenna1" type="NinePatchRect" parent="."] layout_mode = 0 @@ -283,9 +283,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 1" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[0]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[0]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[0]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[0]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[0]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[0]['ErrorText']"] [node name="yelement2" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -297,9 +296,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 2" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[1]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[1]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[1]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[1]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[1]['TestPassed']" +metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[1]['ErrorText']"] [node name="yelement3" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -311,8 +309,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 3" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[2]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[2]['CurrentValue']" +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[2]['TestPassed']" +metadata/value1 = "SelfTest[3].SystemList[0].SystemList[0].DevList[2]['ErrorText']" metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[2]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[2]['ErCode']"] [node name="yelement4" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] @@ -325,9 +323,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 4" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[3]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[3]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[3]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[3]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[3[]'TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[3]['ErrorText']"] [node name="yelement5" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -339,9 +336,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 5" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[4]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[4]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[4]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[4]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[4]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[4]['ErrorText']"] [node name="yelement6" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -353,8 +349,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 6" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[5]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[5]['CurrentValue']" +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[5]['TestPassed']" +metadata/value1 = "SelfTest[3].SystemList[0].SystemList[0].DevList[5]['ErrorText']" metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[5]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[5]['ErCode']"] [node name="yelement7" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] @@ -367,9 +363,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 7" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[6]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[6]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[6]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[6]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[6]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[6]['ErrorText']"] [node name="yelement8" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -381,9 +376,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 8" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[7]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[7]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[7]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[7]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[7]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[7]['ErrorText']"] [node name="yelement9" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -395,9 +389,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 9" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[8]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[8]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[8]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[8]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[8]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[8]['ErrorText']"] [node name="yelement10" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -409,9 +402,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 10" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[9]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[9]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[9]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[9]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[9]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[9]['ErrorText']"] [node name="yelement11" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -423,9 +415,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 11" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[10]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[10]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[10]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[10]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[10]['TestPassed']" +metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[10]['ErCode']SelfTest[3].SystemList[0].SystemList[0].DevList[10]['ErrorText']"] [node name="yelement12" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -437,9 +428,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 12" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[11]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[11]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[11]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[11]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[11]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[11]['ErrorText']"] [node name="yelement13" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -451,9 +441,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 13" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[12]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[12]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[12]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[12]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[12]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[12]['ErrorText']"] [node name="yelement14" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -465,9 +454,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 14" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[13]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[13]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[13]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[13]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[13]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[13]['ErrorText']"] [node name="yelement15" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -479,9 +467,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 15" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[14]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[14]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[14]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[14]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[14]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[14]['ErrorText']"] [node name="yelement16" parent="antenna1/grid" instance=ExtResource("3_5ikxk")] layout_mode = 2 @@ -493,9 +480,8 @@ max_value1 = 10.0 value_name0 = "А" value_name1 = "φ" fname = "Элемент 16" -metadata/value0 = "SelfTest[3].DevList[0].DevList[0].DevList[15]['CurrentValue']" -metadata/value1 = "SelfTest[4].DevList[0].DevList[0].DevList[15]['CurrentValue']" -metadata/state = ["SelfTest[3].DevList[0].DevList[0].DevList[15]['ErCode']", "SelfTest[4].DevList[0].DevList[0].DevList[15]['ErCode']"] +metadata/value0 = "SelfTest[3].SystemList[0].SystemList[0].DevList[15]['TestPassed']" +metadata/state = ["SelfTest[3].SystemList[0].SystemList[0].DevList[15]['ErrorText']"] [node name="antenna2" type="NinePatchRect" parent="."] layout_mode = 0 @@ -757,7 +743,7 @@ offset_top = 114.0 offset_right = 290.0 offset_bottom = 156.0 fname = "АЦП" -metadata/state = ["SelfTest[5].DevList[0]['ErCode']"] +metadata/state = ["SelfTest[4].SystemList[0].DevList[0]['TestPassed']"] [node name="dsp" parent="." instance=ExtResource("4_mtf2n")] layout_mode = 0 @@ -766,7 +752,7 @@ offset_top = 114.0 offset_right = 581.0 offset_bottom = 156.0 fname = "Сигнальный процессор" -metadata/state = ["SelfTest[5].DevList[1]['ErCode']"] +metadata/state = ["SelfTest[4].SystemList[0].DevList[1]['ErrorText']"] [node name="gen" parent="." instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -783,9 +769,9 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Генератор" -metadata/value0 = "SelfTest[1].DevList[2]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[2]['CurrentValue']" -metadata/state = ["SelfTest[0].DevList[2]['ErCode']", "SelfTest[1].DevList[2]['ErCode']", "SelfTest[2].DevList[2]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[2].DeviceList[0]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[2].DevList[0]['TestPassed']" +metadata/state = ["SelfTest[0].SystemList[2].DeviceList[0]['ErrorText']", "SelfTest[1].SystemList[2].DeviceList[0]['ErrorText']", "SelfTest[2].SystemList[2].DevList[0]['ErrorText']"] [node name="rpu" parent="." instance=ExtResource("2_dmhrm")] layout_mode = 2 @@ -803,9 +789,9 @@ name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) name_min_size2 = Vector2i(35, 20) fname = "Приёмник 20...1000 МГц" -metadata/value0 = "SelfTest[1].DevList[0]['CurrentValue']" -metadata/value1 = "SelfTest[2].DevList[0]['CurrentValue']" -metadata/state = ["SelfTest[0].DevList[0]['ErCode']", "SelfTest[1].DevList[0]['ErCode']", "SelfTest[2].DevList[0]['ErCode']"] +metadata/value0 = "SelfTest[1].SystemList[0].DeviceList[0]['TestPassed']" +metadata/value1 = "SelfTest[2].SystemList[0].DevList[0]['TestPassed']" +metadata/state = ["SelfTest[0].SystemList[0].DeviceList[0]['ErrorText']", "SelfTest[1].SystemList[0].DeviceList[0]['ErrorText']", "SelfTest[2].SystemList[0].DevList[0]['ErrorText']"] [connection signal="pressed" from="konverter/grid/kanal1" to="." method="_on_item_pressed"] [connection signal="pressed" from="konverter/grid/kanal2" to="." method="_on_item_pressed"] diff --git a/scenes/настройки/настройки.gd b/scenes/настройки/настройки.gd index cd817dbb..23858367 100644 --- a/scenes/настройки/настройки.gd +++ b/scenes/настройки/настройки.gd @@ -1,9 +1,18 @@ class_name setting extends Panel +var TableHeader = preload('res://table/header.tscn') +var TableLabel = preload('res://table/lable.tscn') +var TableTaggle = preload('res://table/taggle.tscn') +var TableEdit = preload('res://table/editl.tscn') +var TableEmpti = preload('res://table/empti.tscn') + ## Вызывается, когда узел впервые попадает в дерево сцены. func _ready() -> void: - $lbl_commit.text = 'Текущая версия ПО УАРЭП: \"%s\"' % commit.VCS_HEAD + setting_tab() + dop_set_tab() + set_tab() + $lbl_commit.text = ' \"%s\"' % commit.VCS_HEAD if not OS.get_cmdline_args().has('++ограниченный'): return $Label2.text = 'Текущий режим доступа: ограниченный' @@ -16,3 +25,59 @@ func _on_external_cu_btn_pressed() -> void: ProjectSettings.set_setting('application/config/external_cu', state) if state: signaller.emit_signal('interfer_off_all') + + +func setting_tab(): + var yams: Array = [ HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER ] + $table.set_header([TableHeader, TableHeader]) + $table.set_header_text(['Элемент', ' Показывать ']) + + for i in range(15): + $table.add_row([TableLabel, TableTaggle]) + + $table.set_row_text(0,([' Кнопка «ПД-М4» '])) + $table.set_row_text(1,([' Кнопка «ПД-М2» '])) + $table.set_row_text(2,([' Кнопка «ОЗП-1» '])) + $table.set_row_text(3,([' Кнопка «МЧМ-1» '])) + $table.set_row_text(4,([' Кнопка «ОРН-И1» '])) + $table.set_row_text(5,([' Кнопка «ОРН-М2» '])) + $table.set_row_text(6,([' Кнопка «ЛЧМ-1» '])) + $table.set_row_text(7,([' Кнопка «ПД-М4С» '])) + $table.set_row_text(8,([' Кнопка «ПД-ЧМ» '])) + $table.set_row_text(9,([' Кнопка «СВ-И1» '])) + $table.set_row_text(10,([' Кнопка «К1» '])) + $table.set_row_text(11,([' Кнопка «СВ-М2» '])) + $table.set_row_text(12,([' Кнопка «ОРН» '])) + $table.set_row_text(13,([' Кнопка «JTIDS» '])) + $table.set_row_text(14,([' Кнопка «КУПД» '])) + + $table.set_columns_min_size([150, 100]) + $table.set_columns_alignments(yams) + + +func dop_set_tab(): + var yams: Array = [ HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER ] + $table2.add_row([TableLabel, TableEmpti]) + $table2.add_row([TableLabel, TableEmpti]) + $table2.add_row([TableEmpti, TableEmpti]) + $table2.add_row([TableLabel, TableTaggle]) + $table2.add_row([TableLabel, TableTaggle]) + + $table2.set_row_text(0, (['Текущая версия ПО УАРЭП:'])) + $table2.set_row_text(1, (['Адрес сервера карт:'])) + $table2.set_row_text(2, ([''])) + $table2.set_row_text(3, (['Внешнее целеуказание.'])) + $table2.set_row_text(4, (['Кнопка «Подавление».\nОтключить отображение этой кнопки,\nчто бы тип помех применялся сразу.'])) + + + $table2.set_columns_min_size([180, 50]) + $table2.set_columns_alignments(yams) + +func set_tab(): + $table3.add_row([TableLabel, TableEmpti]) + $table3.add_row([TableLabel, TableEmpti]) + + $table3.set_row_text(0, ([' Текущий режим доступа: полный '])) + $table3.set_row_text(1, ([' Управление элементами в режиме с ограниченным доступом '])) + + $table3.set_columns_min_size([250, 5]) diff --git a/scenes/настройки/настройки.tscn b/scenes/настройки/настройки.tscn index e65b5d4a..7cd09264 100644 --- a/scenes/настройки/настройки.tscn +++ b/scenes/настройки/настройки.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://bnptm4rlp60dq"] +[gd_scene load_steps=4 format=3 uid="uid://bnptm4rlp60dq"] [ext_resource type="Script" path="res://scenes/настройки/настройки.gd" id="1_2l3rd"] +[ext_resource type="Script" path="res://table/table.gd" id="2_6sx73"] [sub_resource type="GDScript" id="GDScript_anjmx"] script/source = "extends LineEdit @@ -17,6 +18,7 @@ func _on_text_changed(new_text: String) -> void: script = ExtResource("1_2l3rd") [node name="GridContainer" type="GridContainer" parent="."] +visible = false layout_mode = 0 offset_left = 44.0 offset_top = 87.0 @@ -235,6 +237,7 @@ size_flags_vertical = 6 button_pressed = true [node name="Label1" type="Label" parent="."] +visible = false layout_mode = 0 offset_left = 16.0 offset_top = 60.0 @@ -243,6 +246,7 @@ offset_bottom = 82.0 text = "Управление элементами в режиме с ограниченным доступом" [node name="Label2" type="Label" parent="."] +visible = false layout_mode = 0 offset_left = 20.0 offset_top = 20.0 @@ -253,13 +257,15 @@ vertical_alignment = 1 [node name="edt_mapaddr" type="LineEdit" parent="."] layout_mode = 0 -offset_left = 660.0 -offset_top = 80.0 -offset_right = 1032.0 -offset_bottom = 110.0 +offset_left = 776.0 +offset_top = 48.0 +offset_right = 1148.0 +offset_bottom = 78.0 +theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1) script = SubResource("GDScript_anjmx") [node name="Label" type="Label" parent="edt_mapaddr"] +visible = false layout_mode = 0 offset_left = -180.0 offset_right = -20.0 @@ -268,6 +274,7 @@ text = "Адрес сервера карт:" vertical_alignment = 1 [node name="GridContainer2" type="GridContainer" parent="."] +visible = false layout_mode = 0 offset_left = 478.0 offset_top = 154.0 @@ -299,12 +306,36 @@ disabled = true [node name="lbl_commit" type="Label" parent="."] layout_mode = 0 -offset_left = 500.0 -offset_top = 20.0 -offset_right = 1060.0 -offset_bottom = 50.0 -text = "Текущая версия ПО УАРЭП:" +offset_left = 776.0 +offset_top = 24.0 +offset_right = 1144.0 +offset_bottom = 54.0 +theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1) vertical_alignment = 1 +[node name="table" type="GridContainer" parent="."] +layout_mode = 0 +offset_left = 40.0 +offset_top = 88.0 +offset_right = 80.0 +offset_bottom = 128.0 +script = ExtResource("2_6sx73") + +[node name="table2" type="GridContainer" parent="."] +layout_mode = 0 +offset_left = 512.0 +offset_top = 32.0 +offset_right = 552.0 +offset_bottom = 72.0 +script = ExtResource("2_6sx73") + +[node name="table3" type="GridContainer" parent="."] +layout_mode = 0 +offset_left = 40.0 +offset_top = 32.0 +offset_right = 80.0 +offset_bottom = 72.0 +script = ExtResource("2_6sx73") + [connection signal="text_changed" from="edt_mapaddr" to="edt_mapaddr" method="_on_text_changed"] [connection signal="pressed" from="GridContainer2/external_cu_btn" to="." method="_on_external_cu_btn_pressed"] diff --git a/scenes/работа/CharacterBody2D.gd b/scenes/работа/CharacterBody2D.gd index 087beec2..eaeb4de1 100644 --- a/scenes/работа/CharacterBody2D.gd +++ b/scenes/работа/CharacterBody2D.gd @@ -9,20 +9,20 @@ var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") func _physics_process(delta): - # Add the gravity. - if not is_on_floor(): - velocity.y += gravity * delta + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta - # Handle jump. - if Input.is_action_just_pressed("ui_accept") and is_on_floor(): - velocity.y = JUMP_VELOCITY + # Handle jump. + if Input.is_action_just_pressed("ui_accept") and is_on_floor(): + velocity.y = JUMP_VELOCITY - # Get the input direction and handle the movement/deceleration. - # As good practice, you should replace UI actions with custom gameplay actions. - var direction = Input.get_axis("ui_left", "ui_right") - if direction: - velocity.x = direction * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction = Input.get_axis("ui_left", "ui_right") + if direction: + velocity.x = direction * SPEED + else: + velocity.x = move_toward(velocity.x, 0, SPEED) - move_and_slide() + move_and_slide() diff --git a/scripts/yems-boards.gd b/scripts/yems-boards.gd index 1219386c..513d39d6 100644 --- a/scripts/yems-boards.gd +++ b/scripts/yems-boards.gd @@ -75,7 +75,6 @@ LOAD_KEMS, WRITE_FLASH_END} # Отправка команды на запись или чтение порта func on_wr_device(dev_number): - print_debug([id_board, dev_number]) if (state == WR_DEV_NUM_W) or (state == WR_DEV_NUM_R): unit_ems.send_isa(unit_ems.CmdCode.WRITE_ISA, [base_addr_isa + 2, dev_number]) elif state == WRITE: