Merge pull request 'from dev_maxim to master' (#4) from dev_maxim into master

Reviewed-on: http://gitea.srez.local:3000/Maxim/PRD-TU-MP550/pulls/4
This commit is contained in:
2025-02-10 13:32:07 +03:00
25 changed files with 1898 additions and 817 deletions

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

1003
PRD57EF.tmp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=50 format=3 uid="uid://cvor2jm4xk3ha"]
[gd_scene load_steps=49 format=3 uid="uid://cvor2jm4xk3ha"]
[ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"]
[ext_resource type="Texture2D" uid="uid://cdxdluvyb5uei" path="res://table/on.png" id="2_dv7xx"]
@@ -13,7 +13,6 @@
[ext_resource type="Script" path="res://scripts/ems_g.gd" id="9_g1wia"]
[ext_resource type="Shader" path="res://load.gdshader" id="10_lf1xh"]
[ext_resource type="PackedScene" uid="uid://bdb0bhfu7366l" path="res://kasseta-fs-kd.tscn" id="10_tdh2s"]
[ext_resource type="PackedScene" uid="uid://bnlkbbn7b4a3k" path="res://table/элемент-эмс.tscn" id="11_d60jk"]
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"]
[ext_resource type="Script" path="res://scripts/modul_fs.gd" id="15_b4pr1"]
@@ -150,8 +149,8 @@ CheckBox/font_sizes/font_size = 14
script = ExtResource("1_v273n")
[node name="Background" type="ColorRect" parent="."]
offset_right = 1941.0
offset_bottom = 988.0
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
@@ -233,28 +232,13 @@ 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 = 1853.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
@@ -262,12 +246,13 @@ 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
offset_bottom = 936.0
theme = SubResource("Theme_k5ur4")
theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157)
theme_override_colors/font_selected_color = Color(0, 0, 0, 0)
@@ -281,6 +266,7 @@ 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
@@ -329,12 +315,14 @@ 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(914, 5)
scale = Vector2(0.247968, 0.234167)
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)
@@ -386,12 +374,14 @@ 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(914, -6)
scale = Vector2(0.247968, 0.234167)
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)
@@ -431,10 +421,10 @@ metadata/_edit_lock_ = true
[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 4.0
offset_top = 21.0
offset_right = 624.0
offset_bottom = 52.0
offset_left = 45.0
offset_top = -37.0
offset_right = 665.0
offset_bottom = -6.0
theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора ПРД-Н"
horizontal_alignment = 1
@@ -443,77 +433,64 @@ vertical_alignment = 1
[node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 199.0
offset_top = 103.0
offset_top = 10.0
offset_right = 516.0
offset_bottom = 293.0
offset_bottom = 200.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
[node name="IP5_25" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 9.0
offset_top = 34.0
offset_right = 59.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "ИП-25"
fname = "ИП5-25"
rname = "A24"
metadata/_edit_lock_ = true
[node name="ref_A30" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
[node name="ay07" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 59.0
offset_top = 34.0
offset_right = 109.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "ЯУ-07"
rname = "A30"
metadata/_edit_lock_ = true
[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
[node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 109.0
offset_top = 34.0
offset_right = 159.0
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")]
[node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 159.0
offset_top = 34.0
offset_right = 209.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "УГ"
rname = "A27"
metadata/_edit_lock_ = true
[node name="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")]
[node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 259.0
offset_top = 34.0
offset_right = 309.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "УКП-2"
rname = "A29"
metadata/_edit_lock_ = true
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_y5"]
[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")]
offset_left = 210.0
offset_top = 35.0
offset_right = 260.0
offset_bottom = 185.0
fname = "УКП-1"
rname = "A28"
[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_y5"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
@@ -524,15 +501,15 @@ text = "Кассета У5"
horizontal_alignment = 1
vertical_alignment = 1
[node name="soc_fs-nkvd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")]
[node name="Kasseta_FS" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")]
layout_mode = 0
offset_left = 198.0
offset_top = 311.0
offset_right = 516.0
offset_bottom = 538.0
offset_left = 200.0
offset_top = 201.0
offset_right = 518.0
offset_bottom = 420.0
script = null
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_fs-nkvd"]
[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/Kasseta_FS"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
@@ -542,115 +519,119 @@ 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")]
[node name="ref_A3" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 109.0
offset_top = 68.0
offset_top = 41.0
offset_right = 159.0
offset_bottom = 218.0
textures = Array[Texture]([])
fname = "ФС-2"
offset_bottom = 211.0
self_size = Vector2i(50, 170)
fname = "БЛОК ФС-2"
rname = "A3"
metadata/_edit_lock_ = true
[node name="ref_A1" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")]
[node name="ref_A1" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 159.0
offset_top = 68.0
offset_top = 41.0
offset_right = 209.0
offset_bottom = 218.0
textures = Array[Texture]([])
fname = "Модуль"
offset_bottom = 211.0
self_size = Vector2i(50, 170)
fname = "Модуль ФС"
rname = "A1"
metadata/_edit_lock_ = true
[node name="ref_A2" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")]
[node name="ref_A2" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 209.0
offset_top = 68.0
offset_top = 41.0
offset_right = 259.0
offset_bottom = 217.0
textures = Array[Texture]([])
self_size = Vector2i(50, 149)
fname = "Модуль"
offset_bottom = 211.0
self_size = Vector2i(50, 170)
fname = "Модуль ФС"
rname = "A2"
metadata/_edit_lock_ = true
[node name="ref_A4" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")]
[node name="ref_A4" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 259.0
offset_top = 68.0
offset_top = 41.0
offset_right = 309.0
offset_bottom = 218.0
textures = Array[Texture]([])
fname = "ФС-3"
offset_bottom = 211.0
self_size = Vector2i(50, 170)
fname = "БЛОК ФС-3"
rname = "A4"
metadata/_edit_lock_ = true
[node name="Block_FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 12.0
offset_top = 40.0
offset_right = 62.0
offset_bottom = 210.0
self_size = Vector2i(50, 170)
fname = "БЛОК ФС-1"
rname = "A4"
[node name="FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")]
offset_left = 61.0
offset_top = 41.0
offset_right = 111.0
offset_bottom = 211.0
self_size = Vector2i(50, 170)
fname = "Модуль ФС"
rname = "A1"
[node name="soc_P1" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 96.0
offset_top = 560.0
offset_right = 516.0
offset_bottom = 776.0
offset_left = 259.0
offset_top = 427.0
offset_right = 447.0
offset_bottom = 643.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_P1"]
[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P1"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
offset_top = 8.0
offset_right = 409.0
offset_right = 181.0
offset_bottom = 33.0
text = "Кассета П-1"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_lock_ = true
[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 40.0
offset_top = -206.0
offset_right = 90.0
offset_bottom = -32.0
textures = Array[Texture]([])
[node name="MAA_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = -64.0
offset_top = 37.0
offset_right = -14.0
offset_bottom = 211.0
self_size = Vector2i(50, 174)
fname = "МАА2000"
rname = "А22"
[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]([])
[node name="MAA_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 203.0
offset_top = 36.0
offset_right = 253.0
offset_bottom = 210.0
self_size = Vector2i(50, 174)
fname = "МАА2000"
rname = "А23"
[node name="ref_A25" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 109.0
offset_top = 34.0
offset_right = 159.0
offset_bottom = 208.0
textures = Array[Texture]([])
[node name="IP9_50_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 129.0
offset_top = 37.0
offset_right = 179.0
offset_bottom = 211.0
self_size = Vector2i(50, 174)
metadata/_edit_lock_ = true
fname = "ИП9-50"
rname = "А19"
[node name="ref_A26" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 159.0
offset_top = 34.0
offset_right = 209.0
offset_bottom = 208.0
textures = Array[Texture]([])
[node name="IP9_50_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 73.0
offset_top = 37.0
offset_right = 123.0
offset_bottom = 211.0
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
fname = "ИП9-50"
rname = "А20"
[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
visible = false
@@ -660,7 +641,8 @@ offset_right = 309.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
metadata/_edit_lock_ = true
fname = "ИП12-50"
rname = "A21"
[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
visible = false
@@ -670,121 +652,66 @@ offset_right = 359.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП9-50"
rname = "А22"
metadata/_edit_lock_ = true
[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"]
[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
offset_left = 16.0
offset_top = 36.0
offset_right = 66.0
offset_bottom = 210.0
self_size = Vector2i(50, 174)
fname = "ИП12-50"
rname = "А21"
[node name="soc_P2" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 536.0
offset_top = 550.0
offset_right = 1055.0
offset_bottom = 777.0
offset_left = 278.0
offset_top = 645.0
offset_right = 432.0
offset_bottom = 861.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/Signal_EMS_G"]
[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P2"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
offset_left = 8.0
offset_top = 8.0
offset_right = 508.0
offset_right = 142.0
offset_bottom = 33.0
text = "ЭМС-Г"
text = "Кассета П-2"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_lock_ = true
[node name="ref_A22" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 9.0
offset_top = 38.0
offset_right = 59.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")]
offset_left = 81.0
offset_top = 36.0
offset_right = 131.0
offset_bottom = 210.0
self_size = Vector2i(50, 174)
fname = "ИП12-50"
rname = "A25"
[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")]
offset_left = 24.0
offset_top = 36.0
offset_right = 74.0
offset_bottom = 210.0
self_size = Vector2i(50, 174)
fname = "ИП9-50"
rname = "A22"
metadata/_edit_lock_ = true
[node name="ref_A23" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 59.0
offset_top = 38.0
offset_right = 109.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A23"
metadata/_edit_lock_ = true
[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 109.0
offset_top = 38.0
offset_right = 159.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A26"
metadata/_edit_lock_ = true
[node name="ref_A27" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 159.0
offset_top = 38.0
offset_right = 209.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A27"
metadata/_edit_lock_ = true
[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 209.0
offset_top = 38.0
offset_right = 259.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A28"
metadata/_edit_lock_ = true
[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 259.0
offset_top = 38.0
offset_right = 309.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A29"
metadata/_edit_lock_ = true
[node name="ref_A31" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 309.0
offset_top = 38.0
offset_right = 359.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "УМ2"
metadata/_edit_lock_ = true
[node name="ref_A32" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 359.0
offset_top = 38.0
offset_right = 409.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "УМ3"
metadata/_edit_lock_ = true
[node name="ref_A33" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 409.0
offset_top = 38.0
offset_right = 459.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A33"
metadata/_edit_lock_ = true
[node name="ref_A34" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 459.0
offset_top = 38.0
offset_right = 509.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
rname = "A33"
metadata/_edit_lock_ = true
[node name="device" type="Label" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 1451.0
offset_top = 792.0
offset_right = 1616.0
offset_bottom = 847.0
[node name="EMS_G" type="Panel" parent="TabContainer"]
visible = false
@@ -796,34 +723,34 @@ metadata/_edit_lock_ = true
[node name="table1" type="GridContainer" parent="TabContainer/EMS_G"]
layout_mode = 2
offset_left = 27.0
offset_top = 148.0
offset_right = 27.0
offset_bottom = 148.0
offset_left = 35.0
offset_top = 60.0
offset_right = 35.0
offset_bottom = 60.0
script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"]
layout_mode = 0
offset_left = 27.0
offset_top = 148.0
offset_right = 1596.0
offset_bottom = 717.0
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(786, 284.5)
scale = Vector2(24.4688, 8.89063)
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 = 277.0
offset_top = 341.0
offset_right = 849.0
offset_bottom = 316.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

BIN
Web.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 18 KiB

1
others-Н1 Normal file
View File

@@ -0,0 +1 @@
[]

View File

@@ -18,9 +18,9 @@ config/icon="res://icon.svg"
[autoload]
Constants="*res://scripts/constants.gd"
Fs="*res://scripts/FS.gd"
Yau07="*res://scripts/yau07.gd"
Network="*res://scripts/network.gd"
Fs="*res://scripts/FS.gd"
[debug]

View File

@@ -66,32 +66,33 @@ class FGOS:
0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D]
const INDEX_SIZE: int = 0xC
const GROUP_OFFSET: int = 0x0
const CMD_OFFSET: int = 0x1
const COUNTER_OFFSET: int = 0x4
const PAYLOAD_OFFSET: int = 0x8
const INIT: int = 0xFFFFFFFF
const FINAL_XOR_VALUE: int = 0x00000000
signal line_changed(unit: FGOS) ## Вызывается когда меняется состояние связи с ячейкой
var counter: int = 0
var online: bool = false ## Состояние связи с ячейкой
var status: = PackedByteArray() ## Поле "состояние прибора"
#var fgos_data = {} ## Результат выполнения команды "читать порт"
func crc32(data: PackedByteArray) -> int:
var crc = Constants.INIT
var crc = INIT
for byte in data:
var index = (crc ^ byte) & 0xFF
crc = (Constants.CRC32_TABLE[index] ^ (crc >> 8)) & 0xFFFFFFFF
crc = (CRC32_TABLE[index] ^ (crc >> 8)) & 0xFFFFFFFF
# Возвращаем только последние 4 байта в обратном порядке
var final_crc = crc ^ Constants.FINAL_XOR_VALUE
var final_crc = crc ^ FINAL_XOR_VALUE
return final_crc
func _form_packet(group: int, cmd: int, index_size: int, data = null):
func _form_packet(group: int, cmd: int, index_size: int, counter: int, data = null):
var packet = PackedByteArray()
packet.resize(index_size)
packet.encode_u8(GROUP_OFFSET, group)
@@ -103,107 +104,85 @@ class FGOS:
return packet
func _send_packet(packet: PackedByteArray):
func send_packet_to(packet: PackedByteArray, client: StreamPeer):
var crc = crc32(packet)
packet.resize(packet.size() + 4)
packet.encode_u32(packet.size() - 4, crc)
Network.command_stack.append(packet)
func _parse(rx_data: PackedByteArray):
if not online:
online = true
emit_signal('line_changed', self)
var status_len = rx_data.decode_u16(6) # Длина массива байтового "состояние прибора"
var i: = 0
var len_rx_data: = rx_data.size()
status.resize(status_len)
while i < status_len:
var byte_i = i + 8
if byte_i < len_rx_data:
status[i] = rx_data[byte_i] # Массив байтовый "состояние прибора"
i += 1
emit_signal('data_received', self)
#var GRP = data.decode_u8(0x0)
#var CMD = data.decode_u8(0x1)
#match CMD:
#Constants.CMD.READ_CARRIER:
#if GRP == Constants.GROUP.BASE:
#$manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц'
#Constants.CMD.READ_ATT:
#if GRP == Constants.GROUP.RF:
#$manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB'
#Constants.CMD.READ_GEN_STATUS:
#if GRP == Constants.GROUP.GENERATOR:
#if data.decode_u32(0xC) == 0:
#$manage_panel/get_gen_status/status_ind.text = 'Включен'
#$manage_panel/get_gen_status/status_ind.modulate = Color.GREEN
#else:
#$manage_panel/get_gen_status/status_ind.text = 'Выключен'
#$manage_panel/get_gen_status/status_ind.modulate = Color.RED
#Constants.CMD.BASE_GET_CURRENT_TEMP:
#if GRP == Constants.GROUP.BASE:
#$temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C'
#$temp_2.text = str(data.decode_float(0x10)) + ' °C'
#$temp_3.text = str(data.decode_float(0x14)) + ' °C'
#$read.text = str(data.hex_encode())
if client == Network.client_fs_1:
Network.command_stack.append(packet)
else:
Network.command_stack_2.append(packet)
func send_fs_data(data_to_sand: PackedByteArray, client_fs: StreamPeer, peerstream_fs: PacketPeer):
if client_fs.get_status() == 2:
var peer = peerstream_fs.get_stream_peer()
if peer:
peer.put_data(data_to_sand)
#func _parse(rx_data: PackedByteArray):
#if not online:
#online = true
#emit_signal('line_changed', self)
#
#var status_len = rx_data.decode_u16(6) # Длина массива байтового "состояние прибора"
#
#var i: = 0
#var len_rx_data: = rx_data.size()
#status.resize(status_len)
#while i < status_len:
#var byte_i = i + 8
#if byte_i < len_rx_data:
#status[i] = rx_data[byte_i] # Массив байтовый "состояние прибора"
#i += 1
#emit_signal('data_received', self)
func start_session():
counter = 0
var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.START_SESSION, 0xC)
_send_packet(packet)
get_gen_state()
get_att_batch()
get_carrier()
func start_session(counter: int, client: StreamPeer):
var packet = _form_packet(GROUP.BASE, CmdCode.START_SESSION, INDEX_SIZE, counter)
send_packet_to(packet, client)
func set_gen_state(button_state: bool):
func set_gen_state(button_state: bool, counter: int, client: StreamPeer):
var index_size = 0x1C
var packet = _form_packet(Constants.GROUP.GENERATOR, Constants.CMD.SET_GEN_STATUS, index_size)
var packet = _form_packet(GROUP.GENERATOR, CmdCode.SET_GEN_STATUS, index_size, counter)
packet.encode_u16(0x8, 0x0010)
packet.encode_u32(0xC, button_state) ## MODE GEN STATUS
_send_packet(packet)
get_gen_state()
send_packet_to(packet, client)
func set_carrier(installation_frequency: int):
func set_carrier(installation_frequency: int, counter: int, client: StreamPeer):
var index_size = 0x1C
var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.SET_CARRIER, index_size)
var packet = _form_packet(GROUP.BASE, CmdCode.SET_CARRIER, index_size, counter)
packet.encode_u16(0x8, 0x10)
packet.encode_u64(0xC, installation_frequency) ## uint64_t freq low dword/high dword
_send_packet(packet)
send_packet_to(packet, client)
func set_att_batch(attenuation: float):
func set_att_batch(attenuation: float, counter: int, client: StreamPeer):
var index_size = 0x1C
var packet = _form_packet(Constants.GROUP.RF, Constants.CMD.SET_ATT, index_size)
var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size, counter)
packet.encode_u16(0x8, 0x10)
packet.encode_float(0x18, attenuation)
_send_packet(packet)
send_packet_to(packet, client)
func get_carrier():
var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.READ_CARRIER, INDEX_SIZE)
_send_packet(packet)
func get_carrier(counter: int, client: StreamPeer):
var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE, counter)
send_packet_to(packet, client)
func get_att_batch():
var packet = _form_packet(Constants.GROUP.RF, Constants.CMD.READ_ATT, INDEX_SIZE)
_send_packet(packet)
func get_att_batch(counter: int, client: StreamPeer):
var packet = _form_packet(GROUP.RF, CmdCode.READ_ATT, INDEX_SIZE, counter)
send_packet_to(packet, client)
func get_gen_state():
var packet = _form_packet(Constants.GROUP.GENERATOR, Constants.CMD.READ_GEN_STATUS, INDEX_SIZE)
_send_packet(packet)
func get_gen_state(counter: int, client: StreamPeer):
var packet = _form_packet(GROUP.GENERATOR, CmdCode.READ_GEN_STATUS, INDEX_SIZE, counter)
send_packet_to(packet, client)
func base_get_current_temp():
var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.BASE_GET_CURRENT_TEMP, INDEX_SIZE)
_send_packet(packet)
func base_get_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)

View File

@@ -2,7 +2,7 @@ extends Node2D
signal read_ems_g_start()
signal read_ems_g_finish()
var unit_fs = Fs.FGOS.new()
var flag_mode = Constants.ADDRESSES[0][3]
var broadcast_packet: PackedByteArray
var node_select1: Node
@@ -47,9 +47,9 @@ func _ready() -> void:
draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B_1, Constants.ROWS_YAU_07B_1.size())
node_select_yau_07b.set_columns_min_size([160, 120])
node_select_yau_07b.set_node_text(0, 0, 'ПРД-Н')
node_select_yau_07b.set_node_text(1, 0, 'Литера_2')
node_select_yau_07b.set_node_text(0, 1, 'Запрет СИ_2')
node_select_yau_07b.set_node_text(0, 2, 'Модуляция УМ_2')
node_select_yau_07b.set_node_text(1, 0, 'Литера 2')
node_select_yau_07b.set_node_text(0, 1, 'Запрет СИ 2')
node_select_yau_07b.set_node_text(0, 2, 'Модуляция УМ 2')
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 в УФ')
@@ -58,9 +58,9 @@ func _ready() -> void:
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])
node_select_yau_07b_2.set_node_text(0, 0, 'ПРД-Н')
node_select_yau_07b_2.set_node_text(1, 0, 'Литера_3')
node_select_yau_07b_2.set_node_text(0, 1, 'Запрет СИ_3')
node_select_yau_07b_2.set_node_text(0, 2, 'Модуляция УМ_3')
node_select_yau_07b_2.set_node_text(1, 0, 'Литера 3')
node_select_yau_07b_2.set_node_text(0, 1, 'Запрет СИ 3')
node_select_yau_07b_2.set_node_text(0, 2, 'Модуляция УМ 3')
node_select_yau_07b_2.set_node_text(0, 3, 'Положение луча')
node_select_yau_07b_2.set_node_text(0, 4, 'Аттенюатор')
node_select_yau_07b_2.set_node_text(0, 5, 'ФГОЗ 3')
@@ -71,11 +71,13 @@ func _ready() -> void:
draw_tabl(node_select_fs_1, Constants.ROWS_FS, Constants.ROWS_FS.size())
node_select_fs_1.set_columns_min_size([120, 120, 150])
node_select_fs_1.set_node_text(0, 0, 'Модуль ФС')
node_select_fs_1.set_node_text(1, 0, 'Литера_2')
node_select_fs_1.set_node_text(1, 0, 'Литера 2')
node_select_fs_1.set_node_text(0, 1, 'Состояние')
node_select_fs_1.set_node_text(0, 2, 'Частота')
node_select_fs_1.get_node2(1, 2).placeholder_text = '500'
node_select_fs_1.get_node2(1, 2).placeholder_text = 'в МГц'
node_select_fs_1.get_node2(1, 2).editable = true
node_select_fs_1.set_node_text(0, 3, 'Аттенюатор')
node_select_fs_1.get_node2(1, 3).placeholder_text = 'в dB'
node_select_fs_1.get_node2(1, 3).editable = true
node_select_fs_1.set_node_text(0, 4, 'Генератор')
node_select_fs_1.set_node_text(0, 5, 'fpga')
@@ -85,11 +87,13 @@ func _ready() -> void:
draw_tabl(node_select_fs_2, Constants.ROWS_FS, Constants.ROWS_FS.size())
node_select_fs_2.set_columns_min_size([120, 120, 150])
node_select_fs_2.set_node_text(0, 0, 'Модуль ФС')
node_select_fs_2.set_node_text(1, 0, 'Литера_3')
node_select_fs_2.set_node_text(1, 0, 'Литера 3')
node_select_fs_2.set_node_text(0, 1, 'Состояние')
node_select_fs_2.set_node_text(0, 2, 'Частота')
node_select_fs_2.get_node2(1, 2).placeholder_text = '500'
node_select_fs_2.get_node2(1, 2).placeholder_text = 'в МГц'
node_select_fs_2.get_node2(1, 2).editable = true
node_select_fs_2.set_node_text(0, 3, 'Аттенюатор')
node_select_fs_2.get_node2(1, 3).placeholder_text = 'в dB'
node_select_fs_2.get_node2(1, 3).editable = true
node_select_fs_2.set_node_text(0, 4, 'Генератор')
node_select_fs_2.set_node_text(0, 5, 'fpga')
@@ -133,8 +137,12 @@ func _ready() -> void:
Network.connect('yau_status_line', Callable(self, '_on_yau_status'))
Network.connect('yau_receive', Callable(self, '_on_data_received'))
Network.connect('yau_read_isa', Callable(self, '_on_read_isa'))
Network.connect('data_from_fs_1', Callable(self, '_on_data_fs_1'))
Network.connect('data_from_fs_2', Callable(self, '_on_data_fs_2'))
Network.connect('port_fs_opened_1', _on_port_changed_fs_1.bind(Color.AQUAMARINE))
Network.connect('port_fs_closed_1', _on_port_changed_fs_1.bind(Color.CRIMSON))
Network.connect('port_fs_opened_2', _on_port_changed_fs_2.bind(Color.AQUAMARINE))
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)
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'))
@@ -148,19 +156,105 @@ func _ready() -> void:
node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2'))
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_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'))
func draw_control_panel_prd(mode) -> void:
for node_path in Constants.NODE_MAP:
var index = Constants.NODE_MAP[node_path]
var node = get_node(node_path)
if node:
var value = node.get("text")
if value != null:
node.text = Constants.SIGNS_PRD[mode][index]
else:
node.fname = Constants.SIGNS_PRD[mode][index]
func draw_control_panel_prd(pribor) -> void:
if pribor == Constants.MODE.PRD_H:
# Кассета У5
$TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24'
$TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30'
$TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26'
$TabContainer/ControlPanel/soc_y5/ug.rname = 'А27'
$TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28'
$TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29'
# Кассета ФС
$TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-НД'
$TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false
$TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1'
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-2'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-3'
# Кассета П-1
$TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21'
$TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20'
$TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19'
$TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22'
$TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23'
# Кассета П-2
$TabContainer/ControlPanel/soc_P2.visible = false
elif pribor == Constants.MODE.PRD_B:
# Кассета У5
$TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24'
$TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30'
$TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26'
$TabContainer/ControlPanel/soc_y5/ug.rname = 'А27'
$TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28'
$TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29'
# Кассета ФС
$TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-ВД'
$TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false
$TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1'
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-4'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-5'
# Кассета П-1
$TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21'
$TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20'
$TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19'
$TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22'
$TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23'
# Кассета П-2
$TabContainer/ControlPanel/soc_P2.visible = false
elif pribor == Constants.MODE.PRD_K:
# Кассета У5
$TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А31'
$TabContainer/ControlPanel/soc_y5/ay07.rname = 'А37'
$TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А33'
$TabContainer/ControlPanel/soc_y5/ug.rname = 'А34'
$TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А35'
$TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А36'
# Кассета ФС
$TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-КД'
$TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = true
$TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = true
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А3'
$TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А6'
$TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-6'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2'
$TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А5'
$TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-7'
# Кассета П-1
$TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А23'
$TabContainer/ControlPanel/soc_P1/IP12_50.fname = 'ИП9-50'
$TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А24'
$TabContainer/ControlPanel/soc_P1/IP9_50_1.fname = 'ИП9-50'
$TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А26'
$TabContainer/ControlPanel/soc_P1/IP9_50_2.fname = 'ИП12-50'
$TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А27'
$TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А28'
# Кассета П-2
$TabContainer/ControlPanel/soc_P2.visible = true
## From Network status about yau-07
@@ -191,9 +285,13 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void:
$ISA.text = 'ISA: ' + str(len(Constants.EMS_G_PORT_DATA_HOLDER))
if isa_data.has(Constants.BASE_PORTS.UG+6):
$TabContainer/PRD/body_grid/litera_2_4_6/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.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))
@@ -513,33 +611,47 @@ func set_bits(v, a, m):
return (~m) & v | a & m
## 1 ФС
func _on_port_changed_fs_1(port_name: String, color: Color) -> void:
$TabContainer/PRD/body_grid/litera_2_4_6/fs_control.set_node_text(1, 1, port_name)
$TabContainer/PRD/body_grid/litera_2_4_6/fs_control.get_node2(1,1).modulate = color
func _on_start_fs_1():
unit_fs.start_session()
unit_fs.base_get_current_temp()
func _on_start_fs_2():
unit_fs.start_session()
unit_fs.base_get_current_temp()
Network.start_work_fs()
func _on_get_status_1(toggled_btn):
var inverted_state = not toggled_btn
unit_fs.set_gen_state(inverted_state)
unit_fs.get_gen_state()
Network.get_fs_gen_status(inverted_state)
func _on_set_ferq_1(freq: String):
Network.set_fs_ferq_carrier(int(freq) * 1_000_000)
func _on_set_att_1(att: String):
Network.set_fs_attenuation(float(att))
## 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)
$TabContainer/PRD/body_grid/litera_3_5_7/fs_control.get_node2(1, 1).modulate = color
func _on_start_fs_2():
Network.start_work_fs_2()
func _on_get_status_2(toggled_btn):
var inverted_state = not toggled_btn
unit_fs.set_gen_state(inverted_state)
unit_fs.get_gen_state()
Network.get_fs_gen_status_2(inverted_state)
func _on_set_ferq():
var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000
unit_fs.set_carrier(freq)
func _on_set_ferq_2(freq: String):
Network.set_fs_ferq_carrier_2(int(freq) * 1_000_000)
func _on_set_att():
var att = float($set_space/write_to_set_att.get_text())
unit_fs.set_att_batch(att)
func _on_set_att_2(att: String):
Network.set_fs_attenuation_2(float(att))

View File

@@ -1,20 +1,21 @@
extends Node
const UNICAST_PORT: int = 50003
const UNICAST_ADDRESS: String = '10.1.1.3'
const UNICAST_PORT: int = 50014
const UNICAST_ADDRESS: String = '10.1.1.14'
const BROADCAST_PORT: int = 50000
const DEFAULT_ADDRESS: String = '10.1.1.11'
const DEFAULT_PORT: String = '50011'
const CONST_MIN_TEMP: int = -25
const MAXIMUM_CODE_ADC: int = 3796
const MINIMUM_CODE_AD: int = 2660
const MINIMUM_CODE_AD: int = 2660
const TEMP: float = 115.0 / (MAXIMUM_CODE_ADC - MINIMUM_CODE_AD)
const TableNode = preload("res://table/node.tscn")
const TableList = preload("res://table/node_list.tscn")
const Switch = preload("res://table/switch.tscn")
const SocketStatus = preload("res://table/socket_status.tscn")
const Header = preload("res://table/header.tscn")
const SELECT_DEVICE: Array = [[TableNode, TableList]]
const ROWS_REGS_DATA: Array = [
[TableNode, TableNode],
[Header, Header],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
@@ -22,7 +23,7 @@ const ROWS_REGS_DATA: Array = [
[TableNode, TableNode],
[TableNode, TableNode]]
const ROWS_YAU_07B_1: Array = [
[TableNode, TableNode],
[Header, Header],
[TableNode, Switch],
[TableNode, TableList],
[TableNode, TableList],
@@ -30,7 +31,7 @@ const ROWS_YAU_07B_1: Array = [
[TableNode, TableNode],
[TableNode, SocketStatus]]
const ROWS_YAU_07B_2: Array = [
[TableNode, TableNode],
[Header, Header],
[TableNode, Switch],
[TableNode, TableList],
[TableNode, TableList],
@@ -38,7 +39,7 @@ const ROWS_YAU_07B_2: Array = [
[TableNode, Switch],
[TableNode, SocketStatus]]
const ROWS_FS: Array = [
[TableNode, TableNode, TableNode],
[Header, Header, Header],
[TableNode, TableNode, TableNode],
[TableNode, TableNode, TableNode],
[TableNode, TableNode, TableNode],
@@ -58,6 +59,9 @@ const ADDRESSES: Array = [
['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K, '10.1.2.38', '10.1.2.39', '10.1.2.33'],
['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K, '10.1.2.54', '10.1.2.55', '10.1.2.49'],
['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K, '10.1.2.70', '10.1.2.71', '10.1.2.65']]
var CURRENT_MODE = ADDRESSES[0][3]
const INPUT_EMS_G: Array = [
'01 :34',
'02 :35',
@@ -95,9 +99,10 @@ const OUT_EMS_G: Array = [
const OUT_x128: Array = [
'Р',
'К',
'0',
'Откл.',
'1',]
const RAY_DICT: Array = [
' Контроль',
' -5°',
'',
' 15°',
@@ -107,110 +112,23 @@ const RAY_DICT: Array = [
' Контроль',
]
const ATT_DICT: Array = [
' 0 db',
' 0.5 db',
' 2 db',
' 2.5 db',
' 8 db',
' 8.5 db',
' 10 db',
' 10.5 db',
' 0 dB',
' 0.5 dB',
' 2 dB',
' 2.5 dB',
' 8 dB',
' 8.5 dB',
' 10 dB',
' 10.5 dB',
]
const SIGNS_PRD: Array = [
## ПРК-К
[
' Запрет СИ7',
' Запрет СИ1',
'ЛИТЕРА 7! ПРД-К',
'СЗИ6 от УФ',
'СЗИ7 от УФ',
'СИ6 от ФС',
'СИ7 от ФС',
'СИ6 в УФ',
'СИ7 в УФ',
'Мод. УМ 6',
'Мод. УМ 7',
'ФГОЗ 6',
'Мод. УМ 1',
'МАА №1',
'МАА №2',
'ИП9-50 №1',
'ИП9-50 №2',
'ИП9-50 №3',
'ИП5-25',
],
## ПРК-В
[
' Запрет СИ4',
' Запрет СИ5',
'',
'ЛИТЕРА 5! ПРД-В',
'СЗИ4 от УФ',
'СЗИ5 от УФ',
'СИ4 от ФС',
'СИ5 от ФС',
'СИ4 в УФ',
'СИ5 в УФ',
'Мод. УМ 4',
'Мод. УМ 5',
'ФГОЗ 4',
'ФГОЗ 5',
'МАА №1',
'МАА №2',
'ИП9-50 №1',
'ИП9-50 №2',
'-',
'-',
'ИП5-25',
],
## ПРК-Н
[
' Запрет СИ3',
'',
'ЛИТЕРА 3! ПРД-Н',
'СИ3 от ФС',
'СИ2 в УФ',
'СИ3 в УФ',
'Мод. УМ 2',
'Мод. УМ 3',
'ФГОЗ 3',
'-',
'МАА №1',
'МАА №2',
'ИП9-50 №1',
'ИП9-50 №2',
'-',
'-',
'ИП5-25',
'--',
],
]
var NODE_MAP = {
'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 1,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 2,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 3,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A27': 4,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A28': 5,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A29': 6,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A31': 7,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A32': 8,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A33': 9,
'TabContainer/ControlPanel/Signal_EMS_G/ref_A34': 10,
'TabContainer/ControlPanel/soc_P1/ref_A23': 11,
'TabContainer/ControlPanel/soc_P1/ref_A24': 12,
'TabContainer/ControlPanel/soc_P1/ref_A25': 13,
'TabContainer/ControlPanel/soc_P1/ref_A26': 14,
'TabContainer/ControlPanel/soc_P1/ref_A27': 15,
'TabContainer/ControlPanel/soc_P1/ref_A28': 16,
'TabContainer/ControlPanel/soc_P1/ref_A29': 17,
}
enum BASE_PORTS {
UG = 0x100,
EMS_G = 0x120,
UKP_1 = 0x130,
UKP_2 = 0x140,
}
enum MODE {
PRD_K,
PRD_B,
@@ -242,54 +160,23 @@ enum STATE {
DONE,
IDLE,
SEND,
}
}
enum STATE_VAL {
NONE = 0,
GOOD = 1,
ERROR = 2 }
var EMS_G_PORT_DATA_HOLDER: Array = []
# Таблица CRC-32 для модуля ФС
const CRC32_TABLE: Array = [
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D]
const PORT_FS = 1201
const INIT: int = 0xFFFFFFFF
const FINAL_XOR_VALUE: int = 0x00000000
enum GROUP {
BASE = 0x00,
GENERATOR = 0x03,
RF = 0x06,
}
enum CMD {
START_SESSION = 0x0,
READ_CARRIER = 0x1F,
@@ -299,4 +186,4 @@ enum CMD {
READ_GEN_STATUS = 0x05,
SET_GEN_STATUS = 0x06,
BASE_GET_CURRENT_TEMP = 0x36,
}
}

View File

@@ -5,69 +5,33 @@ var unit_yau07 = Yau07.YaU07.new('ЯУ07')
func _ready() -> void:
Network.connect('yau_receive', Callable(self, '_on_data_received'))
Network.connect('yau_status_line', Callable(self, '_on_yau_status'))
Network.connect('yau_status_line', Callable(self, '_control_pribor'))
'''sockets_ind = [
$soc_y5/ems_g/light_ind,
$soc_y5/ug/light_ind,
$soc_y5/ukp_1/light_ind,
$soc_y5/ukp_2/light_ind]
func lose_connect_yau():
for i in 4:
var sockets_ind = [$soc_y5/ref_A26/light_ind,
$soc_y5/ref_A27/light_ind,
$soc_y5/ref_A28/light_ind,
$soc_y5/ref_A29/light_ind]
sockets_ind[i].button_pressed = false
sockets_ind[i].disabled = true
for i in 8:
var node_power_ind = [$soc_P1/ref_A23/light_ind,
$soc_P1/ref_A24/light_ind,
$soc_P1/ref_A25/light_ind,
$soc_P1/ref_A26/light_ind,
$soc_P1/ref_A27/light_ind,
$soc_P1/ref_A28/light_ind,
$soc_P1/ref_A29/light_ind,
$soc_y5/ref_A24/light_ind]
node_power_ind[i].button_pressed = false
node_power_ind[i].disabled = true
node_power_ind = [
$soc_P1/MAA_1/light_ind,
$soc_P1/MAA_2/light_ind,
$soc_P1/IP9_50_2/light_ind,
$soc_P1/IP9_50_1/light_ind,
$soc_P1/IP12_50/light_ind,
$soc_P2/IP9_50/light_ind,
$soc_P2/IP12_50/light_ind,
$soc_y5/IP5_25/light_ind]'''
func on_timer(unit):
print(unit)
func _on_data_received(data_from_yau_07):
var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD)
var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ)
## SOCKETS BOARDS
for i in 4:
var sockets_ind = [$soc_y5/ref_A26/light_ind,
$soc_y5/ref_A27/light_ind,
$soc_y5/ref_A28/light_ind,
$soc_y5/ref_A29/light_ind]
var j = int(status_board & (1 << i) == 0)
if j == 0:
sockets_ind[i].button_pressed = true
sockets_ind[i].disabled = false
else:
sockets_ind[i].button_pressed = false
sockets_ind[i].disabled = true
## Блок ИП
for i in 8:
var node_power_ind = [$soc_P1/ref_A23/light_ind,
$soc_P1/ref_A24/light_ind,
$soc_P1/ref_A25/light_ind,
$soc_P1/ref_A26/light_ind,
$soc_P1/ref_A27/light_ind,
$soc_P1/ref_A28/light_ind,
$soc_P1/ref_A29/light_ind,
$soc_y5/ref_A24/light_ind]
var j = int(not(dry_contact & (1 << i) == 0))
if j == 0:
node_power_ind[i].button_pressed = true
node_power_ind[i].disabled = false
else:
node_power_ind[i].button_pressed = false
node_power_ind[i].disabled = true
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) # Контроль сухих контактов (УГ)
## From Network status about yau-07
func _on_yau_status(yau_status:bool) -> void:
$soc_y5/ref_A30/light_ind.button_pressed = yau_status
$soc_y5/ref_A30/light_ind.disabled = not yau_status
func _control_pribor(_yau_status:bool) -> void:
#$device.text = str(Constants.CURRENT_MODE)
$soc_y5/ay07.state = Constants.STATE_VAL.GOOD

View File

@@ -10,7 +10,7 @@ func _on_read_ems_g():
for i_input in 16:
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_input)
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+0xA])
for i_output in range(46, 62):
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_output)
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8])
@@ -27,7 +27,7 @@ func _on_sync():
port0x124 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key]
for row in 16:
if (port0x124 & (1 << row)) != 0:
var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false)
var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false)
chk_btn.button_pressed =true
if key == 0x128:
port0x128 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key]
@@ -52,24 +52,24 @@ func _ready() -> void:
else:
column.append(Constants.TableNode)
EMS_G_TABLE.append(column)
draw_tabl(node_select1, EMS_G_TABLE, EMS_G_TABLE.size())
node_select1.get_node2(1, 1).text = 'x3_ВЫХ:GND'
node_select1.get_node2(0, 2).text = 'x3_ВХ :GND'
for i in Constants.INPUT_EMS_G.size():
node_select1.get_node2(0, i+shift+1).text = Constants.INPUT_EMS_G[i]
for i in Constants.OUT_EMS_G.size():
node_select1.get_node2(i+shift, 1).text = Constants.OUT_EMS_G[i][1]
for i in EMS_G_TABLE[0].size()-shift:
var list = node_select1.get_node2(i+shift, 0)
list.set_meta('device', Constants.OUT_EMS_G[i][0])
list.connect('item_selected', Callable(self, 'on_mode_link').bind(list))
for k in Constants.OUT_x128.size():
list.add_item(Constants.OUT_x128[k])
list.add_item(Constants.OUT_x128[k])
var columns_min_size: Array
for i in EMS_G_TABLE[0].size():
if i < 2:
@@ -77,13 +77,13 @@ func _ready() -> void:
else:
columns_min_size.append(80)
node_select1.set_columns_min_size(columns_min_size)
var parrent_NODE2 = get_parent().get_parent()
parrent_NODE2.connect('read_ems_g_start', Callable(self, '_on_read_ems_g'))
parrent_NODE2.connect('read_ems_g_finish', Callable(self, '_on_sync'))
Network.connect('yau_receive', Callable(self, '_on_data_received'))
create_link_button(node_select1, shift+1, 16+shift+1, shift, 16+shift)
func draw_tabl(tbl, row: Array, count_row: int):
for i_row in count_row:
@@ -96,65 +96,59 @@ func _on_data_received(data_from_yau_07):
var out_blank: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_BLANK_PRD)
var out_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_IMPULS_PRD)
var parent_node2 = get_parent().get_parent()
process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2)
process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2)
func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node):
for i in count:
var socket_status = node_select1.get_node2(col+i, shift).get_child(1, false)
var frame_type = Constants.Frame.WORK
if (blank & (1 << i)) != 0:
frame_type = Constants.Frame.CONSTANT
elif (imp & (1 << i)) != 0:
frame_type = Constants.Frame.VARIABLE
set_frame(socket_status, frame_type)
if i == 1:
set_frame(get_specific_node(parent_node2, 5), frame_type)
if i == 2:
set_frame(get_specific_node(parent_node2, 6), frame_type)
if i == 4:
set_frame(get_specific_node(parent_node2, 7), frame_type)
if i == 5:
set_frame(get_specific_node(parent_node2, 8), frame_type)
if i == 9:
set_frame(get_specific_node(parent_node2, 9), frame_type)
if i == 1: # СИ_2_в_УФ
var CI_2_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 6).get_child(1)
set_frame(CI_2_UF, frame_type)
if i == 2: # СИ_3_в_УФ
var CI_3_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 6).get_child(1)
set_frame(CI_3_UF, frame_type)
if i == 4: # Модуляция_УМ_2
pass
if i == 5: # Модуляция_УМ_3
pass
if i == 9: # ФГОЗ_3
pass
func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_node2: Node):
for i in count:
var socket_status = node_select1.get_node2(col, i + shift+1).get_child(1, false)
var frame_type = Constants.Frame.WORK
if (blank & (1 << i)) != 0:
frame_type = Constants.Frame.CONSTANT
elif (imp & (1 << i)) != 0:
frame_type = Constants.Frame.VARIABLE
set_frame(socket_status, frame_type)
if i == 1:
set_frame(get_specific_node(parent_node2, 1), frame_type)
var CI_2_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 6).get_child(1)
set_frame(CI_2_UF, frame_type)
if i == 2:
set_frame(get_specific_node(parent_node2, 2), frame_type)
var CI_3_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 6).get_child(1)
set_frame(CI_3_UF, frame_type)
if i == 9:
set_frame(get_specific_node(parent_node2, 3), frame_type)
if i == 1: # СЗИ_2_от_УФ
pass
if i == 2: # СЗИ_3_от_УФ
pass
if i == 9: # СИ_2_от_ФС
var CI_2_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_2_FS, frame_type)
if i == 10:
set_frame(get_specific_node(parent_node2, 4), frame_type)
func get_specific_node(parent_node2: Node, child_index: int)-> Node:
return parent_node2.get_child(3, false).get_child(1).get_child(4).get_child(child_index).get_child(3)
if i == 10: # СИ_3_от_ФС
var CI_3_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_3_FS, frame_type)
func set_frame(node: Node, val: int): node.set_frame(val)
@@ -170,7 +164,7 @@ func create_link_button(node, count_rows_sart: int, count_rows_end: int, coln_st
for i_colum in 16:
META_EMS_G.append([INPUT+i_row, OUTPUT+i_colum])
button_link_meta[OUTPUT+i_colum] = 0
var count_register = 0
for i_row in range(count_rows_sart, count_rows_end):
for i_col in range (coln_start, coln_end):
@@ -188,7 +182,7 @@ func on_mouse_entered(meta_area):
var device = meta_area.get_meta('device')
var y = device[0] + 1
var x = device[1] - 45
for i_y in 18:
for i_x in 18:
if i_y <= y and i_x <= x and i_y == y:
@@ -207,9 +201,9 @@ func on_mode_link(mode, list):
var meta = list.get_meta('device')
var address_port_wr = Constants.BASE_PORTS.EMS_G+2
Network.write_port_isa(address_port_wr, meta) # Отправка команды
## Формирование команды для отправкы команды на устройство
address_port_wr = Constants.BASE_PORTS.EMS_G+8
address_port_wr = Constants.BASE_PORTS.EMS_G+8
var set_mode = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000
Network.write_port_isa(address_port_wr, set_mode)

View File

@@ -13,73 +13,74 @@ func _process(_delta: float) -> void:
func _enter_tree() -> void:
pass
# Подключаем сигналы к методам
Network.connect('data_send', _on_data_send)
Network.connect('data_from_fs_1', _on_data_received)
Network.connect('port_opened', _on_port_changed.bind(Color.GREEN))
Network.connect('port_closed', _on_port_changed.bind(Color.GRAY))
Network.connect('port_error', _on_port_changed.bind(Color.RED))
#Network.connect('data_send', _on_data_send)
#Network.connect('data_from_fs_1', _on_data_received)
#Network.connect('port_opened', _on_port_changed.bind(Color.GREEN))
#Network.connect('port_closed', _on_port_changed.bind(Color.GRAY))
#Network.connect('port_error', _on_port_changed.bind(Color.RED))
func _on_port_changed(port_name: String, color: Color) -> void:
$manage_panel/con/ip_connect.text = port_name
$fs_connect.self_modulate = color
#func _on_port_changed(port_name: String, color: Color) -> void:
#$manage_panel/con/ip_connect.text = port_name
#$fs_connect.self_modulate = color
func _on_data_send():
pass
func _on_data_received(data: PackedByteArray):
var GRP = data.decode_u8(0x0)
var CMD = data.decode_u8(0x1)
match CMD:
Constants.CMD.READ_CARRIER:
if GRP == Constants.GROUP.BASE:
$manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц'
Constants.CMD.READ_ATT:
if GRP == Constants.GROUP.RF:
$manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB'
Constants.CMD.READ_GEN_STATUS:
if GRP == Constants.GROUP.GENERATOR:
if data.decode_u32(0xC) == 0:
$manage_panel/get_gen_status/status_ind.text = 'Включен'
$manage_panel/get_gen_status/status_ind.modulate = Color.GREEN
else:
$manage_panel/get_gen_status/status_ind.text = 'Выключен'
$manage_panel/get_gen_status/status_ind.modulate = Color.RED
Constants.CMD.BASE_GET_CURRENT_TEMP:
if GRP == Constants.GROUP.BASE:
$temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C'
$temp_2.text = str(data.decode_float(0x10)) + ' °C'
$temp_3.text = str(data.decode_float(0x14)) + ' °C'
$read.text = str(data.hex_encode())
#
#func _on_data_received(data: PackedByteArray):
#var GRP = data.decode_u8(0x0)
#var CMD = data.decode_u8(0x1)
#match CMD:
#Constants.CMD.READ_CARRIER:
#if GRP == Constants.GROUP.BASE:
#$manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц'
#Constants.CMD.READ_ATT:
#if GRP == Constants.GROUP.RF:
#$manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB'
#Constants.CMD.READ_GEN_STATUS:
#if GRP == Constants.GROUP.GENERATOR:
#if data.decode_u32(0xC) == 0:
#$manage_panel/get_gen_status/status_ind.text = 'Включен'
#$manage_panel/get_gen_status/status_ind.modulate = Color.GREEN
#else:
#$manage_panel/get_gen_status/status_ind.text = 'Выключен'
#$manage_panel/get_gen_status/status_ind.modulate = Color.RED
#Constants.CMD.BASE_GET_CURRENT_TEMP:
#if GRP == Constants.GROUP.BASE:
#$temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C'
#$temp_2.text = str(data.decode_float(0x10)) + ' °C'
#$temp_3.text = str(data.decode_float(0x14)) + ' °C'
#$read.text = str(data.hex_encode())
func _on_send_pressed() -> void:
unit_fs.get_carrier()
unit_fs.get_carrier(counter, Network.client_fs_1)
func _on_get_att() -> void:
unit_fs.get_att_batch()
unit_fs.get_att_batch(counter, Network.client_fs_1)
func _on_start():
unit_fs.start_session()
unit_fs.base_get_current_temp()
unit_fs.start_session(counter, Network.client_fs_1)
unit_fs.base_get_current_temp(counter, Network.client_fs_1)
func _on_get_status(toggled_btn):
var inverted_state = not toggled_btn
unit_fs.set_gen_state(inverted_state)
unit_fs.get_gen_state()
unit_fs.set_gen_state(inverted_state, counter, Network.client_fs_1)
unit_fs.get_gen_state(counter, Network.client_fs_1)
func _on_set_ferq():
var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000
unit_fs.set_carrier(freq)
unit_fs.set_carrier(freq, counter, Network.client_fs_1)
func _on_set_att():
var att = float($set_space/write_to_set_att.get_text())
unit_fs.set_att_batch(att)
unit_fs.set_att_batch(att, counter, Network.client_fs_1)

View File

@@ -2,6 +2,8 @@ extends Node
# ЯУ-07 Блок
var unit = Yau07.YaU07.new('ЯУ-07Б')
var unit_fs_1 = Fs.FGOS.new()
#var unit_fs_2 = Fs.FGOS.new()
var soc_unicast: Socket
var soc_brodcast: Socket
var ip_address_yau: String = Constants.ADDRESSES[0][1]
@@ -14,29 +16,32 @@ var state = Constants.STATE.WAIT
var send_array: Array = []
# ФС Блок
var ip_fs_1: String = Constants.ADDRESSES[0][4]
var command_stack: Array
var state_fs = Constants.STATE.IDLE
var client_fs_1: StreamPeer
var ip_fs_1: String = Constants.ADDRESSES[0][4]
var peerstream_fs_1: PacketPeer
var state_fs = Constants.STATE.IDLE
var command_stack: Array
var counter_fs_1: int = 0
var ip_fs_2: String = Constants.ADDRESSES[0][5]
var command_stack_fs_2: Array
var state_fs_2 = Constants.STATE.IDLE
## 2 ФС
var client_fs_2: StreamPeer
var ip_fs_2: String = Constants.ADDRESSES[0][5]
var peerstream_fs_2: PacketPeer
var state_fs_2 = Constants.STATE.IDLE
var command_stack_2: Array
var counter_fs_2: int = 0
# Яу-07б
signal yau_status_line(_status) ## Вызывается когда меняется состояние связи с ячейкой
signal yau_receive(_data_from_yau)
signal yau_read_isa(_unit_isa_ports)
signal data_send()
signal data_send_2()
# ФС модуль
signal data_from_fs_1(data:PackedByteArray)
signal data_from_fs_2(data:PackedByteArray)
signal port_opened(port_name: String)
signal port_opened_2(port_name: String)
signal port_closed(port_name: String)
signal port_fs_opened_1(port_name: String)
signal port_fs_opened_2(port_name: String)
signal port_fs_closed_1(port_name: String)
signal port_fs_closed_2(port_name: String)
signal port_error(error_str: String)
@@ -65,46 +70,34 @@ func poll_receive_yau07(sock: Socket) -> bool: ## Приёмник
return false
func poll_receive_fs(client: StreamPeerTCP):
func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: String):
client.poll()
var peer = peerstream_fs_1.get_stream_peer()
var peer = peerstream.get_stream_peer()
# Проверяем, существует ли соединение
if not peer:
emit_signal("port_error", ip_fs_1)
emit_signal("port_error", ip_fs)
return
# Проверяем состояние подключения
if client.get_status() != StreamPeerTCP.STATUS_CONNECTED:
emit_signal("port_closed", ip_fs_1)
if client == client_fs_1:
emit_signal("port_fs_closed_1", ip_fs)
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])
emit_signal("data_from_fs_1", rx_data)
emit_signal("port_opened", ip_fs_1)
if state_fs == Constants.STATE.SEND:
state_fs = Constants.STATE.DONE
func poll_receive_fs_2(client: StreamPeerTCP):
client.poll()
var peer = peerstream_fs_2.get_stream_peer()
# Проверяем, существует ли соединение
if not peer:
emit_signal("port_fs_2_error", ip_fs_2)
return
# Проверяем состояние подключения
if client.get_status() != StreamPeerTCP.STATUS_CONNECTED:
emit_signal("port_closed_fs_2", ip_fs_2)
return
if peer.get_available_bytes() > 0:
var rx_data: PackedByteArray
rx_data.append_array(peer.get_data(peer.get_available_bytes())[1])
emit_signal("data_from_fs_2", rx_data)
emit_signal("port_opened_fs_2", ip_fs_2)
if state_fs_2 == Constants.STATE.SEND:
state_fs_2 = Constants.STATE.DONE
if client == client_fs_1:
emit_signal("data_from_fs_1", rx_data)
emit_signal("port_fs_opened_1", ip_fs)
if state_fs == Constants.STATE.SEND:
state_fs = Constants.STATE.DONE
elif client == client_fs_2:
emit_signal("data_from_fs_2", rx_data)
emit_signal("port_fs_opened_2", ip_fs)
if state_fs_2 == Constants.STATE.SEND:
state_fs_2 = Constants.STATE.DONE
func _ready() -> void:
@@ -121,7 +114,8 @@ func _ready() -> void:
unit.connect('line_changed', Callable(self, 'on_line_changed'))
unit.connect('command_fail', Callable(self, 'on_command_fail'))
connect_fs()
connect_fs_1()
connect_fs_2()
read_port_isa([0x106, 0x108])
@@ -131,16 +125,17 @@ func _process(delta: float) -> void:
last_update_time_fs += delta
if client_fs_1:
poll_receive_fs(client_fs_1)
#if client_fs_2:
#poll_receive_fs_2(client_fs_2)
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()
state_machine_fs()
match unit.process(delta):
Error.OK: soc_unicast.send_to(ip_address_yau, ip_port_yau, unit.tx_data.slice(0, unit.tx_len))
Error.FAILED: print_debug('Ошибка отправки данных')
@@ -198,22 +193,28 @@ func on_command_change_device(meta_device):
ip_fs_1 = meta_device[3]
ip_fs_2 = meta_device[4]
#ip_fs_3 = meta_device[5]
connect_fs()
connect_fs_1()
connect_fs_2()
func state_machine_fs():
if client_fs_1:
## State fs machine
func state_machine_fs(client_fs):
## State fs machine
if client_fs == client_fs_1:
if (state_fs == Constants.STATE.IDLE) or (state_fs == Constants.STATE.DONE):
if command_stack:
var pack: Array = command_stack.pop_front()
send_data(pack)
unit_fs_1.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)
state_fs_2 = Constants.STATE.SEND
# Подключится к модулю ФС
func connect_fs():
func connect_fs_1():
if client_fs_1:
disconnect_fs(client_fs_1)
@@ -226,58 +227,111 @@ func connect_fs():
peerstream_fs_1.set_stream_peer(client_fs_1)
# Отправить команду для ФС
func send_data(data_to_sand: PackedByteArray):
if client_fs_1.get_status() == 2:
var peer = peerstream_fs_1.get_stream_peer()
if peer:
peer.put_data(data_to_sand)
emit_signal("data_send")
# Разорвать соединение с ФС
func disconnect_fs(client_for_leave):
client_for_leave.disconnect_from_host()
state_fs = Constants.STATE.IDLE
command_stack = []
func state_machine_fs_2():
if client_fs_2:
## State fs machine
if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE):
if command_stack_fs_2:
var pack: Array = command_stack_fs_2.pop_front()
send_data_fs_2(pack)
state_fs_2 = Constants.STATE.SEND
func start_work_fs():
counter_fs_1 = 0
unit_fs_1.start_session(counter_fs_1, client_fs_1)
counter_fs_1 += 1
unit_fs_1.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)
counter_fs_1 += 1
unit_fs_1.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)
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)
counter_fs_1 += 1
unit_fs_1.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)
counter_fs_1 += 1
func set_fs_ferq_carrier(freq: int):
unit_fs_1.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)
counter_fs_1 += 1
unit_fs_1.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)
counter_fs_1 += 1
unit_fs_1.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)
counter_fs_1 += 1
## 2 ФС коннект
func connect_fs_2():
if client_fs_2:
disconnect_fs_2(client_fs_2)
client_fs_2 = StreamPeerTCP.new()
peerstream_fs_2 = PacketPeerStream.new()
var rc = client_fs_2.connect_to_host(ip_fs_2, Constants.PORT_FS)
if rc!= Error.OK:
emit_signal("port_error", ip_fs_2)
print_debug('Port error %s' % ip_fs_2)
#emit_signal("port_error", ip_fs_2)
else:
peerstream_fs_2.set_stream_peer(client_fs_2)
# Отправить команду для ФС
func send_data_fs_2(data_to_sand: PackedByteArray):
if client_fs_2.get_status() == 2:
var peer = peerstream_fs_2.get_stream_peer()
if peer:
peer.put_data(data_to_sand)
emit_signal("data_send_2")
# Разорвать соединение с ФС
func disconnect_fs_2(client_for_leave):
client_for_leave.disconnect_from_host()
state_fs_2 = Constants.STATE.IDLE
command_stack = []
command_stack_2 = []
func start_work_fs_2():
counter_fs_2 = 0
unit_fs_1.start_session(counter_fs_2, client_fs_2)
counter_fs_2 += 1
unit_fs_1.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)
counter_fs_2 += 1
unit_fs_1.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)
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)
counter_fs_2 += 1
unit_fs_1.get_gen_state(counter_fs_2, client_fs_2)
counter_fs_2 += 1
unit_fs_1.base_get_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)
counter_fs_2 += 1
unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2)
counter_fs_2 += 1
unit_fs_1.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)
counter_fs_2 += 1
unit_fs_1.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)
counter_fs_2 += 1

