diff --git a/PRD57EF.tmp b/PRD57EF.tmp deleted file mode 100644 index 1bcb40f..0000000 --- a/PRD57EF.tmp +++ /dev/null @@ -1,1003 +0,0 @@ -[gd_scene load_steps=50 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://co8dxcd8eckjs" path="res://Web.png" id="5_i3nvb"] -[ext_resource type="Shader" path="res://ray_2.gdshader" id="8_12mng"] -[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"] -[ext_resource type="Script" path="res://scripts/control_panel.gd" id="9_akagi"] -[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"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"] -bg_color = Color(0.223529, 0.168627, 0.223529, 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.143, 0.103, 0.143, 0.799) - -[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.141176, 0.101961, 0.141176, 0.8) -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.141176, 0.101961, 0.141176, 0.8) - -[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="StyleBoxTexture" id="StyleBoxTexture_1as41"] - -[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.588235, 0.466667, 0, 1) -shader_parameter/turn = 0.785 -shader_parameter/inner_radius = 0.32 - -[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="ShaderMaterial" id="ShaderMaterial_2pxu2"] -shader = ExtResource("8_12mng") -shader_parameter/color_signal = Color(0.588242, 0.466356, 0, 1) -shader_parameter/turn = 0.785 -shader_parameter/inner_radius = 0.32 - -[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 - -[sub_resource type="Theme" id="Theme_yblys"] -CheckBox/font_sizes/font_size = 14 - -[node name="Node2D" type="Node2D"] -script = ExtResource("1_v273n") - -[node name="Background" type="ColorRect" parent="."] -offset_right = 3025.0 -offset_bottom = 1060.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="select_fs" type="Button" parent="Background/side_panel"] -layout_mode = 0 -offset_top = 241.0 -offset_right = 216.0 -offset_bottom = 277.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="save_config" type="Button" parent="Background/side_panel"] -layout_mode = 0 -offset_top = 832.0 -offset_right = 216.0 -offset_bottom = 868.0 -focus_mode = 0 -mouse_default_cursor_shape = 2 -theme_override_font_sizes/font_size = 14 -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 -focus_mode = 0 -mouse_default_cursor_shape = 2 -theme_override_font_sizes/font_size = 14 -theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") -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 = 409.0 -offset_bottom = 48.0 -autowrap_mode = 3 -metadata/_edit_lock_ = true - -[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" -metadata/_edit_lock_ = true - -[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 = 0 -tab_focus_mode = 0 -metadata/_edit_lock_ = true - -[node name="PRD" type="Panel" parent="TabContainer"] -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") -metadata/_tab_index = 0 -metadata/_edit_lock_ = true - -[node name="body_grid" type="GridContainer" parent="TabContainer/PRD"] -layout_mode = 0 -offset_left = 376.0 -offset_top = -4.0 -offset_right = 1648.0 -offset_bottom = 718.0 - -[node name="litera_2_4_6" type="GridContainer" parent="TabContainer/PRD/body_grid"] -clip_contents = true -custom_minimum_size = Vector2(700, 300) -layout_mode = 2 -size_flags_horizontal = 3 -columns = 5 - -[node name="fs_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -custom_minimum_size = Vector2(350, 0) -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="space" type="Panel" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -custom_minimum_size = Vector2(50, 0) -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") - -[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="space2" type="Panel" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -custom_minimum_size = Vector2(50, 0) -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") - -[node name="table_ukp_1" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="PSK" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -modulate = Color(1, 1, 0.941176, 0.733333) -material = ExtResource("3_3syd3") -position = Vector2(955, 5) -scale = Vector2(0.23, 0.217) -texture = SubResource("PlaceholderTexture2D_723du") -offset = Vector2(800, 600) -script = SubResource("GDScript_0sobq") -metadata/_edit_lock_ = true - -[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_2_4_6/PSK"] -modulate = Color(1, 1, 0.941176, 0.784314) -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_1" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6/PSK"] -material = SubResource("ShaderMaterial_dgiai") -position = Vector2(549.221, 543.623) -scale = Vector2(21.8765, 21.6782) -texture = SubResource("GradientTexture2D_0pk2o") -metadata/_edit_lock_ = true - -[node name="litera_3_5_7" type="GridContainer" parent="TabContainer/PRD/body_grid"] -custom_minimum_size = Vector2(500, 350) -layout_mode = 2 -columns = 5 - -[node name="fs_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -custom_minimum_size = Vector2(350, 0) -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="space" type="Panel" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -custom_minimum_size = Vector2(50, 0) -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") - -[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="space2" type="Panel" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -custom_minimum_size = Vector2(50, 0) -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") - -[node name="table_ukp_2" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="PSK2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -modulate = Color(1, 1, 0.941176, 0.733333) -material = ExtResource("3_3syd3") -position = Vector2(955, -6) -scale = Vector2(0.23, 0.217) -texture = SubResource("PlaceholderTexture2D_723du") -offset = Vector2(800, 600) -script = SubResource("GDScript_0sobq") -metadata/_edit_lock_ = true - -[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_3_5_7/PSK2"] -modulate = Color(1, 1, 0.941176, 0.784314) -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_2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7/PSK2"] -material = SubResource("ShaderMaterial_2pxu2") -position = Vector2(549.221, 539.353) -scale = Vector2(21.8765, 21.6782) -texture = SubResource("GradientTexture2D_0pk2o") -metadata/_edit_lock_ = true - -[node name="select_dev" type="GridContainer" parent="TabContainer/PRD"] -layout_mode = 2 -offset_left = 16.0 -offset_top = 11.0 -offset_right = 16.0 -offset_bottom = 11.0 -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"] -layout_mode = 0 -offset_left = 4.0 -offset_top = 21.0 -offset_right = 624.0 -offset_bottom = 52.0 -theme_override_font_sizes/font_size = 22 -text = "Контроль исправности прибора ПРД-Н" -horizontal_alignment = 1 -vertical_alignment = 1 - -[node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] -layout_mode = 0 -offset_left = 199.0 -offset_top = 103.0 -offset_right = 516.0 -offset_bottom = 293.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")] -offset_left = 9.0 -offset_top = 34.0 -offset_right = 59.0 -offset_bottom = 184.0 -textures = Array[Texture]([]) -fname = "ИП-25" -rname = "A24" -metadata/_edit_lock_ = true - -[node name="ref_A30" 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="ref_A26" 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="ref_A27" 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="ref_A28" 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="ref_A29" 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="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_y5"] -self_modulate = Color(1, 1, 1, 0.62) -layout_mode = 0 -offset_left = 7.0 -offset_top = 8.0 -offset_right = 309.0 -offset_bottom = 33.0 -text = "Кассета У5" -horizontal_alignment = 1 -vertical_alignment = 1 - -[node name="soc_fs-nkvd" 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 -script = null - -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_fs-nkvd"] -self_modulate = Color(1, 1, 1, 0.62) -layout_mode = 0 -offset_left = 7.0 -offset_top = 8.0 -offset_right = 299.0 -offset_bottom = 33.0 -text = "Кассета ФС-НД" -horizontal_alignment = 1 -vertical_alignment = 1 -metadata/_edit_lock_ = true - -[node name="ref_A3" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] -offset_left = 109.0 -offset_top = 68.0 -offset_right = 159.0 -offset_bottom = 218.0 -textures = Array[Texture]([]) -fname = "ФС-2" -rname = "A3" -metadata/_edit_lock_ = true - -[node name="ref_A1" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] -offset_left = 159.0 -offset_top = 68.0 -offset_right = 209.0 -offset_bottom = 218.0 -textures = Array[Texture]([]) -fname = "Модуль" -rname = "A1" -metadata/_edit_lock_ = true - -[node name="ref_A2" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] -offset_left = 209.0 -offset_top = 68.0 -offset_right = 259.0 -offset_bottom = 217.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 149) -fname = "Модуль" -rname = "A2" -metadata/_edit_lock_ = true - -[node name="ref_A4" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] -offset_left = 259.0 -offset_top = 68.0 -offset_right = 309.0 -offset_bottom = 218.0 -textures = Array[Texture]([]) -fname = "ФС-3" -rname = "A4" -metadata/_edit_lock_ = true - -[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 -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"] -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/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 40.0 -offset_top = -206.0 -offset_right = 90.0 -offset_bottom = -32.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) - -[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 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) - -[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 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[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 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[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 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -visible = false -offset_left = 259.0 -offset_top = 34.0 -offset_right = 309.0 -offset_bottom = 208.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[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 - -[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) -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="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 = 35.0 -offset_top = 60.0 -offset_right = 35.0 -offset_bottom = 60.0 -script = ExtResource("2_vmbyo") - -[node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"] -layout_mode = 0 -offset_left = 35.0 -offset_top = 58.0 -offset_right = 1604.0 -offset_bottom = 782.0 -color = Color(0, 0, 0, 0.596078) -metadata/_edit_lock_ = true - -[node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"] -material = SubResource("ShaderMaterial_slcfo") -position = Vector2(785.001, 361.5) -scale = Vector2(24.5313, 11.2656) -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 = 341.0 -offset_right = 849.0 -offset_bottom = 380.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 = "Загрузка ..." - -[node name="Modul_fs" type="Panel" parent="TabContainer"] -visible = false -layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxTexture_ooo4i") -script = ExtResource("15_b4pr1") -metadata/_tab_index = 3 -metadata/_edit_lock_ = true - -[node name="set_space" type="GridContainer" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 211.0 -offset_top = 378.0 -offset_right = 854.0 -offset_bottom = 418.0 -columns = 2 - -[node name="set_ferq" type="Button" parent="TabContainer/Modul_fs/set_space"] -custom_minimum_size = Vector2(100, 0) -layout_mode = 2 -text = " Set н/ч" - -[node name="write_to_set_freq" type="LineEdit" parent="TabContainer/Modul_fs/set_space"] -custom_minimum_size = Vector2(300, 0) -layout_mode = 2 -text = "500" -placeholder_text = "Частота" - -[node name="measurement" type="Label" parent="TabContainer/Modul_fs/set_space/write_to_set_freq"] -layout_mode = 0 -offset_left = 313.0 -offset_top = 2.0 -offset_right = 365.0 -offset_bottom = 30.0 -text = "МГц" - -[node name="set_att2" type="Button" parent="TabContainer/Modul_fs/set_space"] -custom_minimum_size = Vector2(100, 0) -layout_mode = 2 -text = " Set att" - -[node name="write_to_set_att" type="LineEdit" parent="TabContainer/Modul_fs/set_space"] -custom_minimum_size = Vector2(300, 0) -layout_mode = 2 -text = "38.75" -placeholder_text = "-38.75 to 0" - -[node name="measurement" type="Label" parent="TabContainer/Modul_fs/set_space/write_to_set_att"] -layout_mode = 0 -offset_left = 313.0 -offset_top = 2.0 -offset_right = 351.0 -offset_bottom = 30.0 -text = "dB" - -[node name="manage_panel" type="GridContainer" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 200.0 -offset_top = 186.0 -offset_right = 805.0 -offset_bottom = 308.0 -columns = 5 -metadata/_edit_lock_ = true - -[node name="con" type="Button" parent="TabContainer/Modul_fs/manage_panel"] -layout_mode = 2 -text = " Подключение " - -[node name="ip_connect" type="Label" parent="TabContainer/Modul_fs/manage_panel/con"] -layout_mode = 0 -offset_top = 32.0 -offset_right = 118.0 -offset_bottom = 55.0 - -[node name="get_freq" type="Button" parent="TabContainer/Modul_fs/manage_panel"] -layout_mode = 2 -text = " Получить н/ч " - -[node name="freq_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_freq"] -layout_mode = 0 -offset_top = 32.0 -offset_right = 106.0 -offset_bottom = 55.0 - -[node name="get_att" type="Button" parent="TabContainer/Modul_fs/manage_panel"] -layout_mode = 2 -text = " Получить att " - -[node name="att_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_att"] -layout_mode = 0 -offset_top = 32.0 -offset_right = 105.0 -offset_bottom = 55.0 - -[node name="get_gen_status" type="Button" parent="TabContainer/Modul_fs/manage_panel"] -layout_mode = 2 -toggle_mode = true -text = "Переключатель генератора " - -[node name="status_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_gen_status"] -layout_mode = 0 -offset_top = 33.0 -offset_right = 84.0 -offset_bottom = 56.0 - -[node name="read" type="LineEdit" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 216.0 -offset_top = 818.0 -offset_right = 971.0 -offset_bottom = 849.0 -metadata/_edit_lock_ = true - -[node name="fs_connect" type="Label" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 206.0 -offset_top = 88.0 -offset_right = 377.0 -offset_bottom = 111.0 -text = "Связь с модулем ФС" - -[node name="temp_1" type="Label" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 1015.0 -offset_top = 119.0 -offset_right = 1102.0 -offset_bottom = 152.0 -text = "Темп" - -[node name="temp_2" type="Label" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 1016.0 -offset_top = 156.0 -offset_right = 1103.0 -offset_bottom = 189.0 -text = "Темп" - -[node name="temp_3" type="Label" parent="TabContainer/Modul_fs"] -layout_mode = 0 -offset_left = 1015.0 -offset_top = 193.0 -offset_right = 1102.0 -offset_bottom = 226.0 -text = "Темп" - -[node name="save_other" type="CheckBox" parent="."] -offset_left = 2.0 -offset_top = 799.0 -offset_right = 215.0 -offset_bottom = 827.0 -theme = SubResource("Theme_yblys") -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="Background/side_panel/select_fs" to="." method="_on_mfs_select"] -[connection signal="pressed" from="Background/side_panel/save_config" to="." method="_on_save_config"] -[connection signal="pressed" from="Background/side_panel/load_config" to="." method="_on_load_config"] -[connection signal="pressed" from="read_isa" to="." method="_on_read_isa_pressed"] -[connection signal="pressed" from="TabContainer/Modul_fs/set_space/set_ferq" to="TabContainer/Modul_fs" method="_on_set_ferq"] -[connection signal="pressed" from="TabContainer/Modul_fs/set_space/set_att2" to="TabContainer/Modul_fs" method="_on_set_att"] -[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/con" to="TabContainer/Modul_fs" method="_on_start"] -[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/get_freq" to="TabContainer/Modul_fs" method="_on_send_pressed"] -[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/get_att" to="TabContainer/Modul_fs" method="_on_get_att"] -[connection signal="toggled" from="TabContainer/Modul_fs/manage_panel/get_gen_status" to="TabContainer/Modul_fs" method="_on_get_status"] diff --git a/PRD95A4.tmp b/PRD95A4.tmp deleted file mode 100644 index ee610de..0000000 --- a/PRD95A4.tmp +++ /dev/null @@ -1,42 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://cvor2jm4xk3ha"] - -[ext_resource type="Script" path="res://PRD.gd" id="1_v273n"] -[ext_resource type="Script" path="res://table/table.gd" id="2_vmbyo"] - -[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_5yjx2"] - -[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_kofy6"] - -[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_hdj8q"] - -[node name="Node2D" type="Node2D"] -script = ExtResource("1_v273n") - -[node name="Background" type="ColorRect" parent="."] -offset_right = 1321.0 -offset_bottom = 790.0 -color = Color(0.356863, 0.278431, 0.356863, 1) -metadata/_edit_lock_ = true - -[node name="scroll1" type="ScrollContainer" parent="."] -offset_left = 586.0 -offset_top = 45.0 -offset_right = 949.0 -offset_bottom = 629.0 - -[node name="table1" type="GridContainer" parent="scroll1"] -layout_mode = 2 -script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true - -[node name="TextEdit" type="TextEdit" parent="."] -offset_left = 1028.0 -offset_top = 602.0 -offset_right = 1140.0 -offset_bottom = 640.0 -theme_override_colors/font_readonly_color = Color(1, 1, 1, 1) -theme_override_styles/normal = SubResource("StyleBoxTexture_5yjx2") -theme_override_styles/focus = SubResource("StyleBoxTexture_kofy6") -theme_override_styles/read_only = SubResource("StyleBoxTexture_hdj8q") -text = "Test PRD" -editable = false diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 3860e19..403553a 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -1,20 +1,22 @@ -[gd_scene load_steps=49 format=3 uid="uid://cvor2jm4xk3ha"] +[gd_scene load_steps=55 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="Shader" path="res://Shaders/gradient.gdshader" id="2_vn1it"] [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://co8dxcd8eckjs" path="res://Web.png" id="5_i3nvb"] -[ext_resource type="Shader" path="res://ray_2.gdshader" id="8_12mng"] -[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"] +[ext_resource type="Texture2D" uid="uid://co8dxcd8eckjs" path="res://pictures/Web.png" id="5_i3nvb"] +[ext_resource type="Shader" path="res://Shaders/ray_2.gdshader" id="8_12mng"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="9_0r2qk"] [ext_resource type="Script" path="res://scripts/control_panel.gd" id="9_akagi"] [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="Shader" path="res://Shaders/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://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"] [ext_resource type="Script" path="res://scripts/modul_fs.gd" id="15_b4pr1"] +[ext_resource type="Shader" path="res://Shaders/loadead.gdshader" id="16_4osrw"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"] bg_color = Color(0.223529, 0.168627, 0.223529, 1) @@ -72,6 +74,11 @@ TabContainer/styles/tab_focus = SubResource("StyleBoxTexture_d322q") TabContainer/styles/tab_selected = SubResource("StyleBoxTexture_8j02b") TabContainer/styles/tabbar_background = SubResource("StyleBoxTexture_ls6vm") +[sub_resource type="ShaderMaterial" id="ShaderMaterial_3q35w"] +shader = ExtResource("2_vn1it") +shader_parameter/outerRadius = 8.258 +shader_parameter/MainAlpha = 0.653 + [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pxarn"] bg_color = Color(0.356863, 0.278431, 0.356863, 1) @@ -129,6 +136,35 @@ shader_parameter/inner_radius = 0.32 [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ooo4i"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cm644"] +shader = ExtResource("16_4osrw") +shader_parameter/dot_scale = 0.5 +shader_parameter/ring_radius = 0.2 +shader_parameter/num_points = 8 +shader_parameter/gap_ratio = 0.102 +shader_parameter/all_dots_same_size = false +shader_parameter/dot_color_start = Color(0.893646, 0.893797, 0.859099, 1) +shader_parameter/dot_color_end = Color(0.888169, 0.740534, 1, 1) +shader_parameter/enable_shadow = true +shader_parameter/shadow_color = Color(0, 0, 0, 0.35) +shader_parameter/shadow_offset = Vector2(0.03, 0.01) +shader_parameter/rotation_speed = 4.995 +shader_parameter/icon_size = 0.15 +shader_parameter/enable_icon_rotation = false +shader_parameter/reverse_icon_rotation = false +shader_parameter/icon_rotation_speed = 1.0 +shader_parameter/show_icon = false + +[sub_resource type="Gradient" id="Gradient_kvhy4"] +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_2sr0p"] +gradient = SubResource("Gradient_kvhy4") +width = 100 +height = 150 +fill = 1 +fill_from = Vector2(0.521368, 0.512821) + [sub_resource type="ShaderMaterial" id="ShaderMaterial_slcfo"] shader = ExtResource("10_lf1xh") shader_parameter/frequency = 5.0 @@ -155,11 +191,21 @@ theme = SubResource("Theme_k5ur4") color = Color(0.356863, 0.278431, 0.356863, 1) metadata/_edit_lock_ = true +[node name="gradient" type="ColorRect" parent="Background"] +material = SubResource("ShaderMaterial_3q35w") +layout_mode = 0 +offset_left = -1149.0 +offset_top = -31.0 +offset_right = 3008.0 +offset_bottom = 1103.0 +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) +color = Color(0.6, 0.5, 0.6, 0.9) +metadata/_edit_lock_ = true [node name="select_prd" type="Button" parent="Background/side_panel"] layout_mode = 0 @@ -420,13 +466,14 @@ metadata/_tab_index = 1 metadata/_edit_lock_ = true [node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] +modulate = Color(1, 0, 0, 1) layout_mode = 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 = "Контроль исправности прибора ПРД-Н" +text = "Прибор не исправен" horizontal_alignment = 1 vertical_alignment = 1 @@ -738,6 +785,15 @@ offset_bottom = 782.0 color = Color(0, 0, 0, 0.596078) metadata/_edit_lock_ = true +[node name="win_load" type="TextureButton" parent="TabContainer/EMS_G/load_boadr"] +material = SubResource("ShaderMaterial_cm644") +layout_mode = 0 +offset_left = 730.0 +offset_top = 311.0 +offset_right = 830.0 +offset_bottom = 461.0 +texture_normal = SubResource("GradientTexture2D_2sr0p") + [node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"] material = SubResource("ShaderMaterial_slcfo") position = Vector2(785.001, 361.5) @@ -746,6 +802,7 @@ texture = SubResource("GradientTexture2D_0pk2o") metadata/_edit_lock_ = true [node name="Load_text" type="Label" parent="TabContainer/EMS_G/load_boadr"] +visible = false layout_mode = 0 offset_left = 693.0 offset_top = 341.0 diff --git a/Shaders/gradient.gdshader b/Shaders/gradient.gdshader new file mode 100644 index 0000000..4f01989 --- /dev/null +++ b/Shaders/gradient.gdshader @@ -0,0 +1,11 @@ +shader_type canvas_item; + +uniform float outerRadius : hint_range(0.0, 900.0) = 1.0; +uniform float MainAlpha : hint_range(0.0, 1.0) = 1.0; + +void fragment() { + float x = abs(UV.x-.5)*2.0; + float y = abs(UV.y-.5)*2.0; + float v = (sqrt((x*x)+(y*y))/outerRadius); + COLOR = vec4(0,0,0,v*MainAlpha); +} diff --git a/load.gdshader b/Shaders/load.gdshader similarity index 100% rename from load.gdshader rename to Shaders/load.gdshader diff --git a/Shaders/loadead.gdshader b/Shaders/loadead.gdshader new file mode 100644 index 0000000..26865a5 --- /dev/null +++ b/Shaders/loadead.gdshader @@ -0,0 +1,118 @@ +shader_type canvas_item; + +// Конфигурационные униформы для кольца. +uniform float dot_scale : hint_range(0.1, 9.1) = 0.5; // Масштаб точек кольца. +uniform float ring_radius : hint_range(0.1, 1.0) = 0.2; // Радиус кольца. +uniform int num_points : hint_range(3, 10) = 8; // Количество точек на кольце. +uniform float gap_ratio : hint_range(0.0, 0.9) = 0.22; // Отношение пробелов между точками. +uniform bool all_dots_same_size = false; // Флаг, указывающий, должны ли все точки быть одинакового размера. + +// Визуальные свойства точек кольца. +uniform vec4 dot_color_start : source_color = vec4(0.5, 0.0, 0.5, 1.0); // Начальный цвет точек. +uniform vec4 dot_color_end : source_color = vec4(0.8, 0.5, 1.0, 1.0); // Конечный цвет точек. +uniform bool enable_shadow = true; // Флаг для включения/выключения теней. +uniform vec4 shadow_color : source_color = vec4(0.0, 0.0, 0.0, 0.35); // Цвет теней. +uniform vec2 shadow_offset = vec2(0.03, 0.01); // Смещение теней от точек. + +// Контроль анимации кольца. +uniform float rotation_speed : hint_range(0.0, 10.0) = 1.5; // Скорость вращения кольца. + + // Новые униформы для текстуры иконки и её внешнего вида. +uniform sampler2D icon_texture; // Текстура иконки. +uniform float icon_size : hint_range(0.0, 1.0) = 0.15; // Контроль радиуса иконки. + +// Новые униформы для контроля вращения иконки. +uniform bool enable_icon_rotation = false; // Флаг для включения вращения иконки. +uniform bool reverse_icon_rotation = false; // Флаг для инверсии вращения иконки. +uniform float icon_rotation_speed : hint_range(-10.0, 10.0) = 1.0; // Скорость вращения иконки. + +// Униформ для контроля отрисовки иконки. +uniform bool show_icon = false; // Если false, текстура иконки игнорируется. + +void fragment() { + // Преобразование UV-координат для центрирования начала координат и корректировки в зависимости от аспекта экрана. + float aspect_ratio = SCREEN_PIXEL_SIZE.x / SCREEN_PIXEL_SIZE.y; + vec2 uv = (UV * 2.0 - 1.0) * vec2(0.3, aspect_ratio); // Нормализация UV координат. + + // Подсчет кольца (точек и опциональной тени). + vec4 ring_color = vec4(0.0); // Начальный цвет кольца. + float dot_accum = 0.0; // Накапливаемый вклад от точек. + float shadow_accum = 0.0; // Накапливаемый вклад от теней. + + float total_angle = 6.283185307; // Полный круг в радианах (2π). + float gap = total_angle * gap_ratio; // Вычисление ширины пробела между точками. + float spacing = (total_angle - gap) / float(num_points); // Вычисление интервала между точками. + + // Определение направления вращения кольца. + float direction = 1.0; // Вращение по часовой стрелке или против. + float rotation = TIME * rotation_speed * direction; // Вычисление текущего угла поворота. + + for (int i = 0; i < num_points; i++) { // Проход по каждой точке кольца. + float angle = rotation + spacing * float(i); // Вычисление угла для данной точки. + + vec2 pos = vec2(cos(angle), sin(angle)) * ring_radius; // Вычисление позиции точки по окружности. + + // Вычисление размера точки: + float size_factor = 0.5 + (float(i) / float(num_points)); // Фактор уменьшения размера. + float radius = all_dots_same_size ? 0.1 * dot_scale : 0.1 * size_factor * dot_scale; // Радиус точки. + + // Интерполяция цвета точки вдоль кольца от начала к концу. + float gradient_factor = float(i) / float(num_points - 1); // Фактор градиента для цветовой интерполяции. + vec4 dot_color = mix(dot_color_start, dot_color_end, gradient_factor); // Цвет точки. + + // Вычисление вклада точки на основе расстояния. + float distance = length(uv - pos); // Расстояние до текущей точки. + float contribution = smoothstep(radius + 0.01, radius, distance); // Плавный вклад на основе расстояния. + + if (contribution > 0.0) { // Если вклад точки больше нуля, + ring_color = mix(ring_color, dot_color, contribution); // Смешивание с цветом кольца. + dot_accum += contribution; // Накопление вклада от точки. + } + + // Опциональная тень за каждой точкой. + if (enable_shadow) { + vec2 shadow_pos = pos + shadow_offset; // Позиция для тени. + float shadow_dist = length(uv - shadow_pos); // Расстояние до тени. + float shadow_contrib = smoothstep(radius * 1.2 + 0.005, radius * 1.2, shadow_dist); // Вклад от тени. + shadow_accum += shadow_contrib; // Накопление вклада от теней. + } + } + + // Определение базового цвета для кольца или тени. + vec4 base_color = vec4(0.0); // Начальный цвет. + if (dot_accum > 0.0) { // Если есть вклад от точек, + base_color = ring_color; // Установка базового цвета на цвет кольца. + } else if (enable_shadow && shadow_accum > 0.0) { // Если тени включены и есть вклад от теней, + base_color = shadow_color; // Установка базового цвета на цвет тени. + } + + // Отрисовка иконки - приступаем только если show_icon истинно. + if (show_icon) { + // Создание радиальной маски, чтобы иконка была видимой внутри радиуса icon_size. + float icon_mask = smoothstep(icon_size, icon_size - 0.005, length(uv)); // Маска для иконки. + + // Нормализация UV-координат для иконки. + vec2 icon_uv = (uv / icon_size + vec2(1.0)) / 2.0; // Превращение из диапазона (-icon_size ... +icon_size) в (0 ... 1). + + // Применение вращения иконки, если оно включено. + if (enable_icon_rotation) { + float icon_angle = TIME * icon_rotation_speed; // Угол вращения на основе времени и скорости вращения. + if (reverse_icon_rotation) { + icon_angle = -icon_angle; // Инверсия угла, если требуется. + } + // Вращение вокруг центра (0.5, 0.5) текстуры иконки. + vec2 centered_uv = icon_uv - vec2(0.5); // Смещение UV координат. + float s = sin(icon_angle); // Синус угла. + float c = cos(icon_angle); // Косинус угла. + centered_uv = vec2(centered_uv.x * c - centered_uv.y * s, + centered_uv.x * s + centered_uv.y * c); // Применение матрицы вращения. + icon_uv = centered_uv + vec2(0.5); // Смещение обратно к нормализованным координатам. + } + + vec4 icon_sample = texture(icon_texture, icon_uv); // Получение цвета из текстуры иконки. + // Смешивание текстуры иконки с базовым цветом кольца с учетом маски и альфа-канала текстуры. + base_color = mix(base_color, icon_sample, icon_mask * icon_sample.a); + } + + COLOR = base_color; // Установка финального цвета для текущего пикселя. +} \ No newline at end of file diff --git a/opt_btn.gdshader b/Shaders/opt_btn.gdshader similarity index 100% rename from opt_btn.gdshader rename to Shaders/opt_btn.gdshader diff --git a/ray_2.gdshader b/Shaders/ray_2.gdshader similarity index 100% rename from ray_2.gdshader rename to Shaders/ray_2.gdshader diff --git a/kasseta-fs-kd.tscn b/kasseta-fs-kd.tscn index 20c9779..03649ee 100644 --- a/kasseta-fs-kd.tscn +++ b/kasseta-fs-kd.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://bdb0bhfu7366l"] -[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="1_1jljp"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="1_1jljp"] [ext_resource type="Script" path="res://scripts/кассета.gd" id="2_20xal"] [node name="kasseta_fs_kd" type="NinePatchRect"] diff --git a/light_ind.tscn b/light_ind.tscn index 3b31873..6ab1605 100644 --- a/light_ind.tscn +++ b/light_ind.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=11 format=3 uid="uid://c7ft3pxeufffh"] -[ext_resource type="Shader" path="res://opt_btn.gdshader" id="1_sq6hl"] +[ext_resource type="Shader" path="res://Shaders/opt_btn.gdshader" id="1_sq6hl"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dcn8"] bg_color = Color(0, 0, 0, 1) diff --git a/Web.png b/pictures/Web.png similarity index 100% rename from Web.png rename to pictures/Web.png diff --git a/Web.png.import b/pictures/Web.png.import similarity index 74% rename from Web.png.import rename to pictures/Web.png.import index eb499ab..256dd19 100644 --- a/Web.png.import +++ b/pictures/Web.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://co8dxcd8eckjs" -path="res://.godot/imported/Web.png-c71665e7797af3c541effa7e6a335fc8.ctex" +path="res://.godot/imported/Web.png-dc8815faf5efba2116da493712c8f347.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Web.png" -dest_files=["res://.godot/imported/Web.png-c71665e7797af3c541effa7e6a335fc8.ctex"] +source_file="res://pictures/Web.png" +dest_files=["res://.godot/imported/Web.png-dc8815faf5efba2116da493712c8f347.ctex"] [params] diff --git a/nine-patch-round.png b/pictures/nine-patch-round.png similarity index 100% rename from nine-patch-round.png rename to pictures/nine-patch-round.png diff --git a/nine-patch-round.png.import b/pictures/nine-patch-round.png.import similarity index 70% rename from nine-patch-round.png.import rename to pictures/nine-patch-round.png.import index 84476b2..6fd23cd 100644 --- a/nine-patch-round.png.import +++ b/pictures/nine-patch-round.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cgtg4gbqnuxrc" -path="res://.godot/imported/nine-patch-round.png-61bc031153ce0d2485f8ba950a72df3f.ctex" +path="res://.godot/imported/nine-patch-round.png-d67b419565e5d3ad11857c28e4e157e8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://nine-patch-round.png" -dest_files=["res://.godot/imported/nine-patch-round.png-61bc031153ce0d2485f8ba950a72df3f.ctex"] +source_file="res://pictures/nine-patch-round.png" +dest_files=["res://.godot/imported/nine-patch-round.png-d67b419565e5d3ad11857c28e4e157e8.ctex"] [params] diff --git a/pictures/бургер.png b/pictures/бургер.png new file mode 100644 index 0000000..4687854 Binary files /dev/null and b/pictures/бургер.png differ diff --git a/pictures/бургер.png.import b/pictures/бургер.png.import new file mode 100644 index 0000000..ef7a8f3 --- /dev/null +++ b/pictures/бургер.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://671got5vbput" +path="res://.godot/imported/бургер.png-a4597b7e50068e8e31a811680c5fcb22.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/бургер.png" +dest_files=["res://.godot/imported/бургер.png-a4597b7e50068e8e31a811680c5fcb22.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 diff --git a/pictures/клад.png b/pictures/клад.png new file mode 100644 index 0000000..abf97df Binary files /dev/null and b/pictures/клад.png differ diff --git a/pictures/клад.png.import b/pictures/клад.png.import new file mode 100644 index 0000000..ce391ef --- /dev/null +++ b/pictures/клад.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://didrk0pcfgirg" +path="res://.godot/imported/клад.png-9e9ce66d03446d5f22e89a61ca4eb967.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/клад.png" +dest_files=["res://.godot/imported/клад.png-9e9ce66d03446d5f22e89a61ca4eb967.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 diff --git a/pictures/контролер.png b/pictures/контролер.png new file mode 100644 index 0000000..9d205a8 Binary files /dev/null and b/pictures/контролер.png differ diff --git a/pictures/контролер.png.import b/pictures/контролер.png.import new file mode 100644 index 0000000..42422a2 --- /dev/null +++ b/pictures/контролер.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckvwvec0hop37" +path="res://.godot/imported/контролер.png-05a38fc04c4e4ced2b9f7faad6a4134d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/контролер.png" +dest_files=["res://.godot/imported/контролер.png-05a38fc04c4e4ced2b9f7faad6a4134d.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 diff --git a/pictures/серпимолот.png b/pictures/серпимолот.png new file mode 100644 index 0000000..009269c Binary files /dev/null and b/pictures/серпимолот.png differ diff --git a/pictures/серпимолот.png.import b/pictures/серпимолот.png.import new file mode 100644 index 0000000..094ffd8 --- /dev/null +++ b/pictures/серпимолот.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxn1guhi7lg3i" +path="res://.godot/imported/серпимолот.png-2793ea1f438c319da5ed90b40bb55968.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/серпимолот.png" +dest_files=["res://.godot/imported/серпимолот.png-2793ea1f438c319da5ed90b40bb55968.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 diff --git a/pictures/состояние-исправности-0.png b/pictures/состояние-исправности-0.png new file mode 100644 index 0000000..79e6700 Binary files /dev/null and b/pictures/состояние-исправности-0.png differ diff --git a/состояние-исправности-0.png.import b/pictures/состояние-исправности-0.png.import similarity index 78% rename from состояние-исправности-0.png.import rename to pictures/состояние-исправности-0.png.import index 4f6075b..ec0667a 100644 --- a/состояние-исправности-0.png.import +++ b/pictures/состояние-исправности-0.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://ce3qpf070wgd2" -path="res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.ctex" +path="res://.godot/imported/состояние-исправности-0.png-ec804b9c19d2b9ac0d14165a8b0d572a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://состояние-исправности-0.png" -dest_files=["res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.ctex"] +source_file="res://pictures/состояние-исправности-0.png" +dest_files=["res://.godot/imported/состояние-исправности-0.png-ec804b9c19d2b9ac0d14165a8b0d572a.ctex"] [params] diff --git a/pictures/состояние-исправности-1.png b/pictures/состояние-исправности-1.png new file mode 100644 index 0000000..6ad156f Binary files /dev/null and b/pictures/состояние-исправности-1.png differ diff --git a/состояние-исправности-1.png.import b/pictures/состояние-исправности-1.png.import similarity index 78% rename from состояние-исправности-1.png.import rename to pictures/состояние-исправности-1.png.import index 0e27798..0545032 100644 --- a/состояние-исправности-1.png.import +++ b/pictures/состояние-исправности-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://byweg7pgt8o4h" -path="res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.ctex" +path="res://.godot/imported/состояние-исправности-1.png-b3ce72ab96220f1713af3c4876cdbccb.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://состояние-исправности-1.png" -dest_files=["res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.ctex"] +source_file="res://pictures/состояние-исправности-1.png" +dest_files=["res://.godot/imported/состояние-исправности-1.png-b3ce72ab96220f1713af3c4876cdbccb.ctex"] [params] diff --git a/pictures/состояние-исправности-2.png b/pictures/состояние-исправности-2.png new file mode 100644 index 0000000..759ce22 Binary files /dev/null and b/pictures/состояние-исправности-2.png differ diff --git a/состояние-исправности-2.png.import b/pictures/состояние-исправности-2.png.import similarity index 78% rename from состояние-исправности-2.png.import rename to pictures/состояние-исправности-2.png.import index aa075f9..e5be007 100644 --- a/состояние-исправности-2.png.import +++ b/pictures/состояние-исправности-2.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bvikuv0lbvou8" -path="res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex" +path="res://.godot/imported/состояние-исправности-2.png-bca7b95f6cde89856ef4da574dc4c166.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://состояние-исправности-2.png" -dest_files=["res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"] +source_file="res://pictures/состояние-исправности-2.png" +dest_files=["res://.godot/imported/состояние-исправности-2.png-bca7b95f6cde89856ef4da574dc4c166.ctex"] [params] diff --git a/эмс-бланк-перем.png b/pictures/эмс-бланк-перем.png similarity index 100% rename from эмс-бланк-перем.png rename to pictures/эмс-бланк-перем.png diff --git a/эмс-бланк-перем.png.import b/pictures/эмс-бланк-перем.png.import similarity index 75% rename from эмс-бланк-перем.png.import rename to pictures/эмс-бланк-перем.png.import index 3e2fb03..300a1e8 100644 --- a/эмс-бланк-перем.png.import +++ b/pictures/эмс-бланк-перем.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://ijdfo2mml54" -path="res://.godot/imported/эмс-бланк-перем.png-011e0d06ef6ddca754d1f3d8e11a448c.ctex" +path="res://.godot/imported/эмс-бланк-перем.png-033d3a20f21f565460affa02e225fff8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://эмс-бланк-перем.png" -dest_files=["res://.godot/imported/эмс-бланк-перем.png-011e0d06ef6ddca754d1f3d8e11a448c.ctex"] +source_file="res://pictures/эмс-бланк-перем.png" +dest_files=["res://.godot/imported/эмс-бланк-перем.png-033d3a20f21f565460affa02e225fff8.ctex"] [params] diff --git a/эмс-бланк-пост.png b/pictures/эмс-бланк-пост.png similarity index 100% rename from эмс-бланк-пост.png rename to pictures/эмс-бланк-пост.png diff --git a/эмс-бланк-пост.png.import b/pictures/эмс-бланк-пост.png.import similarity index 75% rename from эмс-бланк-пост.png.import rename to pictures/эмс-бланк-пост.png.import index 0ed9c66..ca59d41 100644 --- a/эмс-бланк-пост.png.import +++ b/pictures/эмс-бланк-пост.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b15flrfytxkop" -path="res://.godot/imported/эмс-бланк-пост.png-439ef19be91abe97f22f96e843d00c61.ctex" +path="res://.godot/imported/эмс-бланк-пост.png-61a20a1f6fe7b6142ff882433918f09a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://эмс-бланк-пост.png" -dest_files=["res://.godot/imported/эмс-бланк-пост.png-439ef19be91abe97f22f96e843d00c61.ctex"] +source_file="res://pictures/эмс-бланк-пост.png" +dest_files=["res://.godot/imported/эмс-бланк-пост.png-61a20a1f6fe7b6142ff882433918f09a.ctex"] [params] diff --git a/эмс-бланк.png b/pictures/эмс-бланк.png similarity index 100% rename from эмс-бланк.png rename to pictures/эмс-бланк.png diff --git a/эмс-бланк.png.import b/pictures/эмс-бланк.png.import similarity index 70% rename from эмс-бланк.png.import rename to pictures/эмс-бланк.png.import index 7b5478d..aefe55c 100644 --- a/эмс-бланк.png.import +++ b/pictures/эмс-бланк.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dkef6xwxwdxi8" -path="res://.godot/imported/эмс-бланк.png-59a703aa6cdf36be7c906f7ee7a30184.ctex" +path="res://.godot/imported/эмс-бланк.png-8ff830647ca6b31294e66f002eb30e08.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://эмс-бланк.png" -dest_files=["res://.godot/imported/эмс-бланк.png-59a703aa6cdf36be7c906f7ee7a30184.ctex"] +source_file="res://pictures/эмс-бланк.png" +dest_files=["res://.godot/imported/эмс-бланк.png-8ff830647ca6b31294e66f002eb30e08.ctex"] [params] diff --git a/scripts/FS.gd b/scripts/FS.gd index dddf9a2..a8e32c6 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -8,14 +8,16 @@ const RETRY_COUNT = 5 ## Количество повторных отпр class FGOS: ## Коды выполняемых команд enum CmdCode { - START_SESSION = 0x0, - READ_CARRIER = 0x1F, - SET_CARRIER = 0x1E, - READ_ATT = 0x1A, - SET_ATT = 0x1B, - READ_GEN_STATUS = 0x05, - SET_GEN_STATUS = 0x06, - BASE_GET_CURRENT_TEMP = 0x36, + START_SESSION = 0x0, ## Команда начала сессии + READ_CARRIER = 0x1F, ## Команда получение несущей частоты + SET_CARRIER = 0x1E, ## Команда установки несущей частоты + READ_ATT = 0x1A, ## Команда чтения аттенюации + SET_ATT = 0x1B, ## Команда установки аттенюации + READ_GEN_STATUS = 0x05, ## Команда получения статуса генератора + SET_GEN_STATUS = 0x06, ## Команда установки статуса генератора + BASE_GET_CURRENT_TEMP = 0x36, ## Команда получения температуры + BASE_CAN_MACRO_WRITE = 0x30, ## Команда для записи последовательности CAN-команд + BASE_CAN_MACRO_READ = 0x33, ## Команда для чтения последовательности CAN-команд } enum GROUP { @@ -164,10 +166,23 @@ class FGOS: var index_size = 0x1C var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size, counter) packet.encode_u16(0x8, 0x10) - packet.encode_float(0x18, attenuation) + packet.encode_float(0x14, attenuation) send_packet_to(packet, client) - + + func set_base_can_macro(installation_can_frequency: int, counter: int, client: StreamPeer): + var index_size = 0x34 + var packet = _form_packet(GROUP.BASE, CmdCode.BASE_CAN_MACRO_WRITE, index_size, counter) + packet.encode_u16(0x08, 0x28) + packet.encode_u8(0x1C, 0x01) + packet.encode_u8(0x1D, 0x42) + packet.encode_u8(0x1F, 0x04) + packet.encode_u16(0x20, installation_can_frequency) + packet.encode_u16(0x28, 0x2aff) + packet.encode_u8(0x2B, 0x04) + send_packet_to(packet, client) + + func get_carrier(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE, counter) send_packet_to(packet, client) @@ -183,6 +198,12 @@ class FGOS: send_packet_to(packet, client) - func base_get_current_temp(counter: int, client: StreamPeer): + func get_base_current_temp(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.BASE, CmdCode.BASE_GET_CURRENT_TEMP, INDEX_SIZE, counter) send_packet_to(packet, client) + + + func get_base_can_macro(counter: int, client: StreamPeer): + var packet = _form_packet(GROUP.BASE, CmdCode.BASE_CAN_MACRO_READ, INDEX_SIZE, counter) + send_packet_to(packet, client) + diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 7e7fb35..79c305d 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -28,20 +28,21 @@ func _ready() -> void: if args[i] == "testsave-path" and i + 1 < args.size(): save_path = args[i + 1] break + # Таблица УКП_1 node_select1 = $TabContainer/PRD/body_grid/litera_2_4_6/table_ukp_1 draw_tabl(node_select1, Constants.ROWS_REGS_DATA, Constants.ROWS_REGS_DATA.size()) 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_REGS_DATA, Constants.ROWS_REGS_DATA.size()) node_select2.set_columns_min_size([120, 120]) node_select2.set_node_text(0, 0, 'Мощность') node_select2.set_node_text(1, 0, 'Температура') - + # Таблица ЯУ-07б var node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B_1, Constants.ROWS_YAU_07B_1.size()) @@ -53,7 +54,7 @@ func _ready() -> void: node_select_yau_07b.set_node_text(0, 3, 'Положение луча') node_select_yau_07b.set_node_text(0, 4, 'Аттенюатор') node_select_yau_07b.set_node_text(0, 6, 'СИ 2 в УФ') - + var node_select_yau_07b_2 = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control draw_tabl(node_select_yau_07b_2, Constants.ROWS_YAU_07B_2, Constants.ROWS_YAU_07B_2.size()) node_select_yau_07b_2.set_columns_min_size([160, 120]) @@ -65,7 +66,7 @@ func _ready() -> void: node_select_yau_07b_2.set_node_text(0, 4, 'Аттенюатор') node_select_yau_07b_2.set_node_text(0, 5, 'ФГОЗ 3') node_select_yau_07b_2.set_node_text(0, 6, 'СИ 3 в УФ') - + #Таблица ФС var node_select_fs_1 = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control draw_tabl(node_select_fs_1, Constants.ROWS_FS, Constants.ROWS_FS.size()) @@ -82,7 +83,10 @@ func _ready() -> void: node_select_fs_1.set_node_text(0, 4, 'Генератор') node_select_fs_1.set_node_text(0, 5, 'fpga') node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС') - + node_select_fs_1.set_node_text(0, 7, 'Фильтр CAN') + node_select_fs_1.get_node2(1, 7).placeholder_text = 'в МГц' + node_select_fs_1.get_node2(1, 7).editable = true + var node_select_fs_2 = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control draw_tabl(node_select_fs_2, Constants.ROWS_FS, Constants.ROWS_FS.size()) node_select_fs_2.set_columns_min_size([120, 120, 150]) @@ -98,12 +102,16 @@ func _ready() -> void: node_select_fs_2.set_node_text(0, 4, 'Генератор') node_select_fs_2.set_node_text(0, 5, 'fpga') node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС') - + node_select_fs_2.set_node_text(0, 7, 'Фильтр CAN') + node_select_fs_2.get_node2(1, 7).placeholder_text = 'в МГц' + node_select_fs_2.get_node2(1, 7).editable = true + # Выбор прибора для подключения 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) - + get_select_device.connect('item_selected', Callable(self, 'on_device_selected')) + # Заполнение адресов for i_addr in Constants.ADDRESSES.size(): get_select_device.add_item(Constants.ADDRESSES[i_addr][0]) @@ -112,27 +120,36 @@ func _ready() -> void: node_select_device.get_node2(0,0).text = 'ПРИБОР' node_select_device.set_columns_min_size([100, 100]) - # Получаем имя выбранного прибора + # Получение выбранного прибора при загрузке if Constants.ADDRESSES.size() > 0: get_select_device.select(0) status_pribor = get_select_device.get_item_text(0).strip_edges().substr(4) - + ## Заполненение списка модуляции УМ for key in Constants.OUT_x128: node_select_yau_07b.get_node2(1, 2).add_item(key) node_select_yau_07b_2.get_node2(1, 2).add_item(key) - + ## Заполненение списка направления луча 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) node_select_yau_07b_2.get_node2(1, 4).add_item(key) - draw_control_panel_prd(Constants.ADDRESSES[0][3]) + Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 48) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8]) + Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 49) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8]) + Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 51) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8]) + Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 52) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8]) + Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 56) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8]) Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) @@ -143,118 +160,33 @@ func _ready() -> void: Network.connect('port_fs_closed_2', _on_port_changed_fs_2.bind(Color.CRIMSON)) Network.connect('data_from_fs_1', _on_data_fs_1) Network.connect('data_from_fs_2', _on_data_fs_2) - + + ## Yau-07b 1 node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret1')) node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_1')) node_select_yau_07b.get_node2(1, 3).connect('item_selected', Callable(self, '_on_btn_ray_1')) node_select_yau_07b.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_1')) - + ## Yau-07b 2 node_select_yau_07b_2.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret2')) node_select_yau_07b_2.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_2')) node_select_yau_07b_2.get_node2(1, 3).connect('item_selected', Callable(self, '_on_btn_ray_2')) node_select_yau_07b_2.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_2')) node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2')) - + ## FS 1 node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1')) - node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_1')) node_select_fs_1.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_1')) - + node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_1')) + node_select_fs_1.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro')) + ## FS 2 node_select_fs_2.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2')) - node_select_fs_2.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_2')) node_select_fs_2.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_2')) + node_select_fs_2.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_2')) + node_select_fs_2.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro_2')) -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 +func on_device_selected(selected_index: int) -> void: + var get_select_device = $TabContainer/PRD/select_dev.get_node2(1, 0) + status_pribor = get_select_device.get_item_text(selected_index).strip_edges().substr(4) ## From Network status about yau-07 @@ -267,7 +199,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) @@ -284,17 +216,46 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: emit_signal('read_ems_g_finish') $ISA.text = 'ISA: ' + str(len(Constants.EMS_G_PORT_DATA_HOLDER)) + $TabContainer/EMS_G/load_boadr/win_load.material.set('shader_parameter/dot_color_end', Color(0.8, 0.5, 1.0, 1.0 - 0.05 * len(Constants.EMS_G_PORT_DATA_HOLDER))) + if isa_data.has(Constants.BASE_PORTS.UG+6): - $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 3).select(isa_data[0x106] & 0x7) - $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 4).select((isa_data[0x106] & 0x38)>> 3) - $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x106] & 0x7)) - $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[0x106] & 0x38)) + if (isa_data[Constants.BASE_PORTS.UG+6] & 0x7) < 7: + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 3).select(isa_data[Constants.BASE_PORTS.UG+6] & 0x7) + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 4).select((isa_data[Constants.BASE_PORTS.UG+6] & 0x38)>> 3) + $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[Constants.BASE_PORTS.UG+6] & 0x7)) + $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[Constants.BASE_PORTS.UG+6] & 0x38)) if isa_data.has(Constants.BASE_PORTS.UG+8): - $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 3).select(isa_data[0x108] & 0x7) - $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 4).select((isa_data[0x108] & 0x38)>>3) - $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x108] & 0x7)) - $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[0x108] & 0x38)) + if (isa_data[Constants.BASE_PORTS.UG+8] & 0x7) < 7: + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 3).select(isa_data[Constants.BASE_PORTS.UG+8] & 0x7) + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 4).select((isa_data[Constants.BASE_PORTS.UG+8] & 0x38)>>3) + $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[Constants.BASE_PORTS.UG+8] & 0x7)) + $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[Constants.BASE_PORTS.UG+8] & 0x38)) + for index in Constants.EMS_G_PORT_DATA_HOLDER.size(): + var tmp_device_mode = Constants.EMS_G_PORT_DATA_HOLDER[index][0] + if tmp_device_mode == 48: + var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1] + if Constants.BASE_PORTS.EMS_G+8 in data_dict: + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,1).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 14 + if tmp_device_mode == 49: + var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1] + if Constants.BASE_PORTS.EMS_G+8 in data_dict: + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,1).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 14 + if tmp_device_mode == 51: + var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1] + if Constants.BASE_PORTS.EMS_G+8 in data_dict: + var select = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 if data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 < 3 else 3 + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,2).select(select) + if tmp_device_mode == 52: + var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1] + if Constants.BASE_PORTS.EMS_G+8 in data_dict: + var select = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 if data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 < 3 else 3 + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,2).select(select) + if tmp_device_mode == 56: + var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1] + if Constants.BASE_PORTS.EMS_G+8 in data_dict: + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,5).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 + func _on_data_fs_1(fs_1_data): var node_select_fs_1 = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control @@ -303,22 +264,24 @@ func _on_data_fs_1(fs_1_data): match CMD: Constants.CMD.READ_CARRIER: if GRP == Constants.GROUP.BASE: - node_select_fs_1.set_node_text(2, 2, str(fs_1_data.decode_u64(0xC)) + ' Гц') + node_select_fs_1.set_node_text(2, 2, str(fs_1_data.decode_u64(0xC) / 1_000_000) + ' МГц') Constants.CMD.READ_ATT: if GRP == Constants.GROUP.RF: - node_select_fs_1.set_node_text(2, 3, '-' + str(fs_1_data.decode_float(0x18)) + ' dB') + node_select_fs_1.set_node_text(2, 3, '-' + str(fs_1_data.decode_float(0x14)) + ' dB') Constants.CMD.READ_GEN_STATUS: if GRP == Constants.GROUP.GENERATOR: if fs_1_data.decode_u32(0xC) == 0: node_select_fs_1.set_node_text(2, 4, 'Включен') node_select_fs_1.get_node2(2, 4).modulate = Color.AQUAMARINE else: - node_select_fs_1.set_node_text(2, 4, 'Выключен') + node_select_fs_1.set_node_text(2, 4, 'Отключен') node_select_fs_1.get_node2(2, 4).modulate = Color.CRIMSON Constants.CMD.BASE_GET_CURRENT_TEMP: if GRP == Constants.GROUP.BASE: node_select_fs_1.set_node_text(1, 5, '%.2f' % fs_1_data.decode_float(0xC) + ' °C') - #$read.text = str(fs_1_data.hex_encode()) + Constants.CMD.BASE_CAN_MACRO_READ: + if GRP == Constants.GROUP.BASE: + node_select_fs_1.set_node_text(2, 7, str(fs_1_data.decode_u16(0x20)) + ' МГц') func _on_data_fs_2(fs_2_data): @@ -328,7 +291,7 @@ func _on_data_fs_2(fs_2_data): match CMD: Constants.CMD.READ_CARRIER: if GRP == Constants.GROUP.BASE: - node_select_fs_2.set_node_text(2, 2, str(fs_2_data.decode_u64(0xC)) + ' Гц') + node_select_fs_2.set_node_text(2, 2, str(fs_2_data.decode_u64(0xC) / 1_000_000) + ' МГц') Constants.CMD.READ_ATT: if GRP == Constants.GROUP.RF: node_select_fs_2.set_node_text(2, 3, '-' + str(fs_2_data.decode_float(0x18)) + ' dB') @@ -338,11 +301,14 @@ func _on_data_fs_2(fs_2_data): node_select_fs_2.set_node_text(2, 4, 'Включен') node_select_fs_2.get_node2(2, 4).modulate = Color.AQUAMARINE else: - node_select_fs_2.set_node_text(2, 4, 'Выключен') + node_select_fs_2.set_node_text(2, 4, 'Отключен') node_select_fs_2.get_node2(2, 4).modulate = Color.CRIMSON Constants.CMD.BASE_GET_CURRENT_TEMP: if GRP == Constants.GROUP.BASE: node_select_fs_2.set_node_text(1, 5, '%.2f' % fs_2_data.decode_float(0xC) + ' °C') + Constants.CMD.BASE_CAN_MACRO_READ: + if GRP == Constants.GROUP.BASE: + node_select_fs_2.set_node_text(2, 7, str(fs_2_data.decode_u16(0x20)) + ' МГц') ## Рисует таблицу @@ -364,23 +330,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(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 node_select1.set_node_text(1, i+1, '%d °С' % TMP) - + for i_pow in range(6): ## Мощность от УКП_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(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) @@ -506,8 +472,7 @@ 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] _on_start_fs_1() _on_start_fs_2() @@ -534,7 +499,7 @@ func _on_modul_um_1(item_from_ray_1: int): 2: 0x4000, 3: 0x8000 } - + var modul_um = modul_um_values.get(item_from_ray_1, 0) Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um) @@ -551,7 +516,7 @@ func _on_modul_um_2(item_from_ray_1: int): Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um) -## Включение/отключение сигнала ФГОЗ +## Включение/отключение сигнала ФГОЗ func _on_fgos_2(toggled_on: bool): var meta = 56 Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta) @@ -567,8 +532,8 @@ func _on_btn_ray_1(item_from_ray_1: int) -> void: Network.read_port_isa([Constants.BASE_PORTS.UG+6]) else: print_debug('В ISA отсутствует данные в \"%x\" порту' % (Constants.BASE_PORTS.UG+0x6)) - - + + ## Регулировка положением луча 2 func _on_btn_ray_2(item_from_ray_2: int) -> void: if isa_from_yau07b.has(Constants.BASE_PORTS.UG+8): @@ -634,6 +599,10 @@ func _on_set_att_1(att: String): Network.set_fs_attenuation(float(att)) +func _on_set_base_can_macro(can_freq: String): + Network.set_can_macro(int(can_freq)) + + ## 2 ФС func _on_port_changed_fs_2(port_name: String, color: Color) -> void: $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.set_node_text(1, 1, port_name) @@ -655,3 +624,7 @@ func _on_set_ferq_2(freq: String): func _on_set_att_2(att: String): Network.set_fs_attenuation_2(float(att)) + + +func _on_set_base_can_macro_2(can_freq: String): + Network.set_can_macro_2(int(can_freq)) diff --git a/scripts/constants.gd b/scripts/constants.gd index f6d4d2f..7665ba8 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -1,6 +1,6 @@ extends Node -const UNICAST_PORT: int = 50014 -const UNICAST_ADDRESS: String = '10.1.1.14' +const UNICAST_PORT: int = 50003 +const UNICAST_ADDRESS: String = '10.1.1.3' const BROADCAST_PORT: int = 50000 const DEFAULT_ADDRESS: String = '10.1.1.11' const DEFAULT_PORT: String = '50011' @@ -45,7 +45,8 @@ const ROWS_FS: Array = [ [TableNode, TableNode, TableNode], [TableNode, Switch, TableNode], [TableNode, TableNode, TableNode], - [TableNode, SocketStatus, TableNode]] + [TableNode, SocketStatus, TableNode], + [TableNode, TableNode, TableNode],] const ADDRESSES: Array = [ ['ПРД-Н1', '10.1.1.11', 50011, MODE.PRD_H, '10.1.2.18', '10.1.2.19', ''], ['ПРД-Н2', '10.1.1.21', 50021, MODE.PRD_H, '10.1.2.34', '10.1.2.35', ''], @@ -100,9 +101,9 @@ const OUT_x128: Array = [ 'Р', 'К', 'Откл.', - '1',] + '1' + ] const RAY_DICT: Array = [ - ' Контроль', ' -5°', ' 5°', ' 15°', @@ -110,7 +111,7 @@ const RAY_DICT: Array = [ ' 35°', ' 45°', ' Контроль', -] + ] const ATT_DICT: Array = [ ' 0 dB', ' 0.5 dB', @@ -120,20 +121,18 @@ const ATT_DICT: Array = [ ' 8.5 dB', ' 10 dB', ' 10.5 dB', -] - + ] enum BASE_PORTS { UG = 0x100, EMS_G = 0x120, UKP_1 = 0x130, UKP_2 = 0x140, } - enum MODE { PRD_K, PRD_B, PRD_H, -} + } enum Frame { WORK, ## В работе CONSTANT, ## Постоянный сигнал @@ -152,7 +151,7 @@ enum DataIndices { TEMPERATURE_UKP_1 = 47, POWER_UKP_2 = 63, TEMPERATURE_UKP_2 = 79, -} + } enum STATE { WAIT, READ_ISA, @@ -160,13 +159,12 @@ enum STATE { DONE, IDLE, SEND, -} - + } enum STATE_VAL { NONE = 0, GOOD = 1, - ERROR = 2 } - + ERROR = 2 + } var EMS_G_PORT_DATA_HOLDER: Array = [] const PORT_FS = 1201 @@ -175,7 +173,7 @@ enum GROUP { BASE = 0x00, GENERATOR = 0x03, RF = 0x06, -} + } enum CMD { START_SESSION = 0x0, @@ -186,4 +184,5 @@ enum CMD { READ_GEN_STATUS = 0x05, SET_GEN_STATUS = 0x06, BASE_GET_CURRENT_TEMP = 0x36, + BASE_CAN_MACRO_READ = 0x33, } diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 36e72bb..fd5ea87 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -1,37 +1,182 @@ extends Panel -var unit_yau07 = Yau07.YaU07.new('ЯУ07') - +var timer = Timer.new() +var node_cell_ind: Array +var count_cell: int +var past_pribor: int func _ready() -> void: - Network.connect('yau_receive', Callable(self, '_on_data_received')) - Network.connect('yau_status_line', Callable(self, '_control_pribor')) + self.add_child(timer) + timer.connect('timeout', Callable(self, '_on_timer').bind(Network.unit)) + timer.start(1) - '''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_cell_ind = [ + $soc_y5/ay07, + $soc_y5/ems_g, + $soc_y5/ug, + $soc_y5/ukp_2, + $soc_y5/ukp_1, - 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]''' + $soc_P1/MAA_1, + $soc_P1/MAA_2, + $soc_P1/IP9_50_2, + $soc_P1/IP9_50_1, + $soc_P1/IP12_50, -func on_timer(unit): - print(unit) + $soc_P2/IP9_50, + $soc_P2/IP12_50, -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) # Контроль сухих контактов (УГ) + $soc_y5/IP5_25] + count_cell = len(node_cell_ind) -## From Network status about yau-07 -func _control_pribor(_yau_status:bool) -> void: - #$device.text = str(Constants.CURRENT_MODE) - $soc_y5/ay07.state = Constants.STATE_VAL.GOOD +func _on_timer(pribor_prd): + if (past_pribor != Constants.CURRENT_MODE): + _draw_control_panel_prd(Constants.CURRENT_MODE) + if (pribor_prd.online): + $soc_y5/ay07.state = Constants.STATE_VAL.GOOD + _status_cell(pribor_prd.status) + else: + $soc_y5/ay07.state = Constants.STATE_VAL.ERROR + for i in range(1,count_cell): + node_cell_ind[i].state = Constants.STATE_VAL.NONE + _status_prd() + past_pribor = Constants.CURRENT_MODE + + +func _status_cell(status): + var status_board: int = status.decode_u8(Constants.DataIndices.STATUS_BOARD) + var dry_contact: int = status.decode_u8(Constants.DataIndices.DRY_CONTACT) + + # status_board + for i in range(1, count_cell-8): + if ((status_board >> (i-1)) & 0x1) == 1: + node_cell_ind[i].state = Constants.STATE_VAL.GOOD + else: + node_cell_ind[i].state = Constants.STATE_VAL.ERROR + + #dry_contact + if (node_cell_ind[2].state == Constants.STATE_VAL.GOOD): + for i in range(5, count_cell): + if ((dry_contact >> (i-5)) & 0x1) == 0: + node_cell_ind[i].state = Constants.STATE_VAL.GOOD + else: + node_cell_ind[i].state = Constants.STATE_VAL.ERROR + else: + for i in range(5, count_cell): + node_cell_ind[i].state = Constants.STATE_VAL.NONE + +func _status_prd(): + var status: int = 0 + for i in range(count_cell-3): + status += 1 if (node_cell_ind[i].state == Constants.STATE_VAL.GOOD) else 0 + status += 1 if (node_cell_ind[count_cell-1].state == Constants.STATE_VAL.GOOD) else 0 + + if (Constants.CURRENT_MODE == Constants.MODE.PRD_K): + status += 1 if (node_cell_ind[count_cell-3].state == Constants.STATE_VAL.GOOD) else 0 + status += 1 if (node_cell_ind[count_cell-2].state == Constants.STATE_VAL.GOOD) else 0 + if (status == count_cell): + $lbl_control.text = 'Прибор исправен' + $lbl_control.modulate = Color(0,1,0,1) + else: + $lbl_control.text = 'Прибор не исправен' + $lbl_control.modulate = Color(1,0,0,1) + else: + if (status == count_cell-2): + $lbl_control.text = 'Прибор исправен' + $lbl_control.modulate = Color(0,1,0,1) + else: + $lbl_control.text = 'Прибор не исправен' + $lbl_control.modulate = Color(1,0,0,1) + +func _draw_control_panel_prd(pribor): + if pribor == Constants.MODE.PRD_H: + # Кассета У5 + $soc_y5/IP5_25.rname = 'А24' + $soc_y5/ay07.rname = 'А30' + $soc_y5/ems_g.rname = 'А26' + $soc_y5/ug.rname = 'А27' + $soc_y5/ukp_1.rname = 'А28' + $soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $Kasseta_FS/Kasseta.text = 'Кассета ФС-НД' + $Kasseta_FS/Block_FS_PRD_K.visible = false + $Kasseta_FS/FS_PRD_K.visible = false + $Kasseta_FS/ref_A1.rname = 'А1' + $Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $Kasseta_FS/ref_A3.rname = 'А3' + $Kasseta_FS/ref_A3.fname = 'БЛОК ФС-2' + $Kasseta_FS/ref_A2.rname = 'А2' + $Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $Kasseta_FS/ref_A4.rname = 'А4' + $Kasseta_FS/ref_A4.fname = 'БЛОК ФС-3' + # Кассета П-1 + $soc_P1/IP12_50.rname = 'А21' + $soc_P1/IP9_50_1.rname = 'А20' + $soc_P1/IP9_50_2.rname = 'А19' + $soc_P1/MAA_1.rname = 'А22' + $soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_B: + # Кассета У5 + $soc_y5/IP5_25.rname = 'А24' + $soc_y5/ay07.rname = 'А30' + $soc_y5/ems_g.rname = 'А26' + $soc_y5/ug.rname = 'А27' + $soc_y5/ukp_1.rname = 'А28' + $soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $Kasseta_FS/Kasseta.text = 'Кассета ФС-ВД' + $Kasseta_FS/Block_FS_PRD_K.visible = false + $Kasseta_FS/FS_PRD_K.visible = false + $Kasseta_FS/ref_A1.rname = 'А1' + $Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $Kasseta_FS/ref_A3.rname = 'А3' + $Kasseta_FS/ref_A3.fname = 'БЛОК ФС-4' + $Kasseta_FS/ref_A2.rname = 'А2' + $Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $Kasseta_FS/ref_A4.rname = 'А4' + $Kasseta_FS/ref_A4.fname = 'БЛОК ФС-5' + # Кассета П-1 + $soc_P1/IP12_50.rname = 'А21' + $soc_P1/IP9_50_1.rname = 'А20' + $soc_P1/IP9_50_2.rname = 'А19' + $soc_P1/MAA_1.rname = 'А22' + $soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_K: + # Кассета У5 + $soc_y5/IP5_25.rname = 'А31' + $soc_y5/ay07.rname = 'А37' + $soc_y5/ems_g.rname = 'А33' + $soc_y5/ug.rname = 'А34' + $soc_y5/ukp_1.rname = 'А35' + $soc_y5/ukp_2.rname = 'А36' + # Кассета ФС + $Kasseta_FS/Kasseta.text = 'Кассета ФС-КД' + $Kasseta_FS/Block_FS_PRD_K.visible = true + $Kasseta_FS/FS_PRD_K.visible = true + $Kasseta_FS/ref_A1.rname = 'А3' + $Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $Kasseta_FS/ref_A3.rname = 'А6' + $Kasseta_FS/ref_A3.fname = 'БЛОК ФС-6' + $Kasseta_FS/ref_A2.rname = 'А2' + $Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $Kasseta_FS/ref_A4.rname = 'А5' + $Kasseta_FS/ref_A4.fname = 'БЛОК ФС-7' + # Кассета П-1 + $soc_P1/IP12_50.rname = 'А23' + $soc_P1/IP12_50.fname = 'ИП9-50' + $soc_P1/IP9_50_1.rname = 'А24' + $soc_P1/IP9_50_1.fname = 'ИП9-50' + $soc_P1/IP9_50_2.rname = 'А26' + $soc_P1/IP9_50_2.fname = 'ИП12-50' + + $soc_P1/MAA_1.rname = 'А27' + $soc_P1/MAA_2.rname = 'А28' + # Кассета П-2 + $soc_P2.visible = true diff --git a/scripts/network.gd b/scripts/network.gd index 3f84ba0..8f078ac 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -2,8 +2,7 @@ extends Node # ЯУ-07 Блок var unit = Yau07.YaU07.new('ЯУ-07Б') -var unit_fs_1 = Fs.FGOS.new() -#var unit_fs_2 = Fs.FGOS.new() +var unit_fs = Fs.FGOS.new() var soc_unicast: Socket var soc_brodcast: Socket var ip_address_yau: String = Constants.ADDRESSES[0][1] @@ -58,7 +57,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) @@ -84,7 +83,7 @@ func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: Strin elif client == client_fs_2: emit_signal("port_fs_closed_2", ip_fs) return - + if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) @@ -106,34 +105,34 @@ 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('Ошибка: неудачная привязка адреса: ', Constants.UNICAST_ADDRESS) unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) connect_fs_1() connect_fs_2() - read_port_isa([0x106, 0x108]) + read_port_isa([Constants.BASE_PORTS.UG+6, Constants.BASE_PORTS.UG+8, Constants.BASE_PORTS.EMS_G+8]) 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, peerstream_fs_1, ip_fs_1) state_machine_fs(client_fs_1) if client_fs_2: poll_receive_fs(client_fs_2, peerstream_fs_2, ip_fs_2) state_machine_fs(client_fs_2) - + poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) - + state_machine_yau07() match unit.process(delta): @@ -167,12 +166,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]) @@ -203,13 +202,13 @@ func state_machine_fs(client_fs): if (state_fs == Constants.STATE.IDLE) or (state_fs == Constants.STATE.DONE): if command_stack: var pack: Array = command_stack.pop_front() - unit_fs_1.send_fs_data(pack, client_fs_1, peerstream_fs_1) + unit_fs.send_fs_data(pack, client_fs_1, peerstream_fs_1) state_fs = Constants.STATE.SEND if client_fs == client_fs_2: if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): if command_stack_2: var pack: Array = command_stack_2.pop_front() - unit_fs_1.send_fs_data(pack, client_fs_2, peerstream_fs_2) + unit_fs.send_fs_data(pack, client_fs_2, peerstream_fs_2) state_fs_2 = Constants.STATE.SEND @@ -217,7 +216,7 @@ func state_machine_fs(client_fs): func connect_fs_1(): 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) @@ -236,42 +235,53 @@ func disconnect_fs(client_for_leave): func start_work_fs(): counter_fs_1 = 0 - unit_fs_1.start_session(counter_fs_1, client_fs_1) + unit_fs.start_session(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_gen_state(counter_fs_1, client_fs_1) + unit_fs.get_gen_state(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_att_batch(counter_fs_1, client_fs_1) + unit_fs.get_att_batch(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_carrier(counter_fs_1, client_fs_1) + unit_fs.get_carrier(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) + unit_fs.get_base_current_temp(counter_fs_1, client_fs_1) + counter_fs_1 += 1 + unit_fs.get_base_can_macro(counter_fs_1, client_fs_1) counter_fs_1 += 1 func get_fs_gen_status(state_gen): - unit_fs_1.set_gen_state(state_gen, counter_fs_1, client_fs_1) + unit_fs.set_gen_state(state_gen, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_gen_state(counter_fs_1, client_fs_1) + unit_fs.get_gen_state(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) + unit_fs.get_base_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 func set_fs_ferq_carrier(freq: int): - unit_fs_1.set_carrier(freq, counter_fs_1, client_fs_1) + unit_fs.set_carrier(freq, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) + unit_fs.get_base_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_carrier(counter_fs_1, client_fs_1) + unit_fs.get_carrier(counter_fs_1, client_fs_1) counter_fs_1 += 1 func set_fs_attenuation(attenuation: float): - unit_fs_1.set_att_batch(attenuation, counter_fs_1, client_fs_1) + unit_fs.set_att_batch(attenuation, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_att_batch(counter_fs_1, client_fs_1) + unit_fs.get_att_batch(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) + unit_fs.get_base_current_temp(counter_fs_1, client_fs_1) + counter_fs_1 += 1 + + +func set_can_macro(can_frequency: int): + unit_fs.set_base_can_macro(can_frequency, counter_fs_1, client_fs_1) + counter_fs_1 += 1 + unit_fs.get_base_current_temp(counter_fs_1, client_fs_1) + counter_fs_1 += 1 + unit_fs.get_base_can_macro(counter_fs_1, client_fs_1) counter_fs_1 += 1 @@ -291,7 +301,7 @@ func connect_fs_2(): # Разорвать соединение с ФС -func disconnect_fs_2(client_for_leave): +func disconnect_fs_2(client_for_leave: StreamPeer): client_for_leave.disconnect_from_host() state_fs_2 = Constants.STATE.IDLE command_stack_2 = [] @@ -299,39 +309,56 @@ func disconnect_fs_2(client_for_leave): func start_work_fs_2(): counter_fs_2 = 0 - unit_fs_1.start_session(counter_fs_2, client_fs_2) + unit_fs.start_session(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_gen_state(counter_fs_2, client_fs_2) + unit_fs.get_gen_state(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_att_batch(counter_fs_2, client_fs_2) + unit_fs.get_att_batch(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_carrier(counter_fs_2, client_fs_2) + unit_fs.get_carrier(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + unit_fs.get_base_current_temp(counter_fs_2, client_fs_2) counter_fs_2 += 1 -# -func get_fs_gen_status_2(state_gen): - unit_fs_1.set_gen_state(state_gen, counter_fs_2, client_fs_2) + unit_fs.get_base_can_macro(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_gen_state(counter_fs_2, client_fs_2) + + +func get_fs_gen_status_2(state_gen: bool): + unit_fs.set_gen_state(state_gen, counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + unit_fs.get_gen_state(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs.get_base_current_temp(counter_fs_2, client_fs_2) counter_fs_2 += 1 func set_fs_ferq_carrier_2(freq: int): - unit_fs_1.set_carrier(freq, counter_fs_2, client_fs_2) + unit_fs.set_carrier(freq, counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + unit_fs.get_base_current_temp(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_carrier(counter_fs_2, client_fs_2) + unit_fs.get_carrier(counter_fs_2, client_fs_2) counter_fs_2 += 1 func set_fs_attenuation_2(attenuation: float): - unit_fs_1.set_att_batch(attenuation, counter_fs_2, client_fs_2) + unit_fs.set_att_batch(attenuation, counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.get_att_batch(counter_fs_2, client_fs_2) + unit_fs.get_att_batch(counter_fs_2, client_fs_2) counter_fs_2 += 1 - unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + unit_fs.get_base_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + + +func set_can_macro_2(can_frequency: int): + unit_fs.set_base_can_macro(can_frequency, counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs.get_base_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs.get_base_can_macro(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + + +func can_macro_exec_2(state_can: bool): + unit_fs.set_state_base_can_macro(state_can, counter_fs_2, client_fs_2) counter_fs_2 += 1 diff --git a/scripts/yau07.gd b/scripts/yau07.gd index a0f0255..7d1c660 100644 --- a/scripts/yau07.gd +++ b/scripts/yau07.gd @@ -37,7 +37,7 @@ class YaU07: signal command_done(unit: YaU07) ## Вызывается после выполнения команды signal command_fail(unit: YaU07) ## Вызывается если возникла ошибка при выполнении команды и команда не выполнена signal parse_failed(unit: YaU07) - signal data_received(unit: YaU07) ## Вызывается, когда получены данные + signal data_received(unit: YaU07) ## Вызывается, когда получены данные var name: = String() var cmd_num_rx: = 0 ## Номер команды принятый @@ -262,7 +262,6 @@ class YaU07: status[i] = rx_data[byte_i] # Массив байтовый "состояние прибора" i += 1 emit_signal('data_received', self) - if rx_data_len == (status_len + 6): return true # Нет поля "ответ на команду", разбор пакета завершить diff --git a/table/socket_status.tscn b/table/socket_status.tscn index 1f6040a..09ea766 100644 --- a/table/socket_status.tscn +++ b/table/socket_status.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=6 format=3 uid="uid://dn3jp4r8ij3rf"] -[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="1_bsrew"] -[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="2_b2kjm"] -[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="3_odpjv"] +[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="1_bsrew"] +[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="2_b2kjm"] +[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="3_odpjv"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"] bg_color = Color(0, 0, 0, 0.490196) diff --git a/table/элемент-в.tscn b/table/элемент-в.tscn index b2ea5f0..6e77dee 100644 --- a/table/элемент-в.tscn +++ b/table/элемент-в.tscn @@ -1,13 +1,13 @@ [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"] +[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://pictures/состояние-исправности-0.png" id="1_2n7he"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="2_4b43i"] +[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://pictures/состояние-исправности-1.png" id="2_38t58"] +[ext_resource type="Shader" path="res://Shaders/opt_btn.gdshader" id="2_ecsml"] +[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="3_4kmgr"] +[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://pictures/состояние-исправности-2.png" id="3_i2t3v"] +[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="4_omove"] +[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="5_jia67"] [sub_resource type="GDScript" id="GDScript_fbktk"] script/source = "@tool diff --git a/table/элемент-эмс.tscn b/table/элемент-эмс.tscn index b4d32e3..9659f4d 100644 --- a/table/элемент-эмс.tscn +++ b/table/элемент-эмс.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://bnlkbbn7b4a3k"] -[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="1_lmmwb"] -[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_2trq1"] -[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_vgjvf"] -[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_1heoc"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="1_lmmwb"] +[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="3_2trq1"] +[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="4_vgjvf"] +[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="5_1heoc"] [sub_resource type="GDScript" id="GDScript_fbktk"] script/source = "@tool diff --git a/состояние-исправности-0.png b/состояние-исправности-0.png deleted file mode 100644 index 33966d1..0000000 Binary files a/состояние-исправности-0.png and /dev/null differ diff --git a/состояние-исправности-1.png b/состояние-исправности-1.png deleted file mode 100644 index 755740f..0000000 Binary files a/состояние-исправности-1.png and /dev/null differ diff --git a/состояние-исправности-2.png b/состояние-исправности-2.png deleted file mode 100644 index d0ad198..0000000 Binary files a/состояние-исправности-2.png and /dev/null differ