From af34e6beacb7bcfc65c266edce0ab74f4f63852d Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 20 Dec 2024 09:40:11 +0300 Subject: [PATCH] tmp --- PRD_MP550.tscn | 131 +++++++++++++++++++++++++++++++------------------ ems_g.gd | 6 +-- 2 files changed, 85 insertions(+), 52 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 1fe4533..9077846 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -464,10 +464,10 @@ vertical_alignment = 1 [node name="sockets" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 791.0 -offset_top = 62.0 -offset_right = 1100.0 -offset_bottom = 252.0 +offset_left = 536.0 +offset_top = 103.0 +offset_right = 840.0 +offset_bottom = 293.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -533,18 +533,18 @@ metadata/_edit_lock_ = true [node name="kasseta_fs_kd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] layout_mode = 0 -offset_left = 791.0 -offset_top = 271.0 -offset_right = 1101.0 -offset_bottom = 498.0 +offset_left = 206.0 +offset_top = 311.0 +offset_right = 516.0 +offset_bottom = 538.0 script = null [node name="kasseta_p_1" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 791.0 -offset_top = 520.0 -offset_right = 1211.0 -offset_bottom = 736.0 +offset_left = 96.0 +offset_top = 560.0 +offset_right = 516.0 +offset_bottom = 776.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -646,10 +646,10 @@ metadata/_edit_lock_ = true [node name="ref_ZZ3" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 461.0 -offset_top = 602.0 -offset_right = 771.0 -offset_bottom = 739.0 +offset_left = 536.0 +offset_top = 562.0 +offset_right = 997.0 +offset_bottom = 776.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -659,10 +659,10 @@ patch_margin_bottom = 16 [node name="label" type="Label" parent="TabContainer/ControlPanel/ref_ZZ3"] self_modulate = Color(0.996078, 1, 1, 0.627451) layout_mode = 0 -offset_left = 10.0 +offset_left = 8.0 offset_top = 8.0 -offset_right = 302.0 -offset_bottom = 120.0 +offset_right = 453.0 +offset_bottom = 206.0 text = "Панель предохранителей" horizontal_alignment = 1 @@ -670,10 +670,10 @@ vertical_alignment = 1 [node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 463.0 -offset_top = 271.0 -offset_right = 772.0 -offset_bottom = 498.0 +offset_left = 536.0 +offset_top = 311.0 +offset_right = 996.0 +offset_bottom = 538.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -685,57 +685,92 @@ self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 offset_top = 8.0 -offset_right = 291.0 +offset_right = 448.0 offset_bottom = 33.0 -text = "Сигналы от ЭМС-Г" +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 = 5.0 +offset_left = 8.0 offset_top = 38.0 -offset_right = 55.0 +offset_right = 58.0 offset_bottom = 216.0 self_size = Vector2i(50, 178) fname = "СЗИ2 от УФ" -metadata/_edit_lock_ = true +rname = "A22" + +[node name="ref_A23" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 57.0 +offset_top = 38.0 +offset_right = 107.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "СЗИ3 от УФ" +rname = "A23" [node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 55.0 +offset_left = 106.0 offset_top = 38.0 -offset_right = 105.0 +offset_right = 156.0 offset_bottom = 216.0 self_size = Vector2i(50, 178) fname = "СИ2 от ФС" -metadata/_edit_lock_ = true +rname = "A26" -[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 105.0 -offset_top = 38.0 -offset_right = 155.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -fname = "СИ2 в УФ" -metadata/_edit_lock_ = true - -[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +[node name="ref_A27" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] offset_left = 155.0 offset_top = 38.0 offset_right = 205.0 offset_bottom = 216.0 self_size = Vector2i(50, 178) -fname = "Модуляция" -metadata/_edit_lock_ = true +fname = "СИ3 от ФС" +rname = "A27" -[node name="ref_A30" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 205.0 +[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 204.0 offset_top = 38.0 -offset_right = 255.0 +offset_right = 254.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "СИ2 в УФ" +rname = "A28" + +[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 254.0 +offset_top = 38.0 +offset_right = 304.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "СИ3 в УФ" +rname = "A29" + +[node name="ref_A31" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 304.0 +offset_top = 38.0 +offset_right = 354.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "Модуляция" +rname = "A31" + +[node name="ref_A32" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 354.0 +offset_top = 38.0 +offset_right = 404.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "Модуляция" +rname = "A32" + +[node name="ref_A33" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 405.0 +offset_top = 38.0 +offset_right = 455.0 offset_bottom = 216.0 self_size = Vector2i(50, 178) fname = "ФГОЗ" -metadata/_edit_lock_ = true +rname = "A33" [node name="EMS_G" type="Panel" parent="TabContainer"] visible = false diff --git a/ems_g.gd b/ems_g.gd index 5f4c180..dec9433 100644 --- a/ems_g.gd +++ b/ems_g.gd @@ -194,13 +194,11 @@ func on_mode_link(mode, list): func _on_btn_connect(toggled_on: bool, chk_btn: Node): ## Формирование команды для выбора устройства var meta = chk_btn.get_meta('device') - var address_port_wr = Constants.EMS_G_BASE_ADDR+2 - Network.write_port_isa(address_port_wr, meta[1]) # Отправка команды + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+2, meta[1]) # Отправка команды ## Формирование команды для отправкы команды на устройство if toggled_on: button_link_meta[meta[1]] += 1 << meta[0]-1 else: button_link_meta[meta[1]] -= 1 << meta[0]-1 - address_port_wr = Constants.EMS_G_BASE_ADDR+4 - Network.write_port_isa(address_port_wr, button_link_meta[meta[1]]) + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+4, button_link_meta[meta[1]])