View File

@@ -0,0 +1,86 @@
@tool
extends PanelContainer
func set_text(val: String): $button.set_text(val)
func set_pressed(val: bool): $button.set_pressed(val)
func set_disabled(val: bool): disabled = val
func get_text(): return $button.get_text()
func is_pressed(): return $button.is_pressed()
func is_toggle_mode(): return $button.is_toggle_mode()
@export var texture_state0: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_d3qtt'):
set(val): $state.set_texture(val)
@export var texture_state1: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_k8o6s'):
set(val): $state.set_texture(val)
@export var strips_rotation: float = 0.0:
set(val):
strips_rotation = val
$back.strips_rotation = deg_to_rad(val)
get: return strips_rotation
@export var text: String = '':
set(val): $button.set_text(val)
get: return $button.get_text()
@export var disabled: bool = false:
set(val):
disabled = val
$button.set_disabled(val)
$back.disabled = val
$state.modulate.a = 0.5 if val else 1.0
get: return disabled
@export var pressed: bool = false:
set(val):
pressed = val
$button.set_pressed(val)
get:
return pressed
@export var toggle_mode: bool = false:
set(val):
toggle_mode = val
$button.set_toggle_mode(val)
get:
return toggle_mode
func button_connect(button_signal: String, proc: Callable):
var rc = $button.connect(button_signal, proc)
if rc != Error.OK:
push_error('возникла ошибка \"%s\" при подключении сигнала \"%s\" к обработчику \"%s\"' % [error_string(rc), button_signal, proc])
func _on_resized() -> void:
$back.scale = size
$back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0))
func _enter_tree() -> void:
$back.scale = size
$back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0))
$button.set_toggle_mode(true)
$button.connect('toggled', _on_button_toggled)
func _exit_tree() -> void:
$button.disconnect('toggled', _on_button_toggled)
func set_toggle_mode(val: bool):
$button.set_toggle_mode(val)
func _on_button_toggled(val: bool):
if val: $state.set_texture(texture_state1)
else: $state.set_texture(texture_state0)

