From 9156249e7458a2a3df1cf83deed40fdb8125eb2f Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:47:25 +0300 Subject: [PATCH 1/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=AD=D0=9C=D0=A1-=D0=A2=D0=93=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D1=80=D0=B5=D0=BA=D0=BE=D0=BC=D0=B5=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BA=D0=BE=D0=BC=D0=B8=D1=81=D1=81?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/эмс2/эмс2.tscn | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scenes/эмс2/эмс2.tscn b/scenes/эмс2/эмс2.tscn index 90bde52a..b8e71422 100644 --- a/scenes/эмс2/эмс2.tscn +++ b/scenes/эмс2/эмс2.tscn @@ -485,11 +485,15 @@ text = "Изделие" [node name="Label" type="Label" parent="СкруглённыйПрямоугСалатный"] offset_left = -33.0 -offset_top = -10.2857 +offset_top = -17.1429 offset_right = 35.0 -offset_bottom = 8.71429 +offset_bottom = 13.8571 theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "Комплекс" +theme_override_font_sizes/font_size = 12 +text = "Источник +информации" +horizontal_alignment = 1 +vertical_alignment = 3 [node name="Label3" type="Label" parent="СкруглённыйПрямоугСалатный"] offset_left = 133.0 @@ -519,19 +523,22 @@ horizontal_alignment = 1 [node name="Label6" type="Label" parent="СкруглённыйПрямоугСалатный"] offset_left = 516.75 -offset_top = -10.2857 +offset_top = -18.8572 offset_right = 574.75 -offset_bottom = 8.7143 +offset_bottom = 22.1428 theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "Верхняя" +text = "Верхняя +частота" [node name="Label7" type="Label" parent="СкруглённыйПрямоугСалатный"] offset_left = 441.0 -offset_top = -10.2857 +offset_top = -19.7143 offset_right = 495.0 -offset_bottom = 8.7143 +offset_bottom = 21.2857 theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "Нижняя" +text = "Нижняя +частота" +horizontal_alignment = 1 [node name="Label8" type="Label" parent="СкруглённыйПрямоугСалатный"] offset_left = 362.25 From 115004194bd0fbca3bf3afe38d8c5aa6c02f00fd Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:48:30 +0300 Subject: [PATCH 2/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=A4=D0=A1-=D0=AD2=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D0=BD=D0=B4=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=B8=D1=81=D1=81=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/button-flat/button-flat.tscn | 4 +-- scenes/контроль/контроль.tscn | 50 +++++++++++++++++++---------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/scenes/button-flat/button-flat.tscn b/scenes/button-flat/button-flat.tscn index 607ed5f6..93657443 100644 --- a/scenes/button-flat/button-flat.tscn +++ b/scenes/button-flat/button-flat.tscn @@ -61,8 +61,8 @@ script = ExtResource("1_ui6sg") visible = false z_as_relative = false layout_mode = 2 -border_color = Color(0, 0.549509, 0.921779, 1) -border_width = 5.0 +border_color = Color(0, 0.51, 0.85, 1) +border_width = 7.0 editor_only = false [node name="back" type="Sprite2D" parent="."] diff --git a/scenes/контроль/контроль.tscn b/scenes/контроль/контроль.tscn index 7260fc28..56f9ec6f 100644 --- a/scenes/контроль/контроль.tscn +++ b/scenes/контроль/контроль.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=32 format=3 uid="uid://lwmw4egynmd1"] +[gd_scene load_steps=33 format=3 uid="uid://lwmw4egynmd1"] [ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"] [ext_resource type="Script" uid="uid://q3gmpsqspjfp" path="res://scenes/контроль/внешний.gd" id="2_8r80x"] @@ -68,8 +68,8 @@ func on_serv_changed(u, pribor_node, _pribor_meta): pribor_node.state = int(u.se func on_mode_changed(): clean_pribor_items() reset_pribor_buttons() - $chk_show_functional.disabled = true - $chk_show_functional.button_pressed = false + $frame_button/chk_show_functional.disabled = true + $frame_button/chk_show_functional.button_pressed = false func reset_pribor_buttons(): @@ -145,8 +145,8 @@ func clean_pribor_items(): func on_pribor_press(pribor_path, header_text, pribor_node): if cur_pribor_node: cur_pribor_node.show_functional = false - $chk_show_functional.disabled = false - $chk_show_functional.button_pressed = false + $frame_button/chk_show_functional.disabled = false + $frame_button/chk_show_functional.button_pressed = false cur_pribor_node = pribor_node clean_pribor_items() var pribor_obj = load(pribor_path) @@ -158,7 +158,7 @@ func on_pribor_press(pribor_path, header_text, pribor_node): push_error('экземпляр не создан: \\\"%s\\\" (%s)' % [pribor_path, header_text]) return $lbl_header.text = header_text - $chk_show_functional.disabled = false + $frame_button/chk_show_functional.disabled = false var meta_list = pribor_node.get_meta_list() if meta_list.find('unit_name') > -1: var unit_name = pribor_node.get_meta('unit_name') @@ -222,8 +222,8 @@ func _on_gui_input(event: InputEvent) -> void: node.button_pressed = false clean_pribor_items() cur_pribor_node = null - $chk_show_functional.button_pressed = false - $chk_show_functional.disabled = true + $frame_button/chk_show_functional.button_pressed = false + $frame_button/chk_show_functional.disabled = true func on_control_button_pressed(state: bool) -> void: @@ -255,10 +255,17 @@ animations = [{ [sub_resource type="ShaderMaterial" id="ShaderMaterial_71ec4"] shader = ExtResource("9_71ec4") -shader_parameter/white = Vector3(0.14, 0.13, 0.13) -shader_parameter/black = Vector3(0.95, 0.55, 0.05) +shader_parameter/white = Vector3(0, 0, 0) +shader_parameter/black = Vector3(1, 1, 1) shader_parameter/gamma = 2.0 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6hcgs"] +bg_color = Color(0.6, 0.6, 0.6, 0) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 + [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l5wui"] bg_color = Color(0.47451, 0.47451, 0.47451, 1) border_width_left = 2 @@ -1928,15 +1935,24 @@ text = "Контроль исправности прибора" horizontal_alignment = 1 vertical_alignment = 1 -[node name="chk_show_functional" type="CheckButton" parent="."] +[node name="frame_button" type="Panel" parent="."] layout_mode = 0 -offset_left = 1029.0 -offset_top = 15.0 -offset_right = 1408.0 -offset_bottom = 49.0 +offset_left = 1040.0 +offset_top = 12.0 +offset_right = 1416.0 +offset_bottom = 52.0 +theme_override_styles/panel = SubResource("StyleBoxFlat_6hcgs") + +[node name="chk_show_functional" type="CheckButton" parent="frame_button"] +layout_mode = 0 +offset_left = 2.0 +offset_top = 3.0 +offset_right = 374.0 +offset_bottom = 37.0 +focus_mode = 0 theme_override_font_sizes/font_size = 22 disabled = true -text = "Показать функциональную схему Э2" +text = "Функциональная схема Э2" flat = true [node name="connect_legend0" type="AnimatedSprite2D" parent="."] @@ -2037,5 +2053,5 @@ texture = ExtResource("22_1s34a") [connection signal="toggled" from="pribor_prd_v_4" to="pribor_prd_v_4" method="_on_toggled"] [connection signal="toggled" from="pribor_prd_n_4" to="pribor_prd_n_4" method="_on_toggled"] [connection signal="toggled" from="pribor_prd_k_4" to="pribor_prd_k_4" method="_on_toggled"] -[connection signal="toggled" from="chk_show_functional" to="." method="_on_chk_show_functional_toggled"] +[connection signal="toggled" from="frame_button/chk_show_functional" to="." method="_on_chk_show_functional_toggled"] [connection signal="pressed" from="control_prd_button" to="." method="_on_control_prd_pressed"] From cb1637e21c7c561925bc07a8167d37ae0d6ba776 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:49:49 +0300 Subject: [PATCH 3/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=9E=D0=B1=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=B0=20=D1=80=D0=B5=D0=BA=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B4=D0=BE=D0=B2=D0=B0=D0=BD=D0=BE=D0=B9=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=85=D0=B8=20=D0=BE=D1=82=20=D0=A1=D0=A2=D0=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/interfer.gd | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/interfer.gd b/scripts/interfer.gd index c9410a2a..bf8770a8 100644 --- a/scripts/interfer.gd +++ b/scripts/interfer.gd @@ -652,9 +652,20 @@ func get_krp(threat: threats.Threat): for key in ITERFER_MODE.keys(): var ecm_params = ITERFER_MODE[key][1] if not ecm_params.has('files'): continue - if ecm_params['files'] == threat.rparams['filename']: - krp = key - return krp + if typeof(ecm_params['files']) == TYPE_DICTIONARY: + for value in ecm_params['files'].values(): + if typeof(value) == TYPE_STRING: + if value == threat.rparams['filename']: + krp = key + return krp + elif typeof(value) == TYPE_ARRAY: + if value[0] == threat.rparams['filename']: + krp = key + return krp + elif typeof(ecm_params['files']) == TYPE_STRING: + if ecm_params['files'] == threat.rparams['filename']: + krp = key + return krp return krp From b44b0aafd1ac61a51a12bfb924498e4ab9619de4 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:51:00 +0300 Subject: [PATCH 4/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D0=B8=D0=BD=D0=B4=D0=B5=D0=BA=D1=81=D0=B0?= =?UTF-8?q?=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=8B=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/frame-ecm-list/scroll-ecm-list.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/scenes/frame-ecm-list/scroll-ecm-list.gd b/scenes/frame-ecm-list/scroll-ecm-list.gd index 8ad0a9fd..7433d7b2 100644 --- a/scenes/frame-ecm-list/scroll-ecm-list.gd +++ b/scenes/frame-ecm-list/scroll-ecm-list.gd @@ -127,6 +127,7 @@ func on_interfer_new(ecm, table_index): func on_interfer_off(ecm, table_index): + if not table_index.has(ecm.ispp): return $table.remove_row(table_index[ecm.ispp]) rehash(table_index) var sel_rows: Array From e7076354b447db3a93268f5a9cefb6e8de599e92 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:51:54 +0300 Subject: [PATCH 5/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=9F=D1=80=D0=B8=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BC=D0=BE=D1=89=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20=D1=81=D0=B8?= =?UTF-8?q?=D0=B3=D0=BD=D0=B0=D0=BB=D0=B0=20=D0=BE=D1=82=20=D1=86=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8=20=D0=BE=D1=82=20=D0=A1=D0=A2=D0=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/threats.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/threats.gd b/scripts/threats.gd index 1070cd29..7ad59b32 100644 --- a/scripts/threats.gd +++ b/scripts/threats.gd @@ -39,6 +39,7 @@ class Threat: func set_from_dic(dic: Dictionary): var items: = fflags.keys().filter(func(vn): return dic.has(vn)) items.any(func(vn): set(vn, dic[vn]); fflags[vn] = true; return false) + if dic.has('pow'): power = dic['pow'] signal threat_new(th: Threat) From 2f4ee7be3ce492abcc194cc3566f168bc2be37c0 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 9 Dec 2025 15:53:02 +0300 Subject: [PATCH 6/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=BB=D0=B3=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=D1=82=D0=BC=D0=B0=20=D0=B2=D0=B7=D0=B0=D0=B8=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=D0=B9=D1=81=D1=82=D0=B2=D0=B8=D1=8F=20=D1=81=20=D0=AF?= =?UTF-8?q?=D0=A3-07=D0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/эмс/yems-boards.gd | 2 ++ scripts/yau07.gd | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scenes/эмс/yems-boards.gd b/scenes/эмс/yems-boards.gd index eac8030a..16e8f641 100644 --- a/scenes/эмс/yems-boards.gd +++ b/scenes/эмс/yems-boards.gd @@ -310,10 +310,12 @@ class EmsBoard: return true func set_load_done(): + if unit_ems.cmd_state != unit_ems.CmdState.DONE: return state_board = LOADING unit_ems.send_load_ems_done(unit_ems.CmdCode.LOAD_EMS_DONE) func execute_cmd(): + if unit_ems.cmd_state != unit_ems.CmdState.DONE: return if len(cmd_array): state_board = WRITE var cmd: Array = cmd_array.pop_front() diff --git a/scripts/yau07.gd b/scripts/yau07.gd index ca6e1514..9c932da1 100644 --- a/scripts/yau07.gd +++ b/scripts/yau07.gd @@ -73,6 +73,8 @@ class YaU07 extends unit.Unit: rc = Error.OK cmd_tick_tx = tick cmd_retry -= 1 + cmd_num_tx = (cmd_num_rx + 1) % 0xffff + tx_data.encode_u16(2, cmd_num_tx) else: cmd_state = CmdState.FAIL emit_signal('command_fail', self)