diff --git a/PRD31B9.tmp b/PRD31B9.tmp new file mode 100644 index 0000000..5142942 --- /dev/null +++ b/PRD31B9.tmp @@ -0,0 +1,786 @@ +[gd_scene load_steps=47 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"] +[ext_resource type="Script" path="res://table/table.gd" id="2_vmbyo"] +[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://Shaders/shader_edu.tres" id="3_3syd3"] +[ext_resource type="Texture2D" uid="uid://cfktmk2rowmul" path="res://table/off.png" id="3_qvuyu"] +[ext_resource type="Shader" path="res://Shaders/ray.gdshader" id="4_uy5o2"] +[ext_resource type="Texture2D" uid="uid://62v0xejejuwj" path="res://Web.png" id="5_i3nvb"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"] +[ext_resource type="Script" path="res://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"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"] +bg_color = Color(0.356863, 0.278431, 0.356863, 1) +border_width_bottom = 6 +border_color = Color(0.228592, 0.173062, 0.22863, 1) +border_blend = true + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0too"] +bg_color = Color(0.223529, 0.168627, 0.223529, 1) +border_width_bottom = 6 +border_color = Color(0.339047, 0.26316, 0.339004, 1) +border_blend = true + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gooip"] +bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lqhgx"] +bg_color = Color(0, 0, 0, 0.490196) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_148rs"] +bg_color = Color(0, 0, 0, 0.490196) +border_width_bottom = 4 +border_color = Color(0.223529, 0.168627, 0.223529, 1) +border_blend = true +corner_radius_top_left = 2 +corner_radius_top_right = 2 +corner_radius_bottom_right = 2 +corner_radius_bottom_left = 2 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ldbvf"] +bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196) + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h8aei"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_d322q"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_8j02b"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ls6vm"] + +[sub_resource type="Theme" id="Theme_k5ur4"] +Button/styles/focus = SubResource("StyleBoxFlat_eib3t") +Button/styles/hover = SubResource("StyleBoxFlat_o0too") +Button/styles/normal = SubResource("StyleBoxFlat_o0too") +Button/styles/pressed = SubResource("StyleBoxFlat_eib3t") +CheckButton/icons/checked = ExtResource("2_dv7xx") +CheckButton/icons/unchecked = ExtResource("3_qvuyu") +OptionButton/font_sizes/font_size = 17 +OptionButton/styles/focus = SubResource("StyleBoxFlat_gooip") +OptionButton/styles/hover = SubResource("StyleBoxFlat_lqhgx") +OptionButton/styles/normal = SubResource("StyleBoxFlat_148rs") +OptionButton/styles/pressed = SubResource("StyleBoxFlat_ldbvf") +TabContainer/styles/panel = SubResource("StyleBoxTexture_h8aei") +TabContainer/styles/tab_focus = SubResource("StyleBoxTexture_d322q") +TabContainer/styles/tab_selected = SubResource("StyleBoxTexture_8j02b") +TabContainer/styles/tabbar_background = SubResource("StyleBoxTexture_ls6vm") + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pxarn"] +bg_color = Color(0.356863, 0.278431, 0.356863, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p247y"] +bg_color = Color(0.356863, 0.278431, 0.356863, 1) + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rh6pm"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_x11tp"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_mn8w2"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_21lc8"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_k08q3"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_dklg6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_17le6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_7u7p7"] + +[sub_resource type="Gradient" id="Gradient_jlp41"] +colors = PackedColorArray(0, 0.647059, 0, 1, 0, 0.266667, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_u3yy8"] +gradient = SubResource("Gradient_jlp41") +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(1.145, 0) + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_otisn"] +texture = SubResource("GradientTexture2D_u3yy8") + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_723du"] +size = Vector2(1600, 1200) + +[sub_resource type="GDScript" id="GDScript_0sobq"] +script/source = "extends Sprite2D + +" + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o7txs"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_dgiai"] +shader = ExtResource("4_uy5o2") +shader_parameter/color_signal = Color(0.690196, 0.776471, 0, 1) +shader_parameter/turn = 0.785 + +[sub_resource type="Gradient" id="Gradient_ki0n7"] + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_0pk2o"] +gradient = SubResource("Gradient_ki0n7") +fill_from = Vector2(0.474359, 0.5) +metadata/_snap_enabled = true + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tn8m6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ooo4i"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_slcfo"] +shader = ExtResource("10_lf1xh") +shader_parameter/frequency = 5.0 +shader_parameter/amplitude = 600.0 +shader_parameter/speed = 5.0 +shader_parameter/direction = -1.0 +shader_parameter/color1 = Color(0, 0, 0, 1) +shader_parameter/color2 = Color(0.235, 0.18, 0.235, 1) +shader_parameter/color3 = Color(0.235, 0.18, 0.235, 0.5) +shader_parameter/color4 = Color(0, 0, 0, 0) +shader_parameter/opacity = 0.218 +shader_parameter/turn = 0.785 + +[node name="Node2D" type="Node2D"] +script = ExtResource("1_v273n") + +[node name="Background" type="ColorRect" parent="."] +offset_right = 1941.0 +offset_bottom = 988.0 +theme = SubResource("Theme_k5ur4") +color = Color(0.356863, 0.278431, 0.356863, 1) +metadata/_edit_lock_ = true + +[node name="side_panel" type="ColorRect" parent="Background"] +layout_mode = 0 +offset_right = 216.0 +offset_bottom = 988.0 +color = Color(0.586231, 0.481877, 0.585869, 1) + +[node name="select_prd" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 120.0 +offset_right = 216.0 +offset_bottom = 156.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_pxarn") +toggle_mode = true +button_pressed = true +text = "ПРД" + +[node name="select_control" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 160.0 +offset_right = 216.0 +offset_bottom = 196.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +toggle_mode = true +text = "КОНТРОЛЬ" + +[node name="select_ems_g" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 200.0 +offset_right = 216.0 +offset_bottom = 236.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +toggle_mode = true +text = "ЭМС Г" + +[node name="Litera_3_5_7" type="ColorRect" parent="Background"] +visible = false +layout_mode = 0 +offset_top = 48.0 +offset_right = 1941.0 +offset_bottom = 352.0 +color = Color(0.669446, 0.567301, 0.66881, 1) + +[node name="Litera_1" type="ColorRect" parent="Background"] +visible = false +layout_mode = 0 +offset_top = 359.0 +offset_right = 2182.0 +offset_bottom = 638.0 +color = Color(0.669446, 0.567301, 0.66881, 1) + +[node name="ISA" type="Label" parent="."] +offset_left = 225.0 +offset_top = 11.0 +offset_right = 1853.0 +offset_bottom = 48.0 +autowrap_mode = 3 + +[node name="read_isa" type="Button" parent="."] +offset_left = 85.0 +offset_top = 7.0 +offset_right = 210.0 +offset_bottom = 38.0 +text = "Прочитать ISA" + +[node name="TabContainer" type="TabContainer" parent="."] +offset_left = 216.0 +offset_top = 39.0 +offset_right = 2420.0 +offset_bottom = 917.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) +theme_override_styles/tab_focus = SubResource("StyleBoxTexture_rh6pm") +theme_override_styles/tab_disabled = SubResource("StyleBoxTexture_x11tp") +theme_override_styles/tabbar_background = SubResource("StyleBoxTexture_mn8w2") +theme_override_styles/panel = SubResource("StyleBoxTexture_21lc8") +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 = 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 +metadata/_edit_lock_ = true + +[node name="scroll1" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 969.0 +offset_top = 27.0 +offset_right = 1332.0 +offset_bottom = 308.0 + +[node name="table1" type="GridContainer" parent="TabContainer/PRD/scroll1"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="scroll2" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 969.0 +offset_top = 331.0 +offset_right = 1332.0 +offset_bottom = 619.0 + +[node name="table2" type="GridContainer" parent="TabContainer/PRD/scroll2"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="LABEL" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 17.0 +offset_right = 764.0 +offset_bottom = 40.0 +text = "ЛИТЕРА 2! ПРД-Н!" + +[node name="Zapret" type="Button" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 45.0 +offset_right = 600.0 +offset_bottom = 79.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn") +toggle_mode = true +text = " Запрет СИ2" +metadata/litera = 48 + +[node name="LABEL2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 329.0 +offset_right = 764.0 +offset_bottom = 352.0 +text = "ЛИТЕРА 3! ПРД-Н!" + +[node name="Zapret2" type="Button" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 357.0 +offset_right = 600.0 +offset_bottom = 391.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn") +toggle_mode = true +text = " Запрет СИ3" +metadata/litera = 49 + +[node name="Label_luch" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 100.0 +offset_right = 764.0 +offset_bottom = 123.0 +text = "Номер и направление луча" + +[node name="LUCH" type="OptionButton" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 132.0 +offset_right = 600.0 +offset_bottom = 163.0 +item_count = 2 +popup/item_0/text = "Что-то" +popup/item_1/text = "Что-то" +popup/item_1/id = 1 + +[node name="Modul" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 402.0 +offset_right = 626.0 +offset_bottom = 425.0 +text = "Модуляция" + +[node name="DKM2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 183.0 +offset_right = 624.0 +offset_bottom = 206.0 +text = "ДКМ ДОУ 2" + +[node name="DKM3" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 431.0 +offset_right = 624.0 +offset_bottom = 454.0 +text = "ДКМ ДОУ 3" + +[node name="FGOZ2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 206.0 +offset_right = 655.0 +offset_bottom = 229.0 +text = "ФГОЗ 2" + +[node name="FGOZ3" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 482.0 +offset_top = 454.0 +offset_right = 655.0 +offset_bottom = 477.0 +text = "ФГОЗ 3" + +[node name="PSK" type="Sprite2D" parent="TabContainer/PRD"] +material = ExtResource("3_3syd3") +position = Vector2(1276.25, 29) +scale = Vector2(0.247968, 0.234167) +texture = SubResource("PlaceholderTexture2D_723du") +offset = Vector2(800, 600) +script = SubResource("GDScript_0sobq") + +[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/PSK"] +modulate = Color(0, 0, 0, 1) +self_modulate = Color(0, 0, 0, 1) +show_behind_parent = true +material = SubResource("ShaderMaterial_o7txs") +offset_left = 554.954 +offset_top = -30.0 +offset_right = 1290.95 +offset_bottom = 1134.0 +texture = ExtResource("5_i3nvb") +expand_mode = 1 +metadata/_edit_lock_ = true + +[node name="ray" type="Sprite2D" parent="TabContainer/PRD/PSK"] +material = SubResource("ShaderMaterial_dgiai") +position = Vector2(549.221, 560.705) +scale = Vector2(21.8765, 21.6782) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="PSK2" type="Sprite2D" parent="TabContainer/PRD"] +material = ExtResource("3_3syd3") +position = Vector2(1276, 326) +scale = Vector2(0.247968, 0.234167) +texture = SubResource("PlaceholderTexture2D_723du") +offset = Vector2(800, 600) +script = SubResource("GDScript_0sobq") + +[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/PSK2"] +modulate = Color(0, 0, 0, 1) +self_modulate = Color(0, 0, 0, 1) +show_behind_parent = true +material = SubResource("ShaderMaterial_o7txs") +offset_left = 554.954 +offset_top = -30.0 +offset_right = 1290.95 +offset_bottom = 1134.0 +texture = ExtResource("5_i3nvb") +expand_mode = 1 +metadata/_edit_lock_ = true + +[node name="ray" type="Sprite2D" parent="TabContainer/PRD/PSK2"] +material = SubResource("ShaderMaterial_dgiai") +position = Vector2(549.221, 560.705) +scale = Vector2(21.8765, 21.6782) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="select_dev" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 12.0 +offset_top = 64.0 +offset_right = 375.0 +offset_bottom = 96.0 + +[node name="select_dev" type="GridContainer" parent="TabContainer/PRD/select_dev"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="ControlPanel" type="Panel" parent="TabContainer"] +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") +metadata/_tab_index = 1 +metadata/_edit_lock_ = true + +[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 636.0 +offset_top = 21.0 +offset_right = 1256.0 +offset_bottom = 52.0 +theme_override_font_sizes/font_size = 22 +text = "Контроль исправности прибора ПРД-Н" +horizontal_alignment = 1 +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 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="ref_A26" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")] +offset_left = 5.0 +offset_top = 34.0 +offset_right = 55.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "ЯУ-07" +metadata/_edit_lock_ = true + +[node name="ref_A23" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")] +offset_left = 53.0 +offset_top = 34.0 +offset_right = 103.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "ЭМС-Г" +metadata/_edit_lock_ = true + +[node name="ref_A24" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")] +offset_left = 104.0 +offset_top = 34.0 +offset_right = 154.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "УГ" +metadata/_edit_lock_ = true + +[node name="ref_A25" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")] +offset_left = 154.0 +offset_top = 33.0 +offset_right = 204.0 +offset_bottom = 183.0 +textures = Array[Texture]([]) +fname = "УКП-1" +metadata/_edit_lock_ = true + +[node name="ref_A27" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")] +offset_left = 205.0 +offset_top = 33.0 +offset_right = 255.0 +offset_bottom = 183.0 +textures = Array[Texture]([]) +fname = "УКП-2" +metadata/_edit_lock_ = true + +[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/sockets"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 291.0 +offset_bottom = 33.0 +text = "Ячейки" +horizontal_alignment = 1 +vertical_alignment = 1 +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 +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 +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/kasseta_p_1"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 409.0 +offset_bottom = 33.0 +text = "Кассета П-1" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_lock_ = true + +[node name="ref_A23" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 9.0 +offset_top = 34.0 +offset_right = 59.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП МАА 1" +metadata/_edit_lock_ = true + +[node name="ref_A24" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 59.0 +offset_top = 34.0 +offset_right = 109.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП МАА 2" +metadata/_edit_lock_ = true + +[node name="ref_A25" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 109.0 +offset_top = 34.0 +offset_right = 159.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50 1" +metadata/_edit_lock_ = true + +[node name="ref_A26" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 159.0 +offset_top = 34.0 +offset_right = 209.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50 2" +metadata/_edit_lock_ = true + +[node name="ref_A27" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 209.0 +offset_top = 34.0 +offset_right = 259.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП12-50 1" +metadata/_edit_lock_ = true + +[node name="ref_A28" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +offset_left = 259.0 +offset_top = 34.0 +offset_right = 309.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50 3" +metadata/_edit_lock_ = true + +[node name="ref_A29" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")] +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 = "ИП12-50 2" +metadata/_edit_lock_ = true + +[node name="ref_A30" parent="TabContainer/ControlPanel/kasseta_p_1" 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) +fname = "ИП5-25" +rname = "A30" +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 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +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_top = 8.0 +offset_right = 302.0 +offset_bottom = 120.0 +text = "Панель +предохранителей" +horizontal_alignment = 1 +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 +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 = 291.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 = 5.0 +offset_top = 38.0 +offset_right = 55.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "СЗИ2 от УФ" +metadata/_edit_lock_ = true + +[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 55.0 +offset_top = 38.0 +offset_right = 105.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "СИ2 от ФС" +metadata/_edit_lock_ = true + +[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")] +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 + +[node name="ref_A30" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 205.0 +offset_top = 38.0 +offset_right = 255.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +fname = "ФГОЗ" +metadata/_edit_lock_ = true + +[node name="EMS_G" type="Panel" parent="TabContainer"] +visible = false +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_ooo4i") +script = ExtResource("9_g1wia") +metadata/_tab_index = 2 +metadata/_edit_lock_ = true + +[node name="table1" type="GridContainer" parent="TabContainer/EMS_G"] +layout_mode = 2 +offset_left = 27.0 +offset_top = 148.0 +offset_right = 27.0 +offset_bottom = 148.0 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"] +layout_mode = 0 +offset_left = 27.0 +offset_top = 148.0 +offset_right = 1596.0 +offset_bottom = 717.0 +color = Color(0, 0, 0, 0.596078) + +[node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"] +material = SubResource("ShaderMaterial_slcfo") +position = Vector2(786, 284.5) +scale = Vector2(24.4688, 8.89063) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="Load_text" type="Label" parent="TabContainer/EMS_G/load_boadr"] +layout_mode = 0 +offset_left = 693.0 +offset_top = 277.0 +offset_right = 849.0 +offset_bottom = 316.0 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_colors/font_shadow_color = Color(0.427493, 0.427493, 0.427493, 1) +theme_override_font_sizes/font_size = 28 +text = "Загрузка ..." + +[connection signal="pressed" from="Background/side_panel/select_prd" to="." method="_on_prd_select"] +[connection signal="pressed" from="Background/side_panel/select_control" to="." method="_on_control_button"] +[connection signal="pressed" from="Background/side_panel/select_ems_g" to="." method="_on_emsg_select"] +[connection signal="pressed" from="read_isa" to="." method="_on_read_isa_pressed"] diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 5142942..1fe4533 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -242,11 +242,10 @@ 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 = 1 +current_tab = 0 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 @@ -446,6 +445,7 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="ControlPanel" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") metadata/_tab_index = 1 diff --git a/ems_g.gd b/ems_g.gd index 8de6a18..5f4c180 100644 --- a/ems_g.gd +++ b/ems_g.gd @@ -7,13 +7,13 @@ var button_link_meta: Dictionary = {} func _on_read_ems_g(): $load_boadr.visible = true Constants.EMS_G_PORT_DATA_HOLDER.clear() - for i in 16: - Network.send_array.append(['wr', {Constants.EMS_G_BASE_ADDR+2: 1+i}]) - Network.send_array.append(['rd', [Constants.EMS_G_BASE_ADDR+0xA]]) + for i_input in 16: + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+2, 1+i_input) + Network.read_port_isa([Constants.EMS_G_BASE_ADDR+0xA]) - for i in range(46, 62): - Network.send_array.append(['wr', {Constants.EMS_G_BASE_ADDR+2: 1+i}]) - Network.send_array.append(['rd', [Constants.EMS_G_BASE_ADDR+4, Constants.EMS_G_BASE_ADDR+8]]) + for i_output in range(46, 62): + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+2, 1+i_output) + Network.read_port_isa([Constants.EMS_G_BASE_ADDR+4, Constants.EMS_G_BASE_ADDR+8]) func _on_sync(): @@ -96,7 +96,7 @@ 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() - + for i_in in 16: var socket_status = node_select1.get_node2(1, i_in+shift+1).get_child(0, false) @@ -107,6 +107,10 @@ func _on_data_received(data_from_yau_07): set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(2).get_child(3), Constants.Frame.CONSTANT) set_frame(socket_status, Constants.Frame.CONSTANT) elif (in_imp & (1 << i_in) != 0): + if i_in == 1: + set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(1).get_child(3), Constants.Frame.VARIABLE) + if i_in == 9: + set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(2).get_child(3), Constants.Frame.VARIABLE) set_frame(socket_status, Constants.Frame.VARIABLE) else: if i_in == 1: @@ -126,6 +130,12 @@ func _on_data_received(data_from_yau_07): set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(5).get_child(3), Constants.Frame.CONSTANT) set_frame(socket_status, Constants.Frame.CONSTANT) elif (out_imp & (1 << i_out) != 0): + if i_out == 1: + set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(3).get_child(3), Constants.Frame.VARIABLE) + if i_out == 4: + set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(4).get_child(3), Constants.Frame.VARIABLE) + if i_out == 9: + set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(5).get_child(3), Constants.Frame.VARIABLE) set_frame(socket_status, Constants.Frame.VARIABLE) else: if i_out == 1: @@ -173,29 +183,24 @@ func on_mode_link(mode, list): ## Формирование команды для выбора устройства var meta = list.get_meta('device') var address_port_wr = Constants.EMS_G_BASE_ADDR+2 - var ports_wr: Dictionary = {address_port_wr : meta} - Network.send_array.append(['wr', ports_wr]) # Отправка команды + Network.write_port_isa(address_port_wr, meta) # Отправка команды ## Формирование команды для отправкы команды на устройство - ports_wr = {} address_port_wr = Constants.EMS_G_BASE_ADDR+8 - ports_wr[address_port_wr] = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000 - Network.send_array.append(['wr', ports_wr]) + 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) 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 - var ports_wr: Dictionary = {address_port_wr : meta[1]} - Network.send_array.append(['wr', ports_wr]) # Отправка команды + Network.write_port_isa(address_port_wr, meta[1]) # Отправка команды ## Формирование команды для отправкы команды на устройство if toggled_on: button_link_meta[meta[1]] += 1 << meta[0]-1 else: button_link_meta[meta[1]] -= 1 << meta[0]-1 - - ports_wr = {} + address_port_wr = Constants.EMS_G_BASE_ADDR+4 - ports_wr[address_port_wr] = button_link_meta[meta[1]] - Network.send_array.append(['wr', ports_wr]) + Network.write_port_isa(address_port_wr, button_link_meta[meta[1]]) diff --git a/scripts/PRD.gd b/scripts/PRD.gd index bd9e9dd..c0e1dc3 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -2,7 +2,6 @@ extends Node2D signal read_ems_g_start() signal read_ems_g_finish() -#var unit = Yau07.YaU07.new('ЯУ07') var flag_mode = Constants.ADDRESSES[0][3] var broadcast_packet: PackedByteArray var node_select1: Node @@ -56,9 +55,8 @@ func _on_yau_status(yau_status): else: $TabContainer/ControlPanel/sockets/ref_A26/light_ind.button_pressed = false $TabContainer/ControlPanel/sockets/ref_A26/light_ind.disabled = true - for dev in (Constants.CONTROL_DEVICE.size() - 1): - var node_board = $TabContainer/ControlPanel/control_tbl.get_node2(0, dev+1) - node_board.modulate = Color.RED + #for dev in (Constants.CONTROL_DEVICE.size() - 1): + flag_yau_control = false @@ -201,13 +199,10 @@ func fill_item(node, i_column: int, i_row: int, arr: Dictionary, select: int = 0 func _on_zapret(toggled_on: bool, meta) -> void: - var ports_wr: Dictionary = {0x122 : meta.get_meta('litera')} ## СИ2, СИ4, СИ6 = 0x30, СИ3, СИ5, СИ7 = 0x31, СИ1 = 0x2F - Network.send_array.append(ports_wr) - - ports_wr = {} - ports_wr[0x128] = 0x4000 if toggled_on else 0x0 - Network.send_array.append(ports_wr) + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+2, meta.get_meta('litera')) + var zapret_mode = 0x4000 if toggled_on else 0x0 + Network.write_port_isa(Constants.EMS_G_BASE_ADDR+8, zapret_mode) func _on_read_isa_pressed() -> void: - Network.send_array.append(['rd', [0x122, 0x124, 0x128]]) + Network.read_port_isa([0x122, 0x124, 0x128]) diff --git a/scripts/constants.gd b/scripts/constants.gd index 1e3de8f..253692f 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -14,7 +14,6 @@ const TableList = preload("res://table/node_list.tscn") const Switch = preload("res://table/switch.tscn") const SocketStatus = preload("res://table/socket_status.tscn") const SELECT_DEVICE: Array = [[TableNode, TableList]] -const CONTROL_DEVICE: Array = ['ЯЧЕЙКА ЯУ-07Б', 'ФС', 'ЯЧЕЙКА ЭМС-Г', 'ЯЧЕЙКА УГ', 'ЯЧЕЙКА УКП №1', 'ЯЧЕЙКА УКП №2', 'ИП МАА №1', 'ИП МАА №2', 'ИП9-50 №1', 'ИП9-50 №2', 'ИП12-50 №1', '-', '-','ИП5-25', 'Х3:2(СЗИ2 от УФ)', 'Х3:19(СИ2 от ФС)', 'Х3:11(СИ2 в УФ)', 'Х3:14(Модуляция)', 'Х3:27(ФГОЗ)'] const ROWS_REGS_DATA: Array = [ [TableNode, TableNode], [TableNode, TableNode], @@ -48,12 +47,6 @@ const ADDRESSES: Array = [ ['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K], ['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K], ['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K]] -const EMS_G_CONTROL_PANEL: Array = [ - ['Нет Х3:2(СЗИ2 от УФ)', 'Есть Х3:2(СЗИ2 от УФ)'], - ['Нет Х3:19(СИ2 от ФС)', 'Есть Х3:19(СИ2 от ФС)'], - ['Нет Х3:11(СИ2 в УФ)', 'Есть Х3:11(СИ2 в УФ)'], - ['Нет Х3:14(Модуляция)', 'Есть Х3:14(Модуляция)'], - ['Нет Х3:27(ФГОЗ)', 'Есть Х3:27(ФГОЗ)']] const INPUT_EMS_G: Array = [ '01 :34', '02 :35', diff --git a/scripts/network.gd b/scripts/network.gd index 40e2bb0..ddf1059 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -3,8 +3,8 @@ extends Node var unit = Yau07.YaU07.new('ЯУ07') var soc_unicast: Socket var soc_brodcast: Socket -var address: String = Constants.ADDRESSES[0][1] -var port: int = Constants.ADDRESSES[0][2] +var ip_address: String = Constants.ADDRESSES[0][1] +var ip_port: int = Constants.ADDRESSES[0][2] var timeout: float = Yau07.ONLINE_TIMEOUT var last_update_time: float = 0.0 var broadcast_packet: PackedByteArray @@ -30,7 +30,7 @@ func poll_receive(sock: Socket) -> bool: ## Приёмник var addr_receive = sock.get_packet_ip() var port_receive = sock.get_packet_port() - if (address == addr_receive) and (port == port_receive): + if (ip_address == addr_receive) and (ip_port == port_receive): last_update_time = 0.0 unit.parse(broadcast_packet) var data_from_yau_07 = unit.status @@ -41,18 +41,17 @@ func poll_receive(sock: Socket) -> bool: ## Приёмник return false - func _ready() -> void: # Привязка для принятия широковещательного канала soc_brodcast = Socket.new() var rc = soc_brodcast.bind(Constants.BROADCAST_PORT, '*') if rc != OK: - print('Ошибка: Неудачная привязка широковещательного адреса') + print_debug('Ошибка: Неудачная привязка широковещательного адреса') soc_unicast = Socket.new() rc = soc_unicast.bind(Constants.UNICAST_PORT, Constants.UNICAST_ADDRESS) if rc != OK: - print('Ошибка: неудачная привязка адреса: ', address) + print_debug('Ошибка: неудачная привязка адреса: ', ip_address) unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) @@ -64,32 +63,45 @@ func _process(delta: float) -> void: poll_receive(soc_unicast) state_machine() match unit.process(delta): - Error.OK: soc_unicast.send_to(address, port, unit.tx_data.slice(0, unit.tx_len)) - Error.FAILED: print('Ошибка отправки данных') + Error.OK: soc_unicast.send_to(ip_address, ip_port, unit.tx_data.slice(0, unit.tx_len)) + Error.FAILED: print_debug('Ошибка отправки данных') func state_machine(): var fl_done = (unit.cmd_state == unit.CmdState.DONE) ## Режим ожидания - if state == Constants.STATE.WAIT and fl_done: - if send_array.size(): - state = Constants.STATE.READ_ISA if send_array[0][0] == 'rd' else Constants.STATE.WRITE_ISA - ## Режим чтения из ИСА - elif state == Constants.STATE.READ_ISA and fl_done: - var ports_read = send_array.pop_front() - unit.send_isa(unit.CmdCode.READ_ISA, ports_read[1]) - state = Constants.STATE.DONE - ## Режим записи в ИСА - elif state == Constants.STATE.WRITE_ISA and fl_done: - var ports_write = send_array.pop_front() - var key = ports_write[1].keys() - unit.send_isa(unit.CmdCode.WRITE_ISA, [key[0], ports_write[1][key[0]]]) - state = Constants.STATE.WAIT - elif state == Constants.STATE.DONE and fl_done: - emit_signal('yau_read_isa', unit.isa_ports) - state = Constants.STATE.WAIT + match state: + Constants.STATE.WAIT: + if fl_done and send_array.size(): + state = Constants.STATE.READ_ISA if send_array[0][0] == 'rd' else Constants.STATE.WRITE_ISA + ## Режим чтения из ИСА + Constants.STATE.READ_ISA: + if fl_done: + var ports_read = send_array.pop_front() + unit.send_isa(unit.CmdCode.READ_ISA, ports_read[1]) + state = Constants.STATE.DONE + ## Режим записи в ИСА + Constants.STATE.WRITE_ISA: + if fl_done: + var ports_write = send_array.pop_front() + var key = ports_write[1].keys() + unit.send_isa(unit.CmdCode.WRITE_ISA, [key[0], ports_write[1][key[0]]]) + state = Constants.STATE.WAIT + Constants.STATE.DONE: + if fl_done: + emit_signal('yau_read_isa', unit.isa_ports) + 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]) + + func on_line_changed(_unit) -> void: emit_signal('yau_status_line', unit.online)