View File

@@ -1,12 +1,17 @@
[gd_scene load_steps=2 format=3 uid="uid://ch14g46swx74h"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2thpi"]
bg_color = Color(0.8, 0.403922, 0.27451, 1)
bg_color = Color(0.455894, 0.0685824, 0.187642, 0.945098)
corner_radius_top_left = 5
corner_radius_top_right = 2
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="heder" type="Label"]
custom_minimum_size = Vector2(0, 30)
offset_right = 128.0
offset_bottom = 23.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_color = Color(1, 1, 0.941176, 1)
theme_override_font_sizes/font_size = 15
theme_override_styles/normal = SubResource("StyleBoxFlat_2thpi")
horizontal_alignment = 1

View File

@@ -2,12 +2,10 @@
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"]
bg_color = Color(0, 0, 0, 0.490196)
border_width_bottom = 2
border_color = Color(0.223529, 0.168627, 0.223529, 1)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="Label" type="LineEdit"]
texture_filter = 2
@@ -24,9 +22,7 @@ grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
focus_mode = 0
mouse_default_cursor_shape = 0
theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1)
theme_override_colors/font_uneditable_color = Color(1, 1, 0.941176, 1)
theme_override_font_sizes/font_size = 17
theme_override_styles/read_only = SubResource("StyleBoxFlat_q1ixs")
theme_override_styles/normal = SubResource("StyleBoxFlat_q1ixs")
@@ -34,7 +30,8 @@ alignment = 1
caret_blink = true
caret_blink_interval = 0.5
[node name="ColorRect" type="ColorRect" parent="."]
[node name="Color_Ems_g" type="ColorRect" parent="."]
visible = false
layout_mode = 0
offset_right = 1933.0
offset_bottom = 1088.0

