From 0f9c5abdc907dc01e1cf0b3c2e2af61f25904ba9 Mon Sep 17 00:00:00 2001 From: danil_tim Date: Fri, 7 Feb 2025 11:00:57 +0300 Subject: [PATCH 1/3] ems not work --- PRD_MP550.tscn | 261 +++++++++++++++++++++++---------------- scripts/PRD.gd | 139 ++++++++++++++++----- scripts/constants.gd | 34 ++--- scripts/control_panel.gd | 55 ++++----- 4 files changed, 295 insertions(+), 194 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 0b919ea..eb1a1d3 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -217,6 +217,7 @@ toggle_mode = true text = "Модуль ФС" [node name="save_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 832.0 offset_right = 216.0 offset_bottom = 868.0 @@ -227,6 +228,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") text = "Сохранить" [node name="load_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 872.0 offset_right = 216.0 offset_bottom = 908.0 @@ -270,7 +272,7 @@ text = "Прочитать ISA" offset_left = 216.0 offset_top = 39.0 offset_right = 2420.0 -offset_bottom = 917.0 +offset_bottom = 940.0 theme = SubResource("Theme_k5ur4") theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157) theme_override_colors/font_selected_color = Color(0, 0, 0, 0) @@ -282,10 +284,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 -current_tab = 0 +current_tab = 1 tab_focus_mode = 0 [node name="PRD" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") metadata/_tab_index = 0 @@ -569,19 +572,18 @@ script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) [node name="ControlPanel" type="Panel" parent="TabContainer"] -visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") script = ExtResource("9_akagi") metadata/_tab_index = 1 metadata/_edit_lock_ = true -[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] +[node name="label_control_PRD" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 4.0 -offset_top = 21.0 +offset_top = -44.0 offset_right = 624.0 -offset_bottom = 52.0 +offset_bottom = -13.0 theme_override_font_sizes/font_size = 22 text = "Контроль исправности прибора ПРД-Н" horizontal_alignment = 1 @@ -590,36 +592,36 @@ vertical_alignment = 1 [node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 199.0 -offset_top = 103.0 +offset_top = 8.0 offset_right = 516.0 -offset_bottom = 293.0 +offset_bottom = 198.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="IP5_25" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 offset_bottom = 184.0 textures = Array[Texture]([]) -fname = "ИП-25" +fname = "ИП5-25" rname = "A24" metadata/_edit_lock_ = true -[node name="ref_A30" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ay07" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 59.0 offset_top = 34.0 offset_right = 109.0 offset_bottom = 184.0 textures = Array[Texture]([]) -fname = "ЯУ-07" +fname = "ЯУ-07Б" rname = "A30" metadata/_edit_lock_ = true -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 @@ -629,7 +631,7 @@ fname = "ЭМС-Г" rname = "A26" metadata/_edit_lock_ = true -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 @@ -639,7 +641,7 @@ fname = "УГ" rname = "A27" metadata/_edit_lock_ = true -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 209.0 offset_top = 34.0 offset_right = 259.0 @@ -650,7 +652,7 @@ fname = "УКП-1" rname = "A28" metadata/_edit_lock_ = true -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 @@ -660,7 +662,7 @@ fname = "УКП-2" rname = "A29" metadata/_edit_lock_ = true -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_y5"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_y5"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 @@ -671,15 +673,15 @@ text = "Кассета У5" horizontal_alignment = 1 vertical_alignment = 1 -[node name="soc_fs-nkvd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] +[node name="Kasseta_FS" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] layout_mode = 0 -offset_left = 198.0 -offset_top = 311.0 -offset_right = 516.0 -offset_bottom = 538.0 +offset_left = 200.0 +offset_top = 201.0 +offset_right = 518.0 +offset_bottom = 420.0 script = null -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_fs-nkvd"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/Kasseta_FS"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 @@ -691,150 +693,188 @@ horizontal_alignment = 1 vertical_alignment = 1 metadata/_edit_lock_ = true -[node name="ref_A3" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A3" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 109.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 159.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "ФС-2" +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-2" rname = "A3" -metadata/_edit_lock_ = true -[node name="ref_A1" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A1" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 159.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 209.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "Модуль" +self_size = Vector2i(50, 170) +fname = "Модуль ФС" rname = "A1" -metadata/_edit_lock_ = true -[node name="ref_A2" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A2" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 209.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 259.0 -offset_bottom = 217.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -self_size = Vector2i(50, 149) -fname = "Модуль" +self_size = Vector2i(50, 170) +fname = "Модуль ФС" rname = "A2" -metadata/_edit_lock_ = true -[node name="ref_A4" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A4" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 259.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 309.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "ФС-3" +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-3" rname = "A4" -metadata/_edit_lock_ = true + +[node name="Block_FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] +offset_left = 12.0 +offset_top = 41.0 +offset_right = 62.0 +offset_bottom = 211.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-1" +rname = "A4" + +[node name="FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] +offset_left = 61.0 +offset_top = 41.0 +offset_right = 111.0 +offset_bottom = 211.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 170) +fname = "Модуль ФС" +rname = "A1" [node name="soc_P1" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 96.0 -offset_top = 560.0 -offset_right = 516.0 -offset_bottom = 776.0 +offset_left = 259.0 +offset_top = 427.0 +offset_right = 447.0 +offset_bottom = 643.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_P1"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P1"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 offset_top = 8.0 -offset_right = 409.0 +offset_right = 181.0 offset_bottom = 33.0 text = "Кассета П-1" horizontal_alignment = 1 vertical_alignment = 1 -metadata/_edit_lock_ = true -[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 9.0 -offset_top = 34.0 -offset_right = 59.0 -offset_bottom = 208.0 +[node name="MAA_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = -63.0 +offset_top = 36.0 +offset_right = -13.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "МАА2000" +rname = "А22" -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 59.0 -offset_top = 34.0 -offset_right = 109.0 -offset_bottom = 208.0 +[node name="MAA_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 199.0 +offset_top = 37.0 +offset_right = 249.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "МАА2000" +rname = "А23" -[node name="ref_A25" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 109.0 -offset_top = 34.0 -offset_right = 159.0 -offset_bottom = 208.0 +[node name="IP9_50_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 129.0 +offset_top = 37.0 +offset_right = 179.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А19" -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 159.0 -offset_top = 34.0 -offset_right = 209.0 -offset_bottom = 208.0 +[node name="IP9_50_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 73.0 +offset_top = 37.0 +offset_right = 123.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А20" -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 209.0 -offset_top = 34.0 -offset_right = 259.0 -offset_bottom = 208.0 +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 16.0 +offset_top = 37.0 +offset_right = 66.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП12-50" +rname = "A21" -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 259.0 -offset_top = 34.0 -offset_right = 309.0 -offset_bottom = 208.0 +[node name="soc_P2" type="NinePatchRect" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 258.0 +offset_top = 649.0 +offset_right = 446.0 +offset_bottom = 865.0 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P2"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 181.0 +offset_bottom = 33.0 +text = "Кассета П-2" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 73.0 +offset_top = 36.0 +offset_right = 123.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А22" -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 309.0 -offset_top = 34.0 -offset_right = 359.0 -offset_bottom = 208.0 +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 128.0 +offset_top = 36.0 +offset_right = 178.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[node name="ref_A30" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 359.0 -offset_top = 34.0 -offset_right = 409.0 -offset_bottom = 208.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -rname = "A30" -metadata/_edit_lock_ = true +fname = "ИП12-50" +rname = "A25" [node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 536.0 -offset_top = 550.0 -offset_right = 1055.0 -offset_bottom = 777.0 +offset_left = 592.0 +offset_top = 193.0 +offset_right = 1111.0 +offset_bottom = 420.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -943,6 +983,13 @@ self_size = Vector2i(50, 178) rname = "A33" metadata/_edit_lock_ = true +[node name="device" type="Label" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 1451.0 +offset_top = 792.0 +offset_right = 1616.0 +offset_bottom = 847.0 + [node name="EMS_G" type="Panel" parent="TabContainer"] visible = false layout_mode = 2 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index e7067b1..016a85a 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -3,7 +3,6 @@ extends Node2D signal read_ems_g_start() signal read_ems_g_finish() -var flag_mode = Constants.ADDRESSES[0][3] var broadcast_packet: PackedByteArray var node_select1: Node var node_select2: Node @@ -19,19 +18,19 @@ func _ready() -> void: node_select1.set_columns_min_size([120, 120]) node_select1.set_node_text(0, 0, 'Мощность') node_select1.set_node_text(1, 0, 'Температура') - + # Таблица УКП_2 node_select2 = $TabContainer/PRD/body_grid/litera_3_5_7/table_ukp_2 draw_tabl(node_select2, Constants.ROWS_UKP2_DATA, Constants.ROWS_UKP2_DATA.size()) node_select2.set_columns_min_size([120, 120]) node_select2.set_node_text(0, 0, 'Мощность') node_select2.set_node_text(1, 0, 'Температура') - + # Выбор прибора для подключения var node_select_device = $TabContainer/PRD/select_dev draw_tabl(node_select_device, Constants.SELECT_DEVICE, Constants.SELECT_DEVICE.size()) var get_select_device = node_select_device.get_node2(1, 0) - + # Заполнение адресов for i_addr in Constants.ADDRESSES.size(): get_select_device.add_item(Constants.ADDRESSES[i_addr][0]) @@ -39,34 +38,114 @@ func _ready() -> void: get_select_device.connect('item_selected', Callable(self, 'on_btn_select')) node_select_device.get_node2(0,0).text = 'ПРИБОР' node_select_device.set_columns_min_size([100, 100]) - + ## Заполненение списка направления луча for key in Constants.RAY_DICT: $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Ray_set_1.add_item(key) $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Ray_set_2.add_item(key) - + ## Заполненение списка аттенюатора for key in Constants.ATT_DICT: $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/att_set_1.add_item(key) $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/att_set_2.add_item(key) - - draw_control_panel_prd(Constants.ADDRESSES[0][3]) + Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) -func draw_control_panel_prd(mode) -> void: - for node_path in Constants.NODE_MAP: - var index = Constants.NODE_MAP[node_path] - var node = get_node(node_path) - if node: - var value = node.get("text") - if value != null: - node.text = Constants.SIGNS_PRD[mode][index] - else: - node.fname = Constants.SIGNS_PRD[mode][index] +func draw_control_panel_prd(pribor) -> void: + if pribor == Constants.MODE.PRD_H: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А27' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-НД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-3' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19' + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_B: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А27' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-ВД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-5' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19' + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_K: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А31' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А37' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А33' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А34' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А35' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А36' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-КД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = true + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = true + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А6' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-6' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А5' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-7' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А23' + $TabContainer/ControlPanel/soc_P1/IP12_50.fname = 'ИП9-50' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А24' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.fname = 'ИП9-50' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А26' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.fname = 'ИП12-50' + + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А27' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А28' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = true ## From Network status about yau-07 @@ -79,7 +158,7 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: var isa_data: Dictionary = {} for key in unit_isa_ports.keys(): isa_data[key] = unit_isa_ports[key] - + if isa_data.has(Constants.BASE_PORTS.EMS_G+2): var tmp = isa_data[Constants.BASE_PORTS.EMS_G+2] isa_data.erase(Constants.BASE_PORTS.EMS_G+2) @@ -95,7 +174,7 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: if len(Constants.EMS_G_PORT_DATA_HOLDER) == 32: emit_signal('read_ems_g_finish') $ISA.text = 'ISA: ' + str(len(Constants.EMS_G_PORT_DATA_HOLDER)) - + if isa_data.has(Constants.BASE_PORTS.UG+6): $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x106] & 0x7)) if isa_data.has(Constants.BASE_PORTS.UG+8): @@ -121,23 +200,23 @@ func _on_data_received(data_from_yau_07): var _DKM: int = data_from_yau_07.decode_u16(Constants.DataIndices.DKM) # ДКМ от УГ #node_select1.set_node_text(2, 0, '%d' % dry_contact) #node_select1.set_node_text(3, 0, '%d' % DKM) - - + + ## УКП for i in range(8): ## Мощность от УКП_1 var power_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * i) node_select1.set_node_text(0, i+1, '%d' % power_ukp_1) - + for i in range(8): ## Температура от УКП_1 var temperature_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * i) var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP node_select1.set_node_text(1, i+1, '%d' % TMP) - + for i_pow in range(8): ## Мощность от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.POWER_UKP_2 + 2 * i_pow: var power_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_2 + 2 * i_pow) node_select2.set_node_text(0, i_pow+1, '%d' % power_ukp_2) - + for row in range(8): ## Температура от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row: var temperature_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row) @@ -167,17 +246,17 @@ func _on_mfs_select() -> void: func _on_save_config(): print('Тебе сюда') - + func _on_load_config(): print('тебе сюда') - + func set_tab_and_buttons(tab_index: int, button_name: String) -> void: $TabContainer.current_tab = tab_index var side_panel = $Background/side_panel - + for button in side_panel.get_children(): if button is Button: button.button_pressed = (button.name == button_name) @@ -188,8 +267,8 @@ func on_btn_select(intem_from_sector: int) -> void: var get_select_device = node_select_device.get_node2(1, 0) var meta = get_select_device.get_item_metadata(intem_from_sector) Network.on_command_change_device(meta) - flag_mode = meta[2] - draw_control_panel_prd(flag_mode) + Constants.CURRENT_MODE = meta[2] + draw_control_panel_prd(Constants.CURRENT_MODE) func fill_item(node: Node, i_column: int, i_row: int, arr: Dictionary, select: int = 0) -> void: diff --git a/scripts/constants.gd b/scripts/constants.gd index f3ad916..e250744 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -46,6 +46,9 @@ const ADDRESSES: Array = [ ['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K, '10.1.2.38', '10.1.2.39', '10.1.2.33'], ['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K, '10.1.2.54', '10.1.2.55', '10.1.2.49'], ['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K, '10.1.2.70', '10.1.2.71', '10.1.2.65']] + +var CURRENT_MODE = ADDRESSES[0][3] + const INPUT_EMS_G: Array = [ '01 :34', '02 :35', @@ -157,7 +160,7 @@ const SIGNS_PRD: Array = [ '-', 'ИП5-25', ], - ## ПРК-Н + ## ПРД-Н [ ' Запрет СИ2', ' Запрет СИ3', @@ -184,37 +187,14 @@ const SIGNS_PRD: Array = [ 'ИП5-25', ], ] -var NODE_MAP = { - 'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Zapret': 0, - 'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2': 1, - 'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/LABEL': 3, - 'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/LABEL2': 4, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 5, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 6, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 7, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A27': 8, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A28': 9, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A29': 10, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A31': 11, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A32': 12, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A33': 13, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A34': 14, - 'TabContainer/ControlPanel/soc_P1/ref_A23': 15, - 'TabContainer/ControlPanel/soc_P1/ref_A24': 16, - 'TabContainer/ControlPanel/soc_P1/ref_A25': 17, - 'TabContainer/ControlPanel/soc_P1/ref_A26': 18, - 'TabContainer/ControlPanel/soc_P1/ref_A27': 19, - 'TabContainer/ControlPanel/soc_P1/ref_A28': 20, - 'TabContainer/ControlPanel/soc_P1/ref_A29': 21, - 'TabContainer/ControlPanel/soc_P1/ref_A30': 22, - } + enum BASE_PORTS { UG = 0x100, EMS_G = 0x120, UKP_1 = 0x130, UKP_2 = 0x140, } - + enum MODE { PRD_K, PRD_B, @@ -246,7 +226,7 @@ enum STATE { DONE, IDLE, SEND, -} +} var EMS_G_PORT_DATA_HOLDER: Array = [] diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 2f15fea..961f9cf 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -1,31 +1,36 @@ extends Panel var unit_yau07 = Yau07.YaU07.new('ЯУ07') +var sockets_ind: Array +var node_power_ind: Array func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_status_line', Callable(self, '_on_yau_status')) + sockets_ind = [ + $soc_y5/ems_g/light_ind, + $soc_y5/ug/light_ind, + $soc_y5/ukp_1/light_ind, + $soc_y5/ukp_2/light_ind] + + node_power_ind = [ + $soc_P1/MAA_1/light_ind, + $soc_P1/MAA_2/light_ind, + $soc_P1/IP9_50_2/light_ind, + $soc_P1/IP9_50_1/light_ind, + $soc_P1/IP12_50/light_ind, + $soc_P2/IP9_50/light_ind, + $soc_P2/IP12_50/light_ind, + $soc_y5/IP5_25/light_ind] + func lose_connect_yau(): for i in 4: - var sockets_ind = [$soc_y5/ref_A26/light_ind, - $soc_y5/ref_A27/light_ind, - $soc_y5/ref_A28/light_ind, - $soc_y5/ref_A29/light_ind] sockets_ind[i].button_pressed = false sockets_ind[i].disabled = true - for i in 8: - var node_power_ind = [$soc_P1/ref_A23/light_ind, - $soc_P1/ref_A24/light_ind, - $soc_P1/ref_A25/light_ind, - $soc_P1/ref_A26/light_ind, - $soc_P1/ref_A27/light_ind, - $soc_P1/ref_A28/light_ind, - $soc_P1/ref_A29/light_ind, - $soc_y5/ref_A24/light_ind] node_power_ind[i].button_pressed = false node_power_ind[i].disabled = true @@ -33,13 +38,9 @@ func lose_connect_yau(): func _on_data_received(data_from_yau_07): var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) - + ## SOCKETS BOARDS for i in 4: - var sockets_ind = [$soc_y5/ref_A26/light_ind, - $soc_y5/ref_A27/light_ind, - $soc_y5/ref_A28/light_ind, - $soc_y5/ref_A29/light_ind] var j = int(status_board & (1 << i) == 0) if j == 0: sockets_ind[i].button_pressed = true @@ -47,27 +48,21 @@ func _on_data_received(data_from_yau_07): else: sockets_ind[i].button_pressed = false sockets_ind[i].disabled = true - + ## Блок ИП for i in 8: - var node_power_ind = [$soc_P1/ref_A23/light_ind, - $soc_P1/ref_A24/light_ind, - $soc_P1/ref_A25/light_ind, - $soc_P1/ref_A26/light_ind, - $soc_P1/ref_A27/light_ind, - $soc_P1/ref_A28/light_ind, - $soc_P1/ref_A29/light_ind, - $soc_y5/ref_A24/light_ind] var j = int(not(dry_contact & (1 << i) == 0)) + var a = node_power_ind[i] if j == 0: node_power_ind[i].button_pressed = true node_power_ind[i].disabled = false else: node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true + node_power_ind[i].disabled = true ## From Network status about yau-07 func _on_yau_status(yau_status:bool) -> void: - $soc_y5/ref_A30/light_ind.button_pressed = yau_status - $soc_y5/ref_A30/light_ind.disabled = not yau_status + $device.text = str(Constants.CURRENT_MODE) + $soc_y5/ay07/light_ind.button_pressed = yau_status + $soc_y5/ay07/light_ind.disabled = not yau_status From 3524937a90d277e889e5cf71a4258a414070619f Mon Sep 17 00:00:00 2001 From: danil_tim Date: Fri, 7 Feb 2025 13:16:46 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=BC=D0=BE=D1=80=D0=B4=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D1=8F=20=D0=BD=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 237 +++++++++++-------------------------------- scripts/PRD.gd | 12 +-- scripts/constants.gd | 71 +------------ scripts/ems_g.gd | 50 ++++----- 4 files changed, 93 insertions(+), 277 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 31c8c9c..9ca0a5c 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=50 format=3 uid="uid://cvor2jm4xk3ha"] +[gd_scene load_steps=49 format=3 uid="uid://cvor2jm4xk3ha"] [ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"] [ext_resource type="Texture2D" uid="uid://cdxdluvyb5uei" path="res://table/on.png" id="2_dv7xx"] @@ -13,7 +13,6 @@ [ext_resource type="Script" path="res://scripts/ems_g.gd" id="9_g1wia"] [ext_resource type="Shader" path="res://load.gdshader" id="10_lf1xh"] [ext_resource type="PackedScene" uid="uid://bdb0bhfu7366l" path="res://kasseta-fs-kd.tscn" id="10_tdh2s"] -[ext_resource type="PackedScene" uid="uid://bnlkbbn7b4a3k" path="res://table/элемент-эмс.tscn" id="11_d60jk"] [ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"] [ext_resource type="Script" path="res://scripts/modul_fs.gd" id="15_b4pr1"] @@ -267,7 +266,7 @@ text = "Прочитать ISA" offset_left = 216.0 offset_top = 39.0 offset_right = 2420.0 -offset_bottom = 917.0 +offset_bottom = 936.0 theme = SubResource("Theme_k5ur4") theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157) theme_override_colors/font_selected_color = Color(0, 0, 0, 0) @@ -279,10 +278,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 -current_tab = 0 +current_tab = 1 tab_focus_mode = 0 [node name="PRD" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") metadata/_tab_index = 0 @@ -424,7 +424,6 @@ script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) [node name="ControlPanel" type="Panel" parent="TabContainer"] -visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") script = ExtResource("9_akagi") @@ -433,10 +432,10 @@ metadata/_edit_lock_ = true [node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 4.0 -offset_top = 21.0 -offset_right = 624.0 -offset_bottom = 52.0 +offset_left = 45.0 +offset_top = -37.0 +offset_right = 665.0 +offset_bottom = -6.0 theme_override_font_sizes/font_size = 22 text = "Контроль исправности прибора ПРД-Н" horizontal_alignment = 1 @@ -445,16 +444,16 @@ vertical_alignment = 1 [node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 199.0 -offset_top = 103.0 +offset_top = 10.0 offset_right = 516.0 -offset_bottom = 293.0 +offset_bottom = 200.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="IP5_25" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 @@ -474,7 +473,7 @@ fname = "ЯУ-07" rname = "A30" metadata/_edit_lock_ = true -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 @@ -484,7 +483,7 @@ fname = "ЭМС-Г" rname = "A26" metadata/_edit_lock_ = true -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 @@ -494,7 +493,7 @@ fname = "УГ" rname = "A27" metadata/_edit_lock_ = true -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 209.0 offset_top = 34.0 offset_right = 259.0 @@ -505,7 +504,7 @@ fname = "УКП-1" rname = "A28" metadata/_edit_lock_ = true -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 @@ -630,30 +629,20 @@ horizontal_alignment = 1 vertical_alignment = 1 [node name="MAA_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = -63.0 -offset_top = 36.0 -offset_right = -13.0 -offset_bottom = 210.0 -[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 40.0 -offset_top = -206.0 -offset_right = 90.0 -offset_bottom = -32.0 +offset_left = -64.0 +offset_top = 37.0 +offset_right = -14.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А22" [node name="MAA_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 199.0 -offset_top = 37.0 -offset_right = 249.0 -offset_bottom = 211.0 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 40.0 -offset_top = -448.0 -offset_right = 90.0 -offset_bottom = -274.0 +offset_left = 203.0 +offset_top = 36.0 +offset_right = 253.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" @@ -679,11 +668,6 @@ self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А20" -[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 16.0 -offset_top = 37.0 -offset_right = 66.0 -offset_bottom = 211.0 [node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] visible = false offset_left = 259.0 @@ -695,12 +679,34 @@ self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A21" +[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +visible = false +offset_left = 309.0 +offset_top = 34.0 +offset_right = 359.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50" +rname = "А22" +metadata/_edit_lock_ = true + +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 16.0 +offset_top = 36.0 +offset_right = 66.0 +offset_bottom = 210.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП12-50" +rname = "А21" + [node name="soc_P2" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 258.0 -offset_top = 649.0 -offset_right = 446.0 -offset_bottom = 865.0 +offset_left = 278.0 +offset_top = 645.0 +offset_right = 432.0 +offset_bottom = 861.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -710,154 +716,33 @@ patch_margin_bottom = 16 [node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P2"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 -offset_left = 7.0 +offset_left = 8.0 offset_top = 8.0 -offset_right = 181.0 +offset_right = 142.0 offset_bottom = 33.0 text = "Кассета П-2" horizontal_alignment = 1 vertical_alignment = 1 -[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] -offset_left = 73.0 -offset_top = 36.0 -offset_right = 123.0 -offset_bottom = 210.0 -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -visible = false -offset_left = 309.0 -offset_top = 34.0 -offset_right = 359.0 -offset_bottom = 208.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true -fname = "ИП9-50" -rname = "А22" - [node name="IP12_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] -offset_left = 128.0 +offset_left = 81.0 offset_top = 36.0 -offset_right = 178.0 +offset_right = 131.0 offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A25" -[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] -layout_mode = 0 -offset_left = 536.0 -offset_top = 550.0 -offset_right = 1055.0 -offset_bottom = 777.0 -texture = ExtResource("9_0r2qk") -patch_margin_left = 16 -patch_margin_top = 16 -patch_margin_right = 16 -patch_margin_bottom = 16 - -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/Signal_EMS_G"] -self_modulate = Color(1, 1, 1, 0.62) -layout_mode = 0 -offset_left = 7.0 -offset_top = 8.0 -offset_right = 508.0 -offset_bottom = 33.0 -text = "ЭМС-Г" -horizontal_alignment = 1 -vertical_alignment = 1 -metadata/_edit_lock_ = true - -[node name="ref_A22" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 9.0 -offset_top = 38.0 -offset_right = 59.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) +[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 24.0 +offset_top = 36.0 +offset_right = 74.0 +offset_bottom = 210.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50" rname = "A22" -metadata/_edit_lock_ = true - -[node name="ref_A23" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 59.0 -offset_top = 38.0 -offset_right = 109.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A23" -metadata/_edit_lock_ = true - -[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 109.0 -offset_top = 38.0 -offset_right = 159.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A26" -metadata/_edit_lock_ = true - -[node name="ref_A27" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 159.0 -offset_top = 38.0 -offset_right = 209.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A27" -metadata/_edit_lock_ = true - -[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 209.0 -offset_top = 38.0 -offset_right = 259.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A28" -metadata/_edit_lock_ = true - -[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 259.0 -offset_top = 38.0 -offset_right = 309.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A29" -metadata/_edit_lock_ = true - -[node name="ref_A31" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 309.0 -offset_top = 38.0 -offset_right = 359.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "УМ2" -metadata/_edit_lock_ = true - -[node name="ref_A32" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 359.0 -offset_top = 38.0 -offset_right = 409.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "УМ3" -metadata/_edit_lock_ = true - -[node name="ref_A33" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 409.0 -offset_top = 38.0 -offset_right = 459.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A33" -metadata/_edit_lock_ = true - -[node name="ref_A34" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 459.0 -offset_top = 38.0 -offset_right = 509.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A33" -metadata/_edit_lock_ = true [node name="device" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index ce784db..a86b892 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -125,7 +125,7 @@ func _ready() -> void: for key in Constants.RAY_DICT: node_select_yau_07b.get_node2(1, 3).add_item(key) node_select_yau_07b_2.get_node2(1, 3).add_item(key) - + ## Заполненение списка аттенюатора for key in Constants.ATT_DICT: node_select_yau_07b.get_node2(1, 4).add_item(key) @@ -348,13 +348,13 @@ func _on_data_received(data_from_yau_07): var _DKM: int = data_from_yau_07.decode_u16(Constants.DataIndices.DKM) # ДКМ от УГ #node_select1.set_node_text(2, 0, '%d' % dry_contact) #node_select1.set_node_text(3, 0, '%d' % DKM) - - + + ## УКП for i in range(6): ## Мощность от УКП_1 var power_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * i) node_select1.set_node_text(0, i+1, '%d' % power_ukp_1) - + for i in range(6): ## Температура от УКП_1 var temperature_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * i) var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP @@ -364,7 +364,7 @@ func _on_data_received(data_from_yau_07): if len(data_from_yau_07) > Constants.DataIndices.POWER_UKP_2 + 2 * i_pow: var power_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_2 + 2 * i_pow) node_select2.set_node_text(0, i_pow+1, '%d' % power_ukp_2) - + for row in range(6): ## Температура от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row: var temperature_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row) @@ -479,7 +479,7 @@ func _on_load_config(): func set_tab_and_buttons(tab_index: int, button_name: String) -> void: $TabContainer.current_tab = tab_index var side_panel = $Background/side_panel - + for button in side_panel.get_children(): if button is Button: button.button_pressed = (button.name == button_name) diff --git a/scripts/constants.gd b/scripts/constants.gd index 6d2c3fe..4eb493b 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -6,7 +6,7 @@ const DEFAULT_ADDRESS: String = '10.1.1.11' const DEFAULT_PORT: String = '50011' const CONST_MIN_TEMP: int = -25 const MAXIMUM_CODE_ADC: int = 3796 -const MINIMUM_CODE_AD: int = 2660 +const MINIMUM_CODE_AD: int = 2660 const TEMP: float = 115.0 / (MAXIMUM_CODE_ADC - MINIMUM_CODE_AD) const TableNode = preload("res://table/node.tscn") const TableList = preload("res://table/node_list.tscn") @@ -121,75 +121,6 @@ const ATT_DICT: Array = [ ' 10 dB', ' 10.5 dB', ] -const SIGNS_PRD: Array = [ - ## ПРК-К - [ - ' Запрет СИ7', - ' Запрет СИ1', - 'ЛИТЕРА 7! ПРД-К', - 'СЗИ6 от УФ', - 'СЗИ7 от УФ', - 'СИ6 от ФС', - 'СИ7 от ФС', - 'СИ6 в УФ', - 'СИ7 в УФ', - 'Мод. УМ 6', - 'Мод. УМ 7', - 'ФГОЗ 6', - 'Мод. УМ 1', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - 'ИП9-50 №3', - 'ИП5-25', - ], - ## ПРК-В - [ - ' Запрет СИ4', - ' Запрет СИ5', - '', - 'ЛИТЕРА 5! ПРД-В', - 'СЗИ4 от УФ', - 'СЗИ5 от УФ', - 'СИ4 от ФС', - 'СИ5 от ФС', - 'СИ4 в УФ', - 'СИ5 в УФ', - 'Мод. УМ 4', - 'Мод. УМ 5', - 'ФГОЗ 4', - 'ФГОЗ 5', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - '-', - '-', - 'ИП5-25', - ], - ## ПРД-Н - [ - ' Запрет СИ3', - '', - 'ЛИТЕРА 3! ПРД-Н', - 'СИ3 от ФС', - 'СИ2 в УФ', - 'СИ3 в УФ', - 'Мод. УМ 2', - 'Мод. УМ 3', - 'ФГОЗ 3', - '-', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - '-', - '-', - 'ИП5-25', - '--', - ], -] enum BASE_PORTS { UG = 0x100, diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 0821155..760296d 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -10,7 +10,7 @@ func _on_read_ems_g(): for i_input in 16: Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_input) Network.read_port_isa([Constants.BASE_PORTS.EMS_G+0xA]) - + for i_output in range(46, 62): Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_output) Network.read_port_isa([Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8]) @@ -27,7 +27,7 @@ func _on_sync(): port0x124 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key] for row in 16: if (port0x124 & (1 << row)) != 0: - var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false) + var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false) chk_btn.button_pressed =true if key == 0x128: port0x128 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key] @@ -52,24 +52,24 @@ func _ready() -> void: else: column.append(Constants.TableNode) EMS_G_TABLE.append(column) - + draw_tabl(node_select1, EMS_G_TABLE, EMS_G_TABLE.size()) - + node_select1.get_node2(1, 1).text = 'x3_ВЫХ:GND' node_select1.get_node2(0, 2).text = 'x3_ВХ :GND' for i in Constants.INPUT_EMS_G.size(): node_select1.get_node2(0, i+shift+1).text = Constants.INPUT_EMS_G[i] - + for i in Constants.OUT_EMS_G.size(): node_select1.get_node2(i+shift, 1).text = Constants.OUT_EMS_G[i][1] - + for i in EMS_G_TABLE[0].size()-shift: var list = node_select1.get_node2(i+shift, 0) list.set_meta('device', Constants.OUT_EMS_G[i][0]) list.connect('item_selected', Callable(self, 'on_mode_link').bind(list)) for k in Constants.OUT_x128.size(): - list.add_item(Constants.OUT_x128[k]) - + list.add_item(Constants.OUT_x128[k]) + var columns_min_size: Array for i in EMS_G_TABLE[0].size(): if i < 2: @@ -77,13 +77,13 @@ func _ready() -> void: else: columns_min_size.append(80) node_select1.set_columns_min_size(columns_min_size) - + var parrent_NODE2 = get_parent().get_parent() parrent_NODE2.connect('read_ems_g_start', Callable(self, '_on_read_ems_g')) parrent_NODE2.connect('read_ems_g_finish', Callable(self, '_on_sync')) Network.connect('yau_receive', Callable(self, '_on_data_received')) create_link_button(node_select1, shift+1, 16+shift+1, shift, 16+shift) - + func draw_tabl(tbl, row: Array, count_row: int): for i_row in count_row: @@ -96,23 +96,23 @@ func _on_data_received(data_from_yau_07): var out_blank: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_BLANK_PRD) var out_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_IMPULS_PRD) var parent_node2 = get_parent().get_parent() - - process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2) - process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2) - - + + #process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2) + #process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2) + + func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node): for i in count: var socket_status = node_select1.get_node2(col+i, shift).get_child(1, false) var frame_type = Constants.Frame.WORK - + if (blank & (1 << i)) != 0: frame_type = Constants.Frame.CONSTANT elif (imp & (1 << i)) != 0: frame_type = Constants.Frame.VARIABLE - + set_frame(socket_status, frame_type) - + if i == 1: set_frame(get_specific_node(parent_node2, 5), frame_type) if i == 2: @@ -129,14 +129,14 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod for i in count: var socket_status = node_select1.get_node2(col, i + shift+1).get_child(1, false) var frame_type = Constants.Frame.WORK - + if (blank & (1 << i)) != 0: frame_type = Constants.Frame.CONSTANT elif (imp & (1 << i)) != 0: frame_type = Constants.Frame.VARIABLE - + set_frame(socket_status, frame_type) - + if i == 1: set_frame(get_specific_node(parent_node2, 1), frame_type) var CI_2_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 6).get_child(1) @@ -170,7 +170,7 @@ func create_link_button(node, count_rows_sart: int, count_rows_end: int, coln_st for i_colum in 16: META_EMS_G.append([INPUT+i_row, OUTPUT+i_colum]) button_link_meta[OUTPUT+i_colum] = 0 - + var count_register = 0 for i_row in range(count_rows_sart, count_rows_end): for i_col in range (coln_start, coln_end): @@ -188,7 +188,7 @@ func on_mouse_entered(meta_area): var device = meta_area.get_meta('device') var y = device[0] + 1 var x = device[1] - 45 - + for i_y in 18: for i_x in 18: if i_y <= y and i_x <= x and i_y == y: @@ -207,9 +207,9 @@ func on_mode_link(mode, list): var meta = list.get_meta('device') var address_port_wr = Constants.BASE_PORTS.EMS_G+2 Network.write_port_isa(address_port_wr, meta) # Отправка команды - + ## Формирование команды для отправкы команды на устройство - address_port_wr = Constants.BASE_PORTS.EMS_G+8 + address_port_wr = Constants.BASE_PORTS.EMS_G+8 var set_mode = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000 Network.write_port_isa(address_port_wr, set_mode) From 2e8082a26a93e203860619a2cd86ec378a434506 Mon Sep 17 00:00:00 2001 From: danil_tim Date: Mon, 10 Feb 2025 13:02:26 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=BC=D0=BE=D1=80=D0=B4=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 47 ++++------------ scripts/PRD.gd | 4 +- scripts/constants.gd | 9 ++- scripts/control_panel.gd | 52 +++++------------ scripts/network.gd | 24 ++++---- scripts/nine-patch-button.gd | 86 +++++++++++++++++++++++++++++ table/элемент-в.tscn | 59 +++++--------------- состояние-исправности-0.png | Bin 0 -> 4148 bytes состояние-исправности-0.png.import | 34 ++++++++++++ состояние-исправности-1.png | Bin 0 -> 2606 bytes состояние-исправности-1.png.import | 34 ++++++++++++ состояние-исправности-2.png | Bin 0 -> 2275 bytes состояние-исправности-2.png.import | 34 ++++++++++++ 13 files changed, 245 insertions(+), 138 deletions(-) create mode 100644 scripts/nine-patch-button.gd create mode 100644 состояние-исправности-0.png create mode 100644 состояние-исправности-0.png.import create mode 100644 состояние-исправности-1.png create mode 100644 состояние-исправности-1.png.import create mode 100644 состояние-исправности-2.png create mode 100644 состояние-исправности-2.png.import diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 9ca0a5c..810dd1a 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -458,61 +458,48 @@ offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ИП5-25" rname = "A24" -metadata/_edit_lock_ = true [node name="ay07" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 59.0 offset_top = 34.0 offset_right = 109.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ЯУ-07" rname = "A30" -metadata/_edit_lock_ = true [node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ЭМС-Г" rname = "A26" -metadata/_edit_lock_ = true [node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "УГ" rname = "A27" -metadata/_edit_lock_ = true - -[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] -offset_left = 209.0 -offset_top = 34.0 -offset_right = 259.0 -offset_bottom = 183.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 149) -fname = "УКП-1" -rname = "A28" -metadata/_edit_lock_ = true [node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "УКП-2" rname = "A29" -metadata/_edit_lock_ = true + +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 210.0 +offset_top = 35.0 +offset_right = 260.0 +offset_bottom = 185.0 +fname = "УКП-1" +rname = "A28" [node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_y5"] self_modulate = Color(1, 1, 1, 0.62) @@ -543,14 +530,12 @@ offset_bottom = 33.0 text = "Кассета ФС-НД" horizontal_alignment = 1 vertical_alignment = 1 -metadata/_edit_lock_ = true [node name="ref_A3" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 41.0 offset_right = 159.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "БЛОК ФС-2" rname = "A3" @@ -560,7 +545,6 @@ offset_left = 159.0 offset_top = 41.0 offset_right = 209.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A1" @@ -570,7 +554,6 @@ offset_left = 209.0 offset_top = 41.0 offset_right = 259.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A2" @@ -580,17 +563,15 @@ offset_left = 259.0 offset_top = 41.0 offset_right = 309.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "БЛОК ФС-3" rname = "A4" [node name="Block_FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 12.0 -offset_top = 41.0 +offset_top = 40.0 offset_right = 62.0 -offset_bottom = 211.0 -textures = Array[Texture]([]) +offset_bottom = 210.0 self_size = Vector2i(50, 170) fname = "БЛОК ФС-1" rname = "A4" @@ -600,7 +581,6 @@ offset_left = 61.0 offset_top = 41.0 offset_right = 111.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A1" @@ -633,7 +613,6 @@ offset_left = -64.0 offset_top = 37.0 offset_right = -14.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А22" @@ -643,7 +622,6 @@ offset_left = 203.0 offset_top = 36.0 offset_right = 253.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А23" @@ -653,7 +631,6 @@ offset_left = 129.0 offset_top = 37.0 offset_right = 179.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А19" @@ -663,7 +640,6 @@ offset_left = 73.0 offset_top = 37.0 offset_right = 123.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А20" @@ -696,7 +672,6 @@ offset_left = 16.0 offset_top = 36.0 offset_right = 66.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "А21" @@ -729,7 +704,6 @@ offset_left = 81.0 offset_top = 36.0 offset_right = 131.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A25" @@ -739,7 +713,6 @@ offset_left = 24.0 offset_top = 36.0 offset_right = 74.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "A22" diff --git a/scripts/PRD.gd b/scripts/PRD.gd index a86b892..46bed50 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -131,7 +131,7 @@ func _ready() -> void: node_select_yau_07b.get_node2(1, 4).add_item(key) node_select_yau_07b_2.get_node2(1, 4).add_item(key) - draw_control_panel_prd(Constants.ADDRESSES[0][3]) + #draw_control_panel_prd(Constants.ADDRESSES[0][3]) Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) @@ -490,8 +490,6 @@ func on_btn_select(intem_from_sector: int) -> void: var get_select_device = node_select_device.get_node2(1, 0) var meta = get_select_device.get_item_metadata(intem_from_sector) Network.on_command_change_device(meta) - flag_mode = meta[2] - draw_control_panel_prd(flag_mode) _on_start_fs_1() Constants.CURRENT_MODE = meta[2] draw_control_panel_prd(Constants.CURRENT_MODE) diff --git a/scripts/constants.gd b/scripts/constants.gd index 4eb493b..3db2a63 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -1,6 +1,6 @@ extends Node -const UNICAST_PORT: int = 50003 -const UNICAST_ADDRESS: String = '10.1.1.3' +const UNICAST_PORT: int = 50014 +const UNICAST_ADDRESS: String = '10.1.1.14' const BROADCAST_PORT: int = 50000 const DEFAULT_ADDRESS: String = '10.1.1.11' const DEFAULT_PORT: String = '50011' @@ -162,6 +162,11 @@ enum STATE { SEND, } +enum STATE_VAL { + NONE = 0, + GOOD = 1, + ERROR = 2 } + var EMS_G_PORT_DATA_HOLDER: Array = [] # Таблица CRC-32 для модуля ФС diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 961f9cf..0bf2e4b 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -1,15 +1,18 @@ extends Panel var unit_yau07 = Yau07.YaU07.new('ЯУ07') -var sockets_ind: Array -var node_power_ind: Array func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) - Network.connect('yau_status_line', Callable(self, '_on_yau_status')) + Network.connect('yau_status_line', Callable(self, '_control_pribor')) - sockets_ind = [ + var timer = Timer.new() + self.add_child(timer) + timer.connect('timeout', Callable(self, 'on_timer')) + timer.start(1) + + '''sockets_ind = [ $soc_y5/ems_g/light_ind, $soc_y5/ug/light_ind, $soc_y5/ukp_1/light_ind, @@ -23,46 +26,17 @@ func _ready() -> void: $soc_P1/IP12_50/light_ind, $soc_P2/IP9_50/light_ind, $soc_P2/IP12_50/light_ind, - $soc_y5/IP5_25/light_ind] - - -func lose_connect_yau(): - for i in 4: - sockets_ind[i].button_pressed = false - sockets_ind[i].disabled = true - for i in 8: - node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true + $soc_y5/IP5_25/light_ind]''' +func on_timer(unit): + print(unit) func _on_data_received(data_from_yau_07): var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) - ## SOCKETS BOARDS - for i in 4: - var j = int(status_board & (1 << i) == 0) - if j == 0: - sockets_ind[i].button_pressed = true - sockets_ind[i].disabled = false - else: - sockets_ind[i].button_pressed = false - sockets_ind[i].disabled = true - - ## Блок ИП - for i in 8: - var j = int(not(dry_contact & (1 << i) == 0)) - var a = node_power_ind[i] - if j == 0: - node_power_ind[i].button_pressed = true - node_power_ind[i].disabled = false - else: - node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true - ## From Network status about yau-07 -func _on_yau_status(yau_status:bool) -> void: - $device.text = str(Constants.CURRENT_MODE) - $soc_y5/ay07/light_ind.button_pressed = yau_status - $soc_y5/ay07/light_ind.disabled = not yau_status +func _control_pribor(yau_status:bool) -> void: + #$device.text = str(Constants.CURRENT_MODE) + $soc_y5/ay07.state = Constants.STATE_VAL.GOOD diff --git a/scripts/network.gd b/scripts/network.gd index cf8ad61..0cf50e3 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -46,7 +46,7 @@ func poll_receive_yau07(sock: Socket) -> bool: ## Приёмник broadcast_packet = sock.get_packet() var addr_receive = sock.get_packet_ip() var port_receive = sock.get_packet_port() - + if (ip_address_yau == addr_receive) and (ip_port_yau == port_receive): last_update_time_yau07 = 0.0 unit.parse(broadcast_packet) @@ -69,7 +69,7 @@ func poll_receive_fs(client: StreamPeerTCP): if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: emit_signal("port_closed", ip_fs_1) return - + if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) @@ -85,11 +85,11 @@ func _ready() -> void: var rc = soc_brodcast.bind(Constants.BROADCAST_PORT, '*') if rc != OK: print_debug('Ошибка: Неудачная привязка широковещательного адреса') - + soc_unicast = Socket.new() rc = soc_unicast.bind(Constants.UNICAST_PORT, Constants.UNICAST_ADDRESS) if rc != OK: - print_debug('Ошибка: неудачная привязка адреса: ', ip_address_yau) + print_debug('Ошибка: неудачная привязка адреса: ', ip_address_yau) unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) @@ -101,16 +101,16 @@ func _process(delta: float) -> void: last_update_time_yau07 += delta last_update_time_fs += delta - + if client_fs_1: poll_receive_fs(client_fs_1) - + poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) - + state_machine_yau07() state_machine_fs() - + match unit.process(delta): Error.OK: soc_unicast.send_to(ip_address_yau, ip_port_yau, unit.tx_data.slice(0, unit.tx_len)) Error.FAILED: print_debug('Ошибка отправки данных') @@ -142,12 +142,12 @@ func state_machine_yau07(): state = Constants.STATE.WAIT -# Записать команду в ИСА +# Записать команду в ИСА func read_port_isa(read_ports: Array) -> void: send_array.append(['rd', read_ports]) -# Прочитать данные из порта от ИСА +# Прочитать данные из порта от ИСА func write_port_isa(port_isa: int, data_isa: int) -> void: var write_data: Dictionary = {port_isa: data_isa} send_array.append(['wr', write_data]) @@ -185,7 +185,7 @@ func state_machine_fs(): func connect_fs(): if client_fs_1: disconnect_fs(client_fs_1) - + client_fs_1 = StreamPeerTCP.new() peerstream_fs_1 = PacketPeerStream.new() var rc = client_fs_1.connect_to_host(ip_fs_1, Constants.PORT_FS) @@ -201,7 +201,7 @@ func send_data(data_to_sand: PackedByteArray): var peer = peerstream_fs_1.get_stream_peer() if peer: peer.put_data(data_to_sand) - emit_signal("data_send") + emit_signal("data_send") # Разорвать соединение с ФС diff --git a/scripts/nine-patch-button.gd b/scripts/nine-patch-button.gd new file mode 100644 index 0000000..a03ad20 --- /dev/null +++ b/scripts/nine-patch-button.gd @@ -0,0 +1,86 @@ +@tool + +extends PanelContainer + +func set_text(val: String): $button.set_text(val) +func set_pressed(val: bool): $button.set_pressed(val) +func set_disabled(val: bool): disabled = val +func get_text(): return $button.get_text() +func is_pressed(): return $button.is_pressed() +func is_toggle_mode(): return $button.is_toggle_mode() + + +@export var texture_state0: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_d3qtt'): + set(val): $state.set_texture(val) + + +@export var texture_state1: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_k8o6s'): + set(val): $state.set_texture(val) + + +@export var strips_rotation: float = 0.0: + set(val): + strips_rotation = val + $back.strips_rotation = deg_to_rad(val) + get: return strips_rotation + + +@export var text: String = '': + set(val): $button.set_text(val) + get: return $button.get_text() + + +@export var disabled: bool = false: + set(val): + disabled = val + $button.set_disabled(val) + $back.disabled = val + $state.modulate.a = 0.5 if val else 1.0 + get: return disabled + + +@export var pressed: bool = false: + set(val): + pressed = val + $button.set_pressed(val) + get: + return pressed + + +@export var toggle_mode: bool = false: + set(val): + toggle_mode = val + $button.set_toggle_mode(val) + get: + return toggle_mode + + +func button_connect(button_signal: String, proc: Callable): + var rc = $button.connect(button_signal, proc) + if rc != Error.OK: + push_error('возникла ошибка \"%s\" при подключении сигнала \"%s\" к обработчику \"%s\"' % [error_string(rc), button_signal, proc]) + + +func _on_resized() -> void: + $back.scale = size + $back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0)) + + +func _enter_tree() -> void: + $back.scale = size + $back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0)) + $button.set_toggle_mode(true) + $button.connect('toggled', _on_button_toggled) + + +func _exit_tree() -> void: + $button.disconnect('toggled', _on_button_toggled) + + +func set_toggle_mode(val: bool): + $button.set_toggle_mode(val) + + +func _on_button_toggled(val: bool): + if val: $state.set_texture(texture_state1) + else: $state.set_texture(texture_state0) diff --git a/table/элемент-в.tscn b/table/элемент-в.tscn index 7449675..b2ea5f0 100644 --- a/table/элемент-в.tscn +++ b/table/элемент-в.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=15 format=3 uid="uid://p2suppildvq0"] +[gd_scene load_steps=12 format=3 uid="uid://p2suppildvq0"] +[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://состояние-исправности-0.png" id="1_2n7he"] [ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="2_4b43i"] +[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://состояние-исправности-1.png" id="2_38t58"] [ext_resource type="Shader" path="res://opt_btn.gdshader" id="2_ecsml"] [ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_4kmgr"] +[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://состояние-исправности-2.png" id="3_i2t3v"] [ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_omove"] [ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_jia67"] @@ -44,8 +47,8 @@ func _resize_children() -> void: $lbl_rname.position.y = margins[0] $lbl_fname.size.y = size.x $lbl_fname.position.y = size.y / 2 + $lbl_fname.size.x / 2 - $light_ind.position.x = size.x / 2 - ($light_ind.size.x * $light_ind.scale.x) / 2 - $light_ind.position.y = size.y - $light_ind.size.y * $light_ind.scale.x - margins[2] + $txr_state.position.x = size.x / 2 - ($txr_state.size.x * $txr_state.scale.x) / 2 + $txr_state.position.y = size.y - $txr_state.size.y * $txr_state.scale.x - margins[2] func _on_nine_patch_rect_resized() -> void: @@ -75,37 +78,6 @@ shader = ExtResource("2_ecsml") shader_parameter/range = 0.4 shader_parameter/color = Color(0.764706, 0.764706, 0.764706, 1) -[sub_resource type="Gradient" id="Gradient_x8k3w"] -colors = PackedColorArray(1, 1, 1, 1, 0.393086, 0.393086, 0.393085, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_cgu2r"] -gradient = SubResource("Gradient_x8k3w") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) -fill_to = Vector2(1.125, 0) - -[sub_resource type="Gradient" id="Gradient_1tk1g"] -colors = PackedColorArray(0.1, 1, 0.1, 1, 0.124744, 0.328804, 0.202483, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_d3qtt"] -gradient = SubResource("Gradient_1tk1g") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) - -[sub_resource type="Gradient" id="Gradient_6e32x"] -colors = PackedColorArray(1, 0.1, 0.1, 1, 0.329, 0.125, 0.202, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_k8o6s"] -gradient = SubResource("Gradient_6e32x") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) - [sub_resource type="SpriteFrames" id="SpriteFrames_nofpw"] animations = [{ "frames": [{ @@ -133,7 +105,7 @@ anchors_preset = 0 offset_right = 50.0 offset_bottom = 150.0 script = SubResource("GDScript_fbktk") -textures = Array[Texture]([ExtResource("2_4b43i"), ExtResource("2_4b43i"), ExtResource("2_4b43i")]) +textures = Array[Texture]([ExtResource("1_2n7he"), ExtResource("2_38t58"), ExtResource("3_i2t3v")]) metadata/ref_des = "" metadata/dec_num = "" @@ -160,19 +132,16 @@ text = "Ячейка" horizontal_alignment = 1 vertical_alignment = 1 -[node name="light_ind" type="TextureButton" parent="."] +[node name="txr_state" type="TextureRect" parent="."] material = SubResource("ShaderMaterial_45ast") layout_mode = 0 -offset_left = 13.0 -offset_top = 114.0 -offset_right = 38.0 -offset_bottom = 139.0 +offset_left = 14.0 +offset_top = 116.0 +offset_right = 238.0 +offset_bottom = 340.0 +scale = Vector2(0.1, 0.1) size_flags_vertical = 6 -toggle_mode = true -button_mask = 0 -texture_normal = SubResource("GradientTexture2D_cgu2r") -texture_pressed = SubResource("GradientTexture2D_d3qtt") -texture_disabled = SubResource("GradientTexture2D_k8o6s") +texture = ExtResource("1_2n7he") [node name="np_rect" type="NinePatchRect" parent="."] layout_mode = 0 diff --git a/состояние-исправности-0.png b/состояние-исправности-0.png new file mode 100644 index 0000000000000000000000000000000000000000..33966d1ec3af8bef1ca840fc33cf3c0883d6ab5e GIT binary patch literal 4148 zcma)AcQhQz+g@Z7onWI!3Bl@%u(JBDSiSCQtG6J6)olB6^Dr600W? zQKK$`xHmfA-gE!|&hL+zIqy5~nK@_XeV^xkUaW`aUP)MjsBrW;Y)%%LXEOgKjZDkcQ{%euWR&Z~89_S?5U5{YEmGd()WKqL}n zcoDCr;?kNd&~s6i(}5 z+8i!#)L!Zvny$dbAfIa>&-IBRftfO6_?l*7oBu5~Ncus#MH(d+W_O)NL=R%+pUL*G zjk>!~A~>0I_XkAt)~kbbLDOE{!R-L$NL}}KU)R_a7ascSY-yBl1njJvy_&62dWuE_ ze(EH1M3N3gR{EY7plo<%kX`Y}Mt5ykI6I{fknx_UpZ@zlOeT|Fgd`NJlVu-Y|Xi1b4hI zAfA3n>#*a=)3p(e8*W=TJyjl@5^`$#_W2FBzn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S7x_7f-l$oJR9P2-~@LhBLhuHIIgJikSk+Fi` gn-7oyqHku^b%PwdpS;Nr9$o<2p`e2`)YCct0tN>Xxc~qF literal 0 HcmV?d00001 diff --git a/состояние-исправности-2.png.import b/состояние-исправности-2.png.import new file mode 100644 index 0000000..aa075f9 --- /dev/null +++ b/состояние-исправности-2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvikuv0lbvou8" +path="res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://состояние-исправности-2.png" +dest_files=["res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1