From a865db4886d6df34272cd654a0911ca808285872 Mon Sep 17 00:00:00 2001 From: lepshiy Date: Fri, 25 Oct 2024 15:12:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BD=D0=B0=D0=B4=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B5=D0=B9=20=D0=B2=20"=D0=BA=D0=BE=D0=BD=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C"=20=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=86=D0=B5=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=BC=20=D0=B4=D0=B8?= =?UTF-8?q?=D0=B0=D0=BF=D0=B0=D0=B7=D0=BE=D0=BD=D0=B0=D0=BC=20(370-6000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/frame-ecm-list/frm-ecm-list.tscn | 13 ++- scenes/grid-buttons-ecm/grid-buttons-ecm.tscn | 12 +-- scenes/pribor-prd-k/kasseta-fs-kd.tscn | 2 +- scenes/pribor-prd-k/pribor-prd-k.tscn | 53 ++++++++- scenes/pribor-prd-n/kasseta-fs-nd.tscn | 2 +- scenes/pribor-prd-n/pribor-prd-n.tscn | 101 +++++++++++++++++- scenes/pribor-prd-v/pribor-prd-v.tscn | 52 ++++++++- scenes/контроль/кассета-п-1.tscn | 44 ++++---- scenes/контроль/кассета-у-5-к.tscn | 4 +- scenes/работа/работа.gd | 49 ++++++--- scenes/работа/работа.tscn | 4 +- scenes/эмс/кнопка-эмс.gd | 32 +++--- scripts/tools.gd | 3 +- scripts/yems-boards.gd | 22 ++-- 14 files changed, 292 insertions(+), 101 deletions(-) diff --git a/scenes/frame-ecm-list/frm-ecm-list.tscn b/scenes/frame-ecm-list/frm-ecm-list.tscn index fceb9ed..3b8c4c1 100644 --- a/scenes/frame-ecm-list/frm-ecm-list.tscn +++ b/scenes/frame-ecm-list/frm-ecm-list.tscn @@ -48,7 +48,7 @@ offset_left = 8.0 offset_top = 245.0 offset_right = 472.0 offset_bottom = 281.0 -columns = 4 +columns = 5 [node name="btn_srn" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")] layout_mode = 2 @@ -77,10 +77,19 @@ strips_rotation = 15.0 text = "КУПД" metadata/rfi_name = "ozp1" +[node name="btn_panika" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +tooltip_text = "Кнопка для принудительного включения группы секторов в режим КУПД" +strips_rotation = 15.0 +text = "Паника" +metadata/rfi_name = "ozp1" + [node name="btn_cancel" parent="grd_forced" groups=["прин-секторы-срн"] instance=ExtResource("4_7ys3c")] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 strips_rotation = 15.0 -text = "Отключить все" +text = "Очистить" metadata/rfi_name = "" diff --git a/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn b/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn index 880bd60..56a026e 100644 --- a/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn +++ b/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn @@ -5,7 +5,7 @@ [node name="grd_btns" type="GridContainer"] offset_right = 1096.0 offset_bottom = 54.0 -columns = 16 +columns = 15 [node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_oy80h")] layout_mode = 2 @@ -17,16 +17,6 @@ disabled = true toggle_mode = true metadata/rfi_name = "off" -[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_oy80h")] -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -strips_rotation = 30.0 -text = "Запрет" -disabled = true -toggle_mode = true -metadata/rfi_name = "auto" - [node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_oy80h")] layout_mode = 2 size_flags_horizontal = 3 diff --git a/scenes/pribor-prd-k/kasseta-fs-kd.tscn b/scenes/pribor-prd-k/kasseta-fs-kd.tscn index fb896b8..adeda22 100644 --- a/scenes/pribor-prd-k/kasseta-fs-kd.tscn +++ b/scenes/pribor-prd-k/kasseta-fs-kd.tscn @@ -56,7 +56,7 @@ offset_top = 33.0 offset_right = 205.0 offset_bottom = 183.0 fname = "Блок ФС-6" -rname = "A4" +rname = "A5" [node name="ref_A5" parent="." instance=ExtResource("3_kqnvt")] offset_left = 205.0 diff --git a/scenes/pribor-prd-k/pribor-prd-k.tscn b/scenes/pribor-prd-k/pribor-prd-k.tscn index f82df2d..9c9cb6b 100644 --- a/scenes/pribor-prd-k/pribor-prd-k.tscn +++ b/scenes/pribor-prd-k/pribor-prd-k.tscn @@ -1,13 +1,14 @@ -[gd_scene load_steps=9 format=3 uid="uid://m5s87q7m66lj"] +[gd_scene load_steps=10 format=3 uid="uid://m5s87q7m66lj"] [ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="1_8dmgr"] [ext_resource type="Script" path="res://scenes/контроль/прибор.gd" id="1_ufjwe"] [ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="2_14h25"] [ext_resource type="PackedScene" uid="uid://cm5jd4gjrrpba" path="res://scenes/контроль/кассета-у-5-к.tscn" id="2_tb85r"] [ext_resource type="PackedScene" uid="uid://bkxblfoj7ejv0" path="res://scenes/контроль/блок-а.tscn" id="6_fmhtx"] -[ext_resource type="PackedScene" uid="uid://dbxdb7lo7kofv" path="res://scenes/контроль/кассета-п-1.tscn" id="7_cjjs2"] [ext_resource type="PackedScene" uid="uid://bmagw8nd0ulhj" path="res://scenes/pribor-prd-k/kasseta-fs-kd.tscn" id="7_ia27q"] +[ext_resource type="Script" path="res://scenes/контроль/кассета.gd" id="7_xpa2n"] [ext_resource type="PackedScene" uid="uid://dq31j24gv5vi4" path="res://scenes/контроль/кассета-п-2.tscn" id="8_6fdp7"] +[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="8_la5yt"] [node name="pribor_prd_k" type="Control"] layout_mode = 3 @@ -24,6 +25,7 @@ offset_left = 175.0 offset_top = 242.0 offset_right = 485.0 offset_bottom = 432.0 +fname = "Кассета У5" [node name="lbl_header" type="Label" parent="."] layout_mode = 0 @@ -43,7 +45,7 @@ offset_top = 907.0 offset_right = 645.0 offset_bottom = 949.0 fname = "MAA2000" -rname = "A22" +rname = "A27" [node name="dou2_A7" parent="." instance=ExtResource("1_8dmgr")] layout_mode = 0 @@ -61,7 +63,7 @@ offset_top = 907.0 offset_right = 168.0 offset_bottom = 949.0 fname = "MAA2000" -rname = "A23" +rname = "A28" [node name="dou2_A8" parent="." instance=ExtResource("1_8dmgr")] layout_mode = 0 @@ -351,14 +353,55 @@ offset_right = 485.0 offset_bottom = 622.0 fname = "Кассета ФС-КД" -[node name="kasseta_p_1" parent="." instance=ExtResource("7_cjjs2")] +[node name="kasseta_p_1" type="NinePatchRect" parent="."] layout_mode = 0 offset_left = 175.0 offset_top = 622.0 offset_right = 340.0 offset_bottom = 812.0 +texture = ExtResource("2_14h25") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 +script = ExtResource("7_xpa2n") fname = "Кассета П-1" +[node name="ref_A26" parent="kasseta_p_1" instance=ExtResource("8_la5yt")] +offset_left = 9.0 +offset_top = 33.0 +offset_right = 59.0 +offset_bottom = 183.0 +fname = "ИП12-50" +rname = "A26" + +[node name="ref_A23" parent="kasseta_p_1" instance=ExtResource("8_la5yt")] +offset_left = 59.0 +offset_top = 33.0 +offset_right = 109.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A24" + +[node name="ref_A24" parent="kasseta_p_1" instance=ExtResource("8_la5yt")] +offset_left = 109.0 +offset_top = 33.0 +offset_right = 159.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A23" + +[node name="lbl_fname" type="Label" parent="kasseta_p_1"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 159.0 +offset_bottom = 33.0 +text = "Кассета П-1" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="kasseta_p_2" parent="." instance=ExtResource("8_6fdp7")] layout_mode = 0 offset_left = 365.0 diff --git a/scenes/pribor-prd-n/kasseta-fs-nd.tscn b/scenes/pribor-prd-n/kasseta-fs-nd.tscn index a6d27dc..6227ee9 100644 --- a/scenes/pribor-prd-n/kasseta-fs-nd.tscn +++ b/scenes/pribor-prd-n/kasseta-fs-nd.tscn @@ -39,7 +39,7 @@ offset_left = 105.0 offset_top = 32.0 offset_right = 155.0 offset_bottom = 182.0 -fname = "Блок ФС-2" +fname = "Блок ФС-3" rname = "A3" [node name="ref_A4" parent="." instance=ExtResource("2_mkgdh")] diff --git a/scenes/pribor-prd-n/pribor-prd-n.tscn b/scenes/pribor-prd-n/pribor-prd-n.tscn index e8e9d7e..c649aff 100644 --- a/scenes/pribor-prd-n/pribor-prd-n.tscn +++ b/scenes/pribor-prd-n/pribor-prd-n.tscn @@ -4,8 +4,8 @@ [ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_lpj3d"] [ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="4_i1no5"] [ext_resource type="PackedScene" uid="uid://bk1655p4e8y4u" path="res://scenes/контроль/кассета-у-5-нв.tscn" id="5_ej152"] -[ext_resource type="PackedScene" uid="uid://cd5sue1e8iyrv" path="res://scenes/pribor-prd-n/kasseta-fs-nd.tscn" id="6_1p3pi"] -[ext_resource type="PackedScene" uid="uid://dbxdb7lo7kofv" path="res://scenes/контроль/кассета-п-1.tscn" id="7_klldp"] +[ext_resource type="Script" path="res://scenes/контроль/кассета.gd" id="6_b1cob"] +[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="7_dqc3e"] [ext_resource type="PackedScene" uid="uid://bkxblfoj7ejv0" path="res://scenes/контроль/блок-а.tscn" id="8_u7eqo"] [node name="pribor_prd_n" type="Control"] @@ -96,22 +96,113 @@ offset_right = 485.0 offset_bottom = 432.0 fname = "Кассета У5" -[node name="kasseta_FS_ND" parent="." instance=ExtResource("6_1p3pi")] +[node name="kasseta_FS_ND" type="NinePatchRect" parent="."] layout_mode = 0 offset_left = 175.0 offset_top = 432.0 offset_right = 485.0 offset_bottom = 622.0 +texture = ExtResource("4_i1no5") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 +script = ExtResource("6_b1cob") fname = "Кассета ФС-НД" +metadata/Fname = "" -[node name="kasseta_P_1" parent="." instance=ExtResource("7_klldp")] +[node name="lbl_fname" type="Label" parent="kasseta_FS_ND"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 5.0 +offset_top = 7.0 +offset_right = 303.0 +offset_bottom = 33.0 +text = "Кассета ФС-НД" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ref_A2" parent="kasseta_FS_ND" instance=ExtResource("7_dqc3e")] +offset_left = 55.0 +offset_top = 32.0 +offset_right = 105.0 +offset_bottom = 182.0 +fname = "Модуль ФС" +rname = "A1" + +[node name="ref_A3" parent="kasseta_FS_ND" instance=ExtResource("7_dqc3e")] +offset_left = 105.0 +offset_top = 32.0 +offset_right = 155.0 +offset_bottom = 182.0 +fname = "Блок ФС-2" +rname = "A3" + +[node name="ref_A4" parent="kasseta_FS_ND" instance=ExtResource("7_dqc3e")] +offset_left = 155.0 +offset_top = 32.0 +offset_right = 205.0 +offset_bottom = 182.0 +fname = "Модуль ФС" +rname = "A2" + +[node name="ref_A6" parent="kasseta_FS_ND" instance=ExtResource("7_dqc3e")] +offset_left = 205.0 +offset_top = 32.0 +offset_right = 255.0 +offset_bottom = 182.0 +fname = "Блок ФС-3" +rname = "A4" + +[node name="kasseta_P_1" type="NinePatchRect" parent="."] layout_mode = 0 offset_left = 175.0 offset_top = 622.0 offset_right = 485.0 offset_bottom = 812.0 +texture = ExtResource("4_i1no5") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 +script = ExtResource("6_b1cob") fname = "Кассета П-1" +[node name="ref_A26" parent="kasseta_P_1" instance=ExtResource("7_dqc3e")] +offset_left = 9.0 +offset_top = 33.0 +offset_right = 59.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A19" + +[node name="ref_A23" parent="kasseta_P_1" instance=ExtResource("7_dqc3e")] +offset_left = 59.0 +offset_top = 33.0 +offset_right = 109.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A20" + +[node name="ref_A24" parent="kasseta_P_1" instance=ExtResource("7_dqc3e")] +offset_left = 109.0 +offset_top = 33.0 +offset_right = 159.0 +offset_bottom = 183.0 +fname = "ИП12-50" +rname = "A21" + +[node name="lbl_fname" type="Label" parent="kasseta_P_1"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 159.0 +offset_bottom = 33.0 +text = "Кассета П-1" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="um1535_A7" parent="." instance=ExtResource("8_u7eqo")] layout_mode = 0 offset_left = 485.0 @@ -212,7 +303,7 @@ value_name1 = "P, %" name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) fname = "УМ1535А" -rname = "A11" +rname = "A12" [node name="um1535_A13" parent="." instance=ExtResource("8_u7eqo")] layout_mode = 0 diff --git a/scenes/pribor-prd-v/pribor-prd-v.tscn b/scenes/pribor-prd-v/pribor-prd-v.tscn index 359d924..900676d 100644 --- a/scenes/pribor-prd-v/pribor-prd-v.tscn +++ b/scenes/pribor-prd-v/pribor-prd-v.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=8 format=3 uid="uid://cvskpe1ti3p45"] +[gd_scene load_steps=9 format=3 uid="uid://cvskpe1ti3p45"] [ext_resource type="Script" path="res://scenes/контроль/прибор.gd" id="1_dl7rt"] [ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_xpo4b"] [ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="3_wyy1b"] [ext_resource type="PackedScene" uid="uid://bk1655p4e8y4u" path="res://scenes/контроль/кассета-у-5-нв.tscn" id="4_gl2bl"] [ext_resource type="PackedScene" uid="uid://cd5sue1e8iyrv" path="res://scenes/pribor-prd-n/kasseta-fs-nd.tscn" id="5_nhd2k"] -[ext_resource type="PackedScene" uid="uid://dbxdb7lo7kofv" path="res://scenes/контроль/кассета-п-1.tscn" id="6_d3awr"] +[ext_resource type="Script" path="res://scenes/контроль/кассета.gd" id="6_os4mt"] +[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="7_38u2b"] [ext_resource type="PackedScene" uid="uid://bkxblfoj7ejv0" path="res://scenes/контроль/блок-а.tscn" id="7_e22c6"] [node name="pribor_prd_n" type="Control"] @@ -104,13 +105,54 @@ offset_right = 485.0 offset_bottom = 622.0 fname = "Кассета ФС-ВД" -[node name="kasseta_P_1" parent="." instance=ExtResource("6_d3awr")] +[node name="kasseta_P_1" type="NinePatchRect" parent="."] layout_mode = 0 offset_left = 175.0 offset_top = 622.0 offset_right = 485.0 offset_bottom = 812.0 -fname = "Кассета П-1" +texture = ExtResource("3_wyy1b") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 +script = ExtResource("6_os4mt") +fname = "Кассета П-1В" + +[node name="ref_A26" parent="kasseta_P_1" instance=ExtResource("7_38u2b")] +offset_left = 9.0 +offset_top = 33.0 +offset_right = 59.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A19" + +[node name="ref_A23" parent="kasseta_P_1" instance=ExtResource("7_38u2b")] +offset_left = 59.0 +offset_top = 33.0 +offset_right = 109.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A20" + +[node name="ref_A24" parent="kasseta_P_1" instance=ExtResource("7_38u2b")] +offset_left = 109.0 +offset_top = 33.0 +offset_right = 159.0 +offset_bottom = 183.0 +fname = "ИП12-50" +rname = "A21" + +[node name="lbl_fname" type="Label" parent="kasseta_P_1"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 159.0 +offset_bottom = 33.0 +text = "Кассета П-1В" +horizontal_alignment = 1 +vertical_alignment = 1 [node name="um1535_A7" parent="." instance=ExtResource("7_e22c6")] layout_mode = 0 @@ -224,7 +266,7 @@ value_name1 = "P, %" name_min_size0 = Vector2i(35, 20) name_min_size1 = Vector2i(35, 20) fname = "УМ1535А" -rname = "A11" +rname = "A12" [node name="um1535_A13" parent="." instance=ExtResource("7_e22c6")] layout_mode = 0 diff --git a/scenes/контроль/кассета-п-1.tscn b/scenes/контроль/кассета-п-1.tscn index 3a1ad51..4a1a6cd 100644 --- a/scenes/контроль/кассета-п-1.tscn +++ b/scenes/контроль/кассета-п-1.tscn @@ -5,7 +5,7 @@ [ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="3_gg14a"] [node name="kasseta_p_1" type="NinePatchRect"] -offset_right = 165.0 +offset_right = 173.0 offset_bottom = 190.0 texture = ExtResource("1_sbi2k") patch_margin_left = 16 @@ -15,36 +15,36 @@ patch_margin_bottom = 16 script = ExtResource("2_7ydqi") [node name="ref_A26" parent="." instance=ExtResource("3_gg14a")] -offset_left = 7.0 -offset_top = 30.0 -offset_right = 57.0 -offset_bottom = 180.0 +offset_left = 9.0 +offset_top = 33.0 +offset_right = 59.0 +offset_bottom = 183.0 fname = "ИП12-50" -rname = "A26" +rname = "A19" [node name="ref_A23" parent="." instance=ExtResource("3_gg14a")] -offset_left = 57.0 -offset_top = 30.0 -offset_right = 107.0 -offset_bottom = 180.0 -fname = "ИП9-50" -rname = "A23" - -[node name="ref_A24" parent="." instance=ExtResource("3_gg14a")] -offset_left = 107.0 -offset_top = 30.0 -offset_right = 157.0 -offset_bottom = 180.0 +offset_left = 59.0 +offset_top = 33.0 +offset_right = 109.0 +offset_bottom = 183.0 fname = "ИП9-50" rname = "A24" +[node name="ref_A24" parent="." instance=ExtResource("3_gg14a")] +offset_left = 109.0 +offset_top = 33.0 +offset_right = 159.0 +offset_bottom = 183.0 +fname = "ИП9-50" +rname = "A23" + [node name="lbl_fname" type="Label" parent="."] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 -offset_left = 5.0 -offset_top = 5.0 -offset_right = 157.0 -offset_bottom = 30.0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 159.0 +offset_bottom = 33.0 text = "Кассета" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/scenes/контроль/кассета-у-5-к.tscn b/scenes/контроль/кассета-у-5-к.tscn index b32a91c..31b4a3b 100644 --- a/scenes/контроль/кассета-у-5-к.tscn +++ b/scenes/контроль/кассета-у-5-к.tscn @@ -63,7 +63,7 @@ offset_top = 32.0 offset_right = 255.0 offset_bottom = 182.0 fname = "УКП" -rname = "A35" +rname = "A36" [node name="ref_A36" parent="." instance=ExtResource("3_wtlpi")] offset_left = 254.0 @@ -71,4 +71,4 @@ offset_top = 32.0 offset_right = 304.0 offset_bottom = 182.0 fname = "УКП" -rname = "A36" +rname = "A35" diff --git a/scenes/работа/работа.gd b/scenes/работа/работа.gd index 84bc34f..3d60105 100644 --- a/scenes/работа/работа.gd +++ b/scenes/работа/работа.gd @@ -66,13 +66,13 @@ const fs_sectors: Dictionary = { 1: [270.0, 360.0] } const fs_freq: Dictionary = { - 0: [400.0, 1200.0], - 1: [1200.0, 2000.0], - 2: [2000.0, 2800.0], - 3: [2800.0, 3600.0], - 4: [3600.0, 4400.0], - 5: [4400.0, 5200.0], - 6: [5200.0, 6000.0] } + 0: [370.0, 800.0, 200.0, 250.0], + 1: [800.0, 1065.0, 250.0, 300.0], + 2: [1065.0, 1180.0, 300.0, 350.0], + 3: [1180.0, 1450.0, 350.0, 400.0], + 4: [1450.0, 2000.0, 400.0, 450.0], + 5: [2000.0, 3500.0, 450.0, 500.0], + 6: [3500.0, 6000.0, 500.0, 550.0] } ## Размеры карты для разных режимов РТО и РЛС соответственно @@ -82,7 +82,6 @@ const map_sizes = [ var fs_band = fs_band_rto ## Текущий режим блоков ФС по частоте var fs_selected: Dictionary ## Словарь выбранных секторов var fs_active: Dictionary ## Словарь секторов назначенных на подавление - ## Состояние перетаскивания. enum DragFSM { DRAG, ## В процессе. @@ -168,18 +167,32 @@ func get_all_nodes(root): for child in root.get_children(): nodes.append_array(get_all_nodes(child)) return nodes - + ## Производит отображение цели на диаграмму. func map_threat_to_bip(th: threats.Threat, bip: Control): - bip.position = tools.pos_calc( - th.freq, - th.aoa, - radius_center, - radius_internal, - radius_outter, - freq_low, - freq_high) - bip.size / 2 + var freq = th.freq + var sector_key = null + var sector_width = 50.0 + for key in fs_freq: + var freq_range = fs_freq[key] + var num_values = (freq_range[1]- freq_range[0]) / sector_width + if freq_range[0] <= freq and freq <= freq_range[1]: + sector_key = key + break + if sector_key!= null: + radius_internal = fs_freq[sector_key][2] + radius_outter = fs_freq[sector_key][3] + freq_low = fs_freq[sector_key][0] + freq_high = fs_freq[sector_key][1] + bip.position = tools.pos_calc( + th.freq, + th.aoa, + radius_center, + radius_internal, + radius_outter, + freq_low, + freq_high) - bip.size / 2 ## Обработчик сигнала обновления цели. @@ -241,6 +254,7 @@ func on_threat_lost(th) -> void: remove_child(bip) bip.free() + ## обработчик нажатия на цель на экране. func on_bip_pressed(th_id, _ecm_btns): if btn_select == BtnSel.THREAT: @@ -430,6 +444,7 @@ func update_fs_colors(): fs_colors[key] = color_select $canvas.set_band_colors(fs_colors) + func unsel_fs_all(need_btns_off: bool): fs_selected.clear() update_fs_colors() diff --git a/scenes/работа/работа.tscn b/scenes/работа/работа.tscn index 357d0d0..c775be4 100644 --- a/scenes/работа/работа.tscn +++ b/scenes/работа/работа.tscn @@ -21,10 +21,10 @@ col_red = Color(1, 0.568627, 0.431373, 0.239216) drag_scale_band = 0.05 drag_scale_width = 0.5 freq_high = 6000.0 -freq_low = 400.0 +freq_low = 370.0 radius_center = Vector2(560, 560) radius_internal = 200.0 -radius_outter = 350.0 +radius_outter = 200.0 strob_max_band = 15.538 strob_max_width = 90.0 strob_min_band = 0.1 diff --git a/scenes/эмс/кнопка-эмс.gd b/scenes/эмс/кнопка-эмс.gd index e8aa9c4..37bcaf7 100644 --- a/scenes/эмс/кнопка-эмс.gd +++ b/scenes/эмс/кнопка-эмс.gd @@ -4,28 +4,28 @@ extends PanelContainer @export var texture_state0: Texture2D = preload('res://data/кнопка-эмс-1.png'): - set(val): $state.set_texture(val) + set(val): $state.set_texture(val) @export var texture_state1: Texture2D = preload('res://data/кнопка-эмс-0.png'): - set(val): $state.set_texture(val) + set(val): $state.set_texture(val) @export var text: String = '': - set(val): $button.set_text(val) - get: return $button.get_text() + set(val): $button.set_text(val) + get: return $button.get_text() @export var pressed: bool = false: - set(val): $button.set_pressed(val) - get: return $button.is_pressed() + set(val): $button.set_pressed(val) + get: return $button.is_pressed() @export var toggle_mode: bool = false: - set(val): - if is_inside_tree(): - $button.set_toggle_mode(val) - get: return $button.is_toggle_mode() + set(val): + if is_inside_tree(): + $button.set_toggle_mode(val) + get: return $button.is_toggle_mode() func set_text (val: String): $button.set_text(val) @@ -33,8 +33,8 @@ func set_pressed (val: bool): $button.set_pressed(val) func set_toggle_mode (val: bool): - if is_inside_tree(): - $button.set_toggle_mode(val) + if is_inside_tree(): + $button.set_toggle_mode(val) func get_text(): return $button.get_text() @@ -43,13 +43,13 @@ func is_toggle_mode(): return $button.is_toggle_mode() func _on_button_toggled(val: bool): - if val: $state.set_texture(texture_state1) - else: $state.set_texture(texture_state0) + if val: $state.set_texture(texture_state1) + else: $state.set_texture(texture_state0) func button_connect(button_signal: String, proc: Callable): - $button.connect(button_signal, proc) + $button.connect(button_signal, proc) func _on_button_mouse_entered(): - emit_signal("mouse_entered") + emit_signal("mouse_entered") diff --git a/scripts/tools.gd b/scripts/tools.gd index d19a303..beeee06 100644 --- a/scripts/tools.gd +++ b/scripts/tools.gd @@ -72,8 +72,9 @@ func get_string_slice(s_in: String, s_out: Array, i0: int, i1: int): ## Производит преобразование из декартовой в полярную систему координат. func pos_calc(freq: float, aoa: float, pos0: Vector2, r0: float, r1: float, f0: float, f1: float): - var r = ((freq - f0) / (f1 - f0)) * r1 + r0 + var r = remap(freq, f0, f1, r0, r1) var aoa_rad = radians(aoa) - PI / 2.0 + return Vector2(cos(aoa_rad), sin(aoa_rad)) * r + pos0 diff --git a/scripts/yems-boards.gd b/scripts/yems-boards.gd index 8e14f3d..1c5edb1 100644 --- a/scripts/yems-boards.gd +++ b/scripts/yems-boards.gd @@ -1,15 +1,15 @@ class_name yems_boards extends Node class EmsBoard: - var id_board: String - var in_devs: Dictionary ## Словарь с входными устройствами. - var out_devs: Dictionary ## Словарь с выходными устройствами. - var base_addr_isa: int ## Базовый адрес ячейки isa. - var in_tbl: Array - var out_tbl: Array + var id_board: String + var in_devs: Dictionary ## Словарь с входными устройствами. + var out_devs: Dictionary ## Словарь с выходными устройствами. + var base_addr_isa: int ## Базовый адрес ячейки isa. + var in_tbl: Array + var out_tbl: Array - func _init(id, base_addr, in_table, out_table): - id_board = id - in_tbl = in_table - out_tbl = out_table - base_addr_isa = base_addr + func _init(id, base_addr, in_table, out_table): + id_board = id + in_tbl = in_table + out_tbl = out_table + base_addr_isa = base_addr