View File

@@ -6,12 +6,10 @@
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"]
bg_color = Color(0, 0, 0, 0.490196)
border_width_bottom = 2
border_color = Color(0.223529, 0.168627, 0.223529, 1)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="SpriteFrames" id="SpriteFrames_a7q1i"]
animations = [{
@@ -34,18 +32,17 @@ animations = [{
}]
[node name="PanelContainer" type="PanelContainer"]
custom_minimum_size = Vector2(50, 35)
offset_left = -3.0
offset_right = 319.0
offset_bottom = 66.0
offset_right = 119.0
offset_bottom = 35.0
theme_override_styles/panel = SubResource("StyleBoxFlat_q1ixs")
metadata/_edit_lock_ = true
[node name="ColorRect" type="ColorRect" parent="."]
[node name="Color_ems_g" type="ColorRect" parent="."]
layout_mode = 2
color = Color(0, 0, 0, 0.195)
color = Color(1, 1, 1, 0)
[node name="SZI_x" type="AnimatedSprite2D" parent="."]
position = Vector2(40, 11)
position = Vector2(59, 18)
scale = Vector2(1.2, 1.2)
sprite_frames = SubResource("SpriteFrames_a7q1i")
metadata/_edit_lock_ = true

View File

@@ -3,6 +3,10 @@
[ext_resource type="Script" path="res://scripts/switch.gd" id="1_h0k6p"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r5cym"]
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_b6sp7"]

View File

@@ -1,8 +1,11 @@
[gd_scene load_steps=15 format=3 uid="uid://p2suppildvq0"]
[gd_scene load_steps=12 format=3 uid="uid://p2suppildvq0"]
[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://состояние-исправности-0.png" id="1_2n7he"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="2_4b43i"]
[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://состояние-исправности-1.png" id="2_38t58"]
[ext_resource type="Shader" path="res://opt_btn.gdshader" id="2_ecsml"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_4kmgr"]
[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://состояние-исправности-2.png" id="3_i2t3v"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_omove"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_jia67"]
@@ -44,8 +47,8 @@ func _resize_children() -> void:
$lbl_rname.position.y = margins[0]
$lbl_fname.size.y = size.x
$lbl_fname.position.y = size.y / 2 + $lbl_fname.size.x / 2
$light_ind.position.x = size.x / 2 - ($light_ind.size.x * $light_ind.scale.x) / 2
$light_ind.position.y = size.y - $light_ind.size.y * $light_ind.scale.x - margins[2]
$txr_state.position.x = size.x / 2 - ($txr_state.size.x * $txr_state.scale.x) / 2
$txr_state.position.y = size.y - $txr_state.size.y * $txr_state.scale.x - margins[2]
func _on_nine_patch_rect_resized() -> void:
@@ -75,37 +78,6 @@ shader = ExtResource("2_ecsml")
shader_parameter/range = 0.4
shader_parameter/color = Color(0.764706, 0.764706, 0.764706, 1)
[sub_resource type="Gradient" id="Gradient_x8k3w"]
colors = PackedColorArray(1, 1, 1, 1, 0.393086, 0.393086, 0.393085, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_cgu2r"]
gradient = SubResource("Gradient_x8k3w")
width = 25
height = 25
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1.125, 0)
[sub_resource type="Gradient" id="Gradient_1tk1g"]
colors = PackedColorArray(0.1, 1, 0.1, 1, 0.124744, 0.328804, 0.202483, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_d3qtt"]
gradient = SubResource("Gradient_1tk1g")
width = 25
height = 25
fill = 1
fill_from = Vector2(0.5, 0.5)
[sub_resource type="Gradient" id="Gradient_6e32x"]
colors = PackedColorArray(1, 0.1, 0.1, 1, 0.329, 0.125, 0.202, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_k8o6s"]
gradient = SubResource("Gradient_6e32x")
width = 25
height = 25
fill = 1
fill_from = Vector2(0.5, 0.5)
[sub_resource type="SpriteFrames" id="SpriteFrames_nofpw"]
animations = [{
"frames": [{
@@ -133,7 +105,7 @@ anchors_preset = 0
offset_right = 50.0
offset_bottom = 150.0
script = SubResource("GDScript_fbktk")
textures = Array[Texture]([ExtResource("2_4b43i"), ExtResource("2_4b43i"), ExtResource("2_4b43i")])
textures = Array[Texture]([ExtResource("1_2n7he"), ExtResource("2_38t58"), ExtResource("3_i2t3v")])
metadata/ref_des = ""
metadata/dec_num = ""
@@ -160,19 +132,16 @@ text = "Ячейка"
horizontal_alignment = 1
vertical_alignment = 1
[node name="light_ind" type="TextureButton" parent="."]
[node name="txr_state" type="TextureRect" parent="."]
material = SubResource("ShaderMaterial_45ast")
layout_mode = 0
offset_left = 13.0
offset_top = 114.0
offset_right = 38.0
offset_bottom = 139.0
offset_left = 14.0
offset_top = 116.0
offset_right = 238.0
offset_bottom = 340.0
scale = Vector2(0.1, 0.1)
size_flags_vertical = 6
toggle_mode = true
button_mask = 0
texture_normal = SubResource("GradientTexture2D_cgu2r")
texture_pressed = SubResource("GradientTexture2D_d3qtt")
texture_disabled = SubResource("GradientTexture2D_k8o6s")
texture = ExtResource("1_2n7he")
[node name="np_rect" type="NinePatchRect" parent="."]
layout_mode = 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ce3qpf070wgd2"
path="res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-0.png"
dest_files=["res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://byweg7pgt8o4h"
path="res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-1.png"
dest_files=["res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvikuv0lbvou8"
path="res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-2.png"
dest_files=["res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1