diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 12545e0..a209a9e 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=61 format=3 uid="uid://cvor2jm4xk3ha"] +[gd_scene load_steps=67 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"] @@ -12,14 +12,20 @@ [ext_resource type="Texture2D" uid="uid://didrk0pcfgirg" path="res://pictures/клад.png" id="6_bqc7t"] [ext_resource type="Texture2D" uid="uid://cxn1guhi7lg3i" path="res://pictures/серпимолот.png" id="7_0pknj"] [ext_resource type="Shader" path="res://Shaders/ray_2.gdshader" id="8_12mng"] +[ext_resource type="Texture2D" uid="uid://ysxmr26y0i8v" path="res://pictures/серпимоло_pressed.png" id="8_iuer1"] [ext_resource type="Texture2D" uid="uid://ckvwvec0hop37" path="res://pictures/контролер.png" id="8_qqoau"] [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://Shaders/load.gdshader" id="10_lf1xh"] +[ext_resource type="Texture2D" uid="uid://t3bxox5ehcg8" path="res://pictures/контролер_pressed.png" id="10_t2sq8"] [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="PackedScene" uid="uid://bn2n3lgc4ts1r" path="res://table/блок-а.tscn" id="11_k47r2"] +[ext_resource type="Texture2D" uid="uid://dpes8l540mgrd" path="res://pictures/эмс.png" id="11_qqb3s"] +[ext_resource type="Texture2D" uid="uid://bcq6o4fuxh88b" path="res://pictures/эмс_pressed.png" id="12_u035s"] +[ext_resource type="Texture2D" uid="uid://b8jfjs7qh10wh" path="res://pictures/фс.png" id="13_xdqnq"] +[ext_resource type="Texture2D" uid="uid://c8gfddmqnws7v" path="res://pictures/фс_pressed.png" id="14_0dei1"] [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"] @@ -64,12 +70,16 @@ bg_color = Color(0.141176, 0.101961, 0.141176, 0.8) [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ls6vm"] [sub_resource type="Theme" id="Theme_k5ur4"] +Button/colors/font_color = Color(1, 1, 0.941176, 1) +Button/colors/font_focus_color = Color(1, 1, 0.941176, 1) Button/styles/focus = null 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/colors/font_color = Color(1, 1, 0.941176, 1) +OptionButton/colors/font_focus_color = Color(1, 1, 0.941176, 1) OptionButton/font_sizes/font_size = 17 OptionButton/styles/focus = SubResource("StyleBoxFlat_gooip") OptionButton/styles/hover = SubResource("StyleBoxFlat_148rs") @@ -238,7 +248,7 @@ offset_right = 222.0 offset_bottom = 1112.0 theme_override_styles/panel = SubResource("StyleBoxFlat_4qm5k") -[node name="select_prd" type="Button" parent="Background/switch_panel"] +[node name="select_prd" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 128.0 @@ -252,7 +262,7 @@ toggle_mode = true button_pressed = true text = "ПРД" -[node name="select_control" type="Button" parent="Background/switch_panel"] +[node name="select_control" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 168.0 @@ -265,7 +275,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") toggle_mode = true text = "КОНТРОЛЬ" -[node name="select_ems_g" type="Button" parent="Background/switch_panel"] +[node name="select_ems_g" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 208.0 @@ -278,7 +288,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") toggle_mode = true text = "ЭМС Г" -[node name="select_fs" type="Button" parent="Background/switch_panel"] +[node name="select_fs" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 249.0 @@ -291,7 +301,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") toggle_mode = true text = "Модуль ФС" -[node name="save_config" type="Button" parent="Background/switch_panel"] +[node name="save_config" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 840.0 @@ -303,7 +313,7 @@ theme_override_font_sizes/font_size = 14 theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") text = "Сохранить" -[node name="load_config" type="Button" parent="Background/switch_panel"] +[node name="load_config" type="Button" parent="Background/switch_panel" groups=["select_grp"]] layout_mode = 0 offset_left = 16.0 offset_top = 880.0 @@ -316,65 +326,90 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") text = "Загрузить" [node name="burgerButton" type="TextureButton" parent="Background/switch_panel"] -self_modulate = Color(1, 1, 0.941, 0.85) +self_modulate = Color(1, 1, 0.941176, 1) layout_mode = 0 -offset_left = 183.0 +offset_left = 188.0 offset_top = 28.0 -offset_right = 215.0 +offset_right = 220.0 offset_bottom = 60.0 mouse_default_cursor_shape = 2 toggle_mode = true -texture_normal = ExtResource("5_eoogc") -texture_pressed = ExtResource("6_bqc7t") +texture_normal = ExtResource("6_bqc7t") +texture_pressed = ExtResource("5_eoogc") ignore_texture_size = true stretch_mode = 0 metadata/_edit_lock_ = true -[node name="texture_prd" type="TextureButton" parent="Background/switch_panel"] -visible = false +[node name="texture_prd" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]] self_modulate = Color(1, 1, 0.941, 0.85) layout_mode = 0 -offset_left = 176.0 +offset_left = -159.0 offset_top = 122.0 -offset_right = 224.0 +offset_right = -118.0 offset_bottom = 162.0 mouse_default_cursor_shape = 2 toggle_mode = true -texture_normal = ExtResource("7_0pknj") +button_pressed = true +texture_normal = ExtResource("13_xdqnq") +texture_pressed = ExtResource("14_0dei1") ignore_texture_size = true stretch_mode = 0 -metadata/_edit_lock_ = true -[node name="texture_control" type="TextureButton" parent="Background/switch_panel"] -visible = false +[node name="texture_control" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]] self_modulate = Color(1, 1, 0.941, 0.85) layout_mode = 0 -offset_left = 180.0 +offset_left = -155.0 offset_top = 184.0 -offset_right = 220.0 +offset_right = -115.0 offset_bottom = 224.0 mouse_default_cursor_shape = 2 toggle_mode = true texture_normal = ExtResource("8_qqoau") +texture_pressed = ExtResource("10_t2sq8") ignore_texture_size = true stretch_mode = 0 -metadata/_edit_lock_ = true -[node name="side_panel" type="ColorRect" parent="Background"] -visible = false +[node name="texture_ems_g" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]] layout_mode = 0 -offset_right = 216.0 -offset_bottom = 1279.0 -color = Color(0.6, 0.5, 0.6, 0.9) -metadata/_edit_lock_ = true +offset_left = -155.0 +offset_top = 240.0 +offset_right = -115.0 +offset_bottom = 280.0 +mouse_default_cursor_shape = 2 +toggle_mode = true +texture_normal = ExtResource("11_qqb3s") +texture_pressed = ExtResource("12_u035s") +ignore_texture_size = true +stretch_mode = 0 + +[node name="texture_fs" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]] +self_modulate = Color(1, 1, 0.941, 0.85) +layout_mode = 0 +offset_left = -155.0 +offset_top = 304.0 +offset_right = -115.0 +offset_bottom = 344.0 +mouse_default_cursor_shape = 2 +toggle_mode = true +texture_normal = ExtResource("7_0pknj") +texture_pressed = ExtResource("8_iuer1") +ignore_texture_size = true +stretch_mode = 0 + +[node name="lbl_commit" type="Label" parent="Background"] +layout_mode = 0 +offset_left = 1482.0 +offset_top = 10.0 +offset_right = 1658.0 +offset_bottom = 34.0 +theme_override_colors/font_color = Color(1, 1, 0.941176, 1) [node name="ISA" type="Label" parent="."] -offset_left = 225.0 +offset_left = 273.0 offset_top = 11.0 -offset_right = 409.0 +offset_right = 457.0 offset_bottom = 48.0 autowrap_mode = 3 -metadata/_edit_lock_ = true [node name="read_isa" type="Button" parent="."] visible = false @@ -414,9 +449,9 @@ metadata/_edit_lock_ = true [node name="body_grid" type="GridContainer" parent="TabContainer/PRD"] layout_mode = 0 offset_left = 272.0 -offset_top = 12.0 +offset_top = -20.0 offset_right = 1680.0 -offset_bottom = 920.0 +offset_bottom = 888.0 [node name="litera_2_4_6" type="GridContainer" parent="TabContainer/PRD/body_grid"] clip_contents = true @@ -602,9 +637,9 @@ metadata/_edit_lock_ = true [node name="select_dev" type="GridContainer" parent="TabContainer/PRD"] layout_mode = 2 offset_left = 48.0 -offset_top = 16.0 +offset_top = -16.0 offset_right = 48.0 -offset_bottom = 16.0 +offset_bottom = -16.0 script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) @@ -1094,7 +1129,7 @@ offset_left = 870.0 offset_top = 27.0 offset_right = 1664.0 offset_bottom = 898.0 -theme_override_colors/font_color = Color(1, 1, 0.815686, 1) +theme_override_colors/font_color = Color(1, 1, 0.941176, 1) theme_override_font_sizes/font_size = 17 theme_override_styles/normal = SubResource("StyleBoxFlat_13x31") placeholder_text = "Ожидание контроля ..." @@ -1259,6 +1294,8 @@ text = "Сохранить все настройки" [connection signal="toggled" from="Background/switch_panel/burgerButton" to="." method="_on_burger_button"] [connection signal="pressed" from="Background/switch_panel/texture_prd" to="." method="_on_prd_select"] [connection signal="pressed" from="Background/switch_panel/texture_control" to="." method="_on_control_button"] +[connection signal="pressed" from="Background/switch_panel/texture_ems_g" to="." method="_on_emsg_select"] +[connection signal="pressed" from="Background/switch_panel/texture_fs" to="." method="_on_mfs_select"] [connection signal="pressed" from="read_isa" to="." method="_on_read_isa_pressed"] [connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/con" to="TabContainer/Modul_fs" method="_on_start"] [connection signal="text_submitted" from="TabContainer/Modul_fs/manage_panel/addres_fs" to="TabContainer/Modul_fs" method="_on_addres_fs"] diff --git a/find_fs.bat b/find_fs.bat new file mode 100644 index 0000000..95c2f4e --- /dev/null +++ b/find_fs.bat @@ -0,0 +1,15 @@ +@echo off +setlocal enabledelayedexpansion + +for /l %%i in (2,1,100) do ( + set "ip=10.1.2.%%i" + ping -n 1 !ip! > nul + if !errorlevel! equ 0 ( + echo !ip! is reachable + ) else ( + echo !ip! is not reachable + ) +) + +endlocal +pause \ No newline at end of file diff --git a/pictures/prd.png b/pictures/prd.png new file mode 100644 index 0000000..b51fcd8 Binary files /dev/null and b/pictures/prd.png differ diff --git a/pictures/prd.png.import b/pictures/prd.png.import new file mode 100644 index 0000000..a5ffec6 --- /dev/null +++ b/pictures/prd.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgq164n4uroax" +path="res://.godot/imported/prd.png-40563ea8ddb2aa731ad38ab1599fed86.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/prd.png" +dest_files=["res://.godot/imported/prd.png-40563ea8ddb2aa731ad38ab1599fed86.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/prd_pressed.png b/pictures/prd_pressed.png new file mode 100644 index 0000000..c8e1ce7 Binary files /dev/null and b/pictures/prd_pressed.png differ diff --git a/pictures/prd_pressed.png.import b/pictures/prd_pressed.png.import new file mode 100644 index 0000000..3547aa4 --- /dev/null +++ b/pictures/prd_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3nmheji5toxx" +path="res://.godot/imported/prd_pressed.png-879382152af620e1ce028aadab4dec70.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/prd_pressed.png" +dest_files=["res://.godot/imported/prd_pressed.png-879382152af620e1ce028aadab4dec70.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..6f91b83 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..321a1fb --- /dev/null +++ b/pictures/загр.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c12e2lcqf6r3o" +path="res://.godot/imported/загр.png-921e28888952c9609cca618d1e4ab8e2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/загр.png" +dest_files=["res://.godot/imported/загр.png-921e28888952c9609cca618d1e4ab8e2.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/загр_pressed.png b/pictures/загр_pressed.png new file mode 100644 index 0000000..b654e1d Binary files /dev/null and b/pictures/загр_pressed.png differ diff --git a/pictures/загр_pressed.png.import b/pictures/загр_pressed.png.import new file mode 100644 index 0000000..7b97a57 --- /dev/null +++ b/pictures/загр_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gjqcmfxb4vo4" +path="res://.godot/imported/загр_pressed.png-d2a80d834fbd5e59d0484a325b4e6acd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/загр_pressed.png" +dest_files=["res://.godot/imported/загр_pressed.png-d2a80d834fbd5e59d0484a325b4e6acd.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 index 9d205a8..a6b6c44 100644 Binary files a/pictures/контролер.png and b/pictures/контролер.png differ diff --git a/pictures/контролер_pressed.png b/pictures/контролер_pressed.png new file mode 100644 index 0000000..673c507 Binary files /dev/null and b/pictures/контролер_pressed.png differ diff --git a/pictures/контролер_pressed.png.import b/pictures/контролер_pressed.png.import new file mode 100644 index 0000000..d983a79 --- /dev/null +++ b/pictures/контролер_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://t3bxox5ehcg8" +path="res://.godot/imported/контролер_pressed.png-e994600b49515943f49b87fa72b948bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/контролер_pressed.png" +dest_files=["res://.godot/imported/контролер_pressed.png-e994600b49515943f49b87fa72b948bb.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/серпимоло_pressed.png b/pictures/серпимоло_pressed.png new file mode 100644 index 0000000..11a7219 Binary files /dev/null and b/pictures/серпимоло_pressed.png differ diff --git a/pictures/серпимоло_pressed.png.import b/pictures/серпимоло_pressed.png.import new file mode 100644 index 0000000..30e06a4 --- /dev/null +++ b/pictures/серпимоло_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ysxmr26y0i8v" +path="res://.godot/imported/серпимоло_pressed.png-5d87756cb17f00d3ef0755199d7df09d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/серпимоло_pressed.png" +dest_files=["res://.godot/imported/серпимоло_pressed.png-5d87756cb17f00d3ef0755199d7df09d.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..dc8bd81 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..42bde43 --- /dev/null +++ b/pictures/сохр.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cyuv78v6vem55" +path="res://.godot/imported/сохр.png-2d66d261d33f25b70df2a6d52077b4b2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/сохр.png" +dest_files=["res://.godot/imported/сохр.png-2d66d261d33f25b70df2a6d52077b4b2.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/сохр_pressed.png b/pictures/сохр_pressed.png new file mode 100644 index 0000000..4fbb5a0 Binary files /dev/null and b/pictures/сохр_pressed.png differ diff --git a/pictures/сохр_pressed.png.import b/pictures/сохр_pressed.png.import new file mode 100644 index 0000000..7f518a5 --- /dev/null +++ b/pictures/сохр_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk2cbbj31mq2x" +path="res://.godot/imported/сохр_pressed.png-376858cc3f615cfdbe027ec38a5ff8a4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/сохр_pressed.png" +dest_files=["res://.godot/imported/сохр_pressed.png-376858cc3f615cfdbe027ec38a5ff8a4.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..d1c2e38 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..e118e8b --- /dev/null +++ b/pictures/фс.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8jfjs7qh10wh" +path="res://.godot/imported/фс.png-e94c89624d452a77e5536bbffe9608cc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/фс.png" +dest_files=["res://.godot/imported/фс.png-e94c89624d452a77e5536bbffe9608cc.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/фс_pressed.png b/pictures/фс_pressed.png new file mode 100644 index 0000000..23afe1b Binary files /dev/null and b/pictures/фс_pressed.png differ diff --git a/pictures/фс_pressed.png.import b/pictures/фс_pressed.png.import new file mode 100644 index 0000000..4337ce1 --- /dev/null +++ b/pictures/фс_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8gfddmqnws7v" +path="res://.godot/imported/фс_pressed.png-5a4d49d4fe6e154d52a2dc454a7ed89a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/фс_pressed.png" +dest_files=["res://.godot/imported/фс_pressed.png-5a4d49d4fe6e154d52a2dc454a7ed89a.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..7ba3982 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..8e952bb --- /dev/null +++ b/pictures/эмс.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dpes8l540mgrd" +path="res://.godot/imported/эмс.png-92e406516369f7639c5280f1b1940884.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/эмс.png" +dest_files=["res://.godot/imported/эмс.png-92e406516369f7639c5280f1b1940884.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/эмс_pressed.png b/pictures/эмс_pressed.png new file mode 100644 index 0000000..b6589f9 Binary files /dev/null and b/pictures/эмс_pressed.png differ diff --git a/pictures/эмс_pressed.png.import b/pictures/эмс_pressed.png.import new file mode 100644 index 0000000..5335807 --- /dev/null +++ b/pictures/эмс_pressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bcq6o4fuxh88b" +path="res://.godot/imported/эмс_pressed.png-9e20f07ea47c589234fa3af323cd13b5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pictures/эмс_pressed.png" +dest_files=["res://.godot/imported/эмс_pressed.png-9e20f07ea47c589234fa3af323cd13b5.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/project.godot b/project.godot index 75164d6..dcf7aef 100644 --- a/project.godot +++ b/project.godot @@ -21,6 +21,7 @@ Constants="*res://scripts/constants.gd" Yau07="*res://scripts/yau07.gd" Fs="*res://scripts/FS.gd" Network="*res://scripts/network.gd" +commit="*res://commit.gd" [debug] @@ -29,7 +30,7 @@ gdscript/warnings/unused_signal=0 [display] window/size/viewport_width=1910 -window/size/viewport_height=1070 +window/size/viewport_height=1000 window/size/initial_position_type=0 [editor] diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 481e184..81fbdc5 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -5,6 +5,7 @@ signal read_ems_g_finish() var node_select1: Node var node_select2: Node +var node_select3: Node var node_select_yau_07b: Node var node_select_yau_07b_2: Node var node_select_fs_1: Node @@ -20,6 +21,8 @@ const need_port: Array = [0x122, 0x124, 0x126, 0x128, 0x12A] func _ready() -> void: + $Background/lbl_commit.text = commit.VCS_HEAD + # Считывание аргументов с консоли (путь сохранения) var args = OS.get_cmdline_user_args() for i in range(args.size()): @@ -27,15 +30,20 @@ func _ready() -> void: save_path = args[i + 1] break - # Таблица УКП-1 (Температура, Мощность) + # Таблица 1 УКП-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]) - # Таблица УКП-2 (Температура, Мощность) + # Таблица 2 УКП-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]) + + # Таблица 3 УКП-1 (Температура, Мощность) + node_select3 = $TabContainer/PRD/body_grid/litera_1/table_ukp_1 + draw_tabl(node_select3, [[preload("res://table/header.tscn"), preload("res://table/header.tscn")], [preload("res://table/node.tscn"), preload("res://table/node.tscn")]], [[preload("res://table/header.tscn"), preload("res://table/header.tscn")], [preload("res://table/node.tscn"), preload("res://table/node.tscn")]].size()) + node_select3.set_columns_min_size([120, 120]) # Таблица ЯУ-07б-1 node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control @@ -123,16 +131,26 @@ func _ready() -> void: 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) + node_select_yau_07b_3.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) + + + node_select_yau_07b_3.get_node2(1, 3).add_item(' 15°') + ## Заполненение списка аттенюатора 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) + + ## Заполненение списка аттенюатора + for key in Constants.ATT_DICT_correct: + node_select_yau_07b_3.get_node2(1, 4).add_item(key) ## Yau-07b 1 node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret_2')) @@ -180,6 +198,10 @@ func add_signs_scene(): # Таблица УКП-2 node_select2.set_node_text(0, 0, 'Мощность') node_select2.set_node_text(1, 0, 'Температура') + + # Таблица УКП-1 + node_select3.set_node_text(0, 0, 'Мощность') + node_select3.set_node_text(1, 0, 'Температура') var item_place_yau_07: int = 9 var item_place_fs_1: int = 18 @@ -435,7 +457,7 @@ func _on_data_received(data_from_yau_07): 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 + var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP + 3 node_select1.set_node_text(1, i+1, '%d °С' % TMP) for i_pow in range(6): ## Мощность от УКП_2 @@ -446,34 +468,20 @@ func _on_data_received(data_from_yau_07): 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) - var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_2) * Constants.TEMP + var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_2) * Constants.TEMP + 3 node_select2.set_node_text(1, row+1, '%d °С' % TMP) + + if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * 7: + var power_ukp_3 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * 7) + var temperature_ukp_3 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * 7) + var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_3) * Constants.TEMP + 3 + node_select3.set_node_text(0, 1, '%d' % power_ukp_3) + node_select3.set_node_text(1,1, '%d °С' % TMP) func set_frame(node: Node, val: int): node.set_frame(val) -func _on_prd_select() -> void: - emit_signal('read_ems_g_start') - set_tab_and_buttons(0, 'select_prd') - Network.get_gen_state_1() - Network.get_gen_state_2() - - -func _on_control_button() -> void: - $TabContainer/ControlPanel._on_start_super_control() - set_tab_and_buttons(1, 'select_control') - - -func _on_emsg_select() -> void: - emit_signal('read_ems_g_start') - set_tab_and_buttons(2, 'select_ems_g') - - -func _on_mfs_select() -> void: - set_tab_and_buttons(3, 'select_fs') - - func _on_save_config(): var da = DirAccess.open(save_path) var base_path = save_path + "save//" @@ -558,15 +566,6 @@ func _on_load_config(): file_dialog.popup_centered() -func set_tab_and_buttons(tab_index: int, button_name: String) -> void: - $TabContainer.current_tab = tab_index - var switch_panel = $Background/switch_panel - - for button in switch_panel.get_children(): - if button is Button: - button.button_pressed = (button.name == button_name) - - func on_mode_select(intem_from_sector: int) -> void: var node_select_device: GDTable = $TabContainer/PRD/select_dev var get_select_device = node_select_device.get_node2(1, 0) @@ -813,22 +812,69 @@ func _on_modul_fs_2(modulation_select_2) -> void: Network.set_configure_gen_msk_2() +## Switch panel +func _on_prd_select() -> void: + emit_signal('read_ems_g_start') + set_tab_and_buttons(0, 'select_prd', 'texture_prd') + Network.get_gen_state_1() + Network.get_gen_state_2() + + +func _on_control_button() -> void: + $TabContainer/ControlPanel._on_start_super_control() + set_tab_and_buttons(1, 'select_control', 'texture_control') + + +func _on_emsg_select() -> void: + emit_signal('read_ems_g_start') + set_tab_and_buttons(2, 'select_ems_g', 'texture_ems_g') + + +func _on_mfs_select() -> void: + set_tab_and_buttons(3, 'select_fs', 'texture_fs') + + func _on_burger_button(toggled_on: bool) -> void: - $Background/switch_panel/texture_prd.visible = toggled_on - $Background/switch_panel/select_prd.visible = not toggled_on - $Background/switch_panel/texture_control.visible = toggled_on - $Background/switch_panel/select_control.visible = not toggled_on - $Background/switch_panel/select_ems_g.visible = not toggled_on - $Background/switch_panel/select_fs.visible = not toggled_on - $Background/switch_panel/save_config.visible = not toggled_on - $Background/switch_panel/load_config.visible = not toggled_on + var txt_grp: Array = get_tree().get_nodes_in_group('burger_gr') + var select_grp: Array = get_tree().get_nodes_in_group('select_grp') + var tween: Tween = get_tree().create_tween() + var pos_on_select: int = 17 + var pos_on_txt: int = 15 + var temp = txt_grp + var tmp_pos = pos_on_txt + + var pos_off: int = -300 + + if toggled_on: + temp = select_grp + + for btn in temp: + tween.tween_property(btn, "global_position", Vector2(pos_off, btn.global_position.y), 0.1).set_trans(Tween.TRANS_QUINT).set_ease(Tween.EASE_OUT) var panel = $Background/switch_panel if toggled_on: # Анимация вправо - var tween = get_tree().create_tween() - tween.tween_property(panel, "global_position", Vector2(-170, panel.global_position.y), 0.5).set_trans(Tween.TRANS_QUINT).set_ease(Tween.EASE_OUT) + tween.tween_property(panel, "global_position", Vector2(-170, panel.global_position.y), 0.3).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) else: # Анимация влево - var tween = get_tree().create_tween() - tween.tween_property(panel, "global_position", Vector2(0, panel.global_position.y), 0.5).set_trans(Tween.TRANS_QUINT).set_ease(Tween.EASE_OUT) + tween.tween_property(panel, "global_position", Vector2(0, panel.global_position.y), 0.3).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) + + if toggled_on: + temp = txt_grp + tmp_pos = pos_on_txt + else: + temp = select_grp + tmp_pos = pos_on_select + + for btn in temp: + tween.tween_property(btn, "global_position", Vector2(tmp_pos, btn.global_position.y), 0.1).set_trans(Tween.TRANS_QUINT).set_ease(Tween.EASE_OUT) + + +func set_tab_and_buttons(tab_index: int, button_name: String, txt_button_name: String) -> void: + $TabContainer.current_tab = tab_index + var switch_panel = $Background/switch_panel + + for button in switch_panel.get_children(): + if button is Button or TextureButton: + if button.name != 'burgerButton': + button.button_pressed = (button.name == button_name or button.name == txt_button_name) diff --git a/scripts/constants.gd b/scripts/constants.gd index 964169e..9ae72d7 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -126,6 +126,17 @@ const ATT_DICT: Array = [ ' 10 dB', ' 10.5 dB', ] +const ATT_DICT_correct: Array = [ + ' 0 dB', + ' 1 dB', + ' 4 dB', + ' 5 dB', + ' 16 dB', + ' 17 dB', + ' 20 dB', + ' 21 dB', +] + const SIGNS: Dictionary = { MODE.PRD_H: [ # ЯУ-07б-1 diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index b4fb285..c9c8ed4 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -316,6 +316,7 @@ func _on_data_fs(fs_data:PackedByteArray, fs_name: String): func _on_yau_received(status_yau): + #print(Network.unit.status.decode_u8(Constants.DataIndices.DKM)) if flag_control_add: # Сбор урожая с УКП-1 var arr_power_ukp_1: Array = [] @@ -345,28 +346,29 @@ func _on_yau_received(status_yau): func _on_yau_feedback_receive(_status_yau): - ## Флаг для проверки настройки угла и аттенюации на двух литерах - if Network.unit.isa_ports.has(Constants.BASE_PORTS.UG+6) and Network.unit.isa_ports.has(Constants.BASE_PORTS.UG+8): - if Network.unit.isa_ports[Constants.BASE_PORTS.UG+6] == 58 and Network.unit.isa_ports[Constants.BASE_PORTS.UG+8] == 58: - flag_ug = true - else: - flag_ug = false - ## Флаг для проверки модуяции на высоком - if Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+8) and Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+2): - if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_2: - if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x8000 and (not flag_modul_on_1): - flag_modul_on_1 = true - logger.info('✅ Модуляция УМ (2, 4, 6) включена!') - elif Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x4000 and (flag_modul_on_1): - flag_modul_on_1 = false - logger.info('❌ Модуляция УМ (2, 4, 6) отключена!') - if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_3: - if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x8000 and (not flag_modul_on_2): - flag_modul_on_2 = true - logger.info('✅ Модуляция УМ (3, 5, 7) включена!') - elif Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x4000 and (flag_modul_on_2): - flag_modul_on_2 = false - logger.info('❌ Модуляция УМ (3, 5, 7) отключена!') + if logger: + ## Флаг для проверки настройки угла и аттенюации на двух литерах + if Network.unit.isa_ports.has(Constants.BASE_PORTS.UG+6) and Network.unit.isa_ports.has(Constants.BASE_PORTS.UG+8): + if Network.unit.isa_ports[Constants.BASE_PORTS.UG+6] == 58 and Network.unit.isa_ports[Constants.BASE_PORTS.UG+8] == 58: + flag_ug = true + else: + flag_ug = false + ## Флаг для проверки модуяции на высоком + if Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+8) and Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+2): + if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_2: + if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x8000 and (not flag_modul_on_1): + flag_modul_on_1 = true + logger.info('✅ Модуляция УМ (2, 4, 6) включена!') + elif Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x4000 and (flag_modul_on_1): + flag_modul_on_1 = false + logger.info('❌ Модуляция УМ (2, 4, 6) отключена!') + if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_3: + if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x8000 and (not flag_modul_on_2): + flag_modul_on_2 = true + logger.info('✅ Модуляция УМ (3, 5, 7) включена!') + elif Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+8] == 0x4000 and (flag_modul_on_2): + flag_modul_on_2 = false + logger.info('❌ Модуляция УМ (3, 5, 7) отключена!') func _on_start_super_control(): diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 61236c3..0dd39cf 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -186,6 +186,25 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT: emit_signal('signal_FS_is_ready', Constants.META.CI_5_OT_FS) status_fs_2 = frame_type + elif Constants.CURRENT_MODE == Constants.MODE.PRD_K: + if i == 8: # СИ_1_от_ФС + var CI_1_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(2).get_child(0).get_node2(1, 6).get_child(1) + set_frame(CI_1_FS, frame_type) + if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT: + emit_signal('signal_FS_is_ready', Constants.META.CI_7_OT_FS) + status_fs_2 = frame_type + if i == 13: # СИ_6_от_ФС + var CI_6_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(0).get_node2(1, 6).get_child(1) + set_frame(CI_6_FS, frame_type) + if frame_type == Constants.Frame.CONSTANT and status_fs_1 != Constants.Frame.CONSTANT: + emit_signal('signal_FS_is_ready', Constants.META.CI_6_OT_FS) + status_fs_1 = frame_type + if i == 14: # СИ_7_от_ФС + var CI_7_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(0).get_node2(1, 6).get_child(1) + set_frame(CI_7_FS, frame_type) + if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT: + emit_signal('signal_FS_is_ready', Constants.META.CI_7_OT_FS) + status_fs_2 = frame_type func set_frame(node: Node, val: int): node.set_frame(val)