diff --git a/scenes/canvas.tscn b/scenes/canvas.tscn index de171bdd..a6d08416 100644 --- a/scenes/canvas.tscn +++ b/scenes/canvas.tscn @@ -8,7 +8,7 @@ [sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_2bft1"] size = Vector2(1600, 1200) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_laka7"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ogspn"] resource_local_to_scene = true shader = ExtResource("4_gb4a1") shader_parameter/color = Color(1, 1, 1, 0.168627) @@ -26,6 +26,6 @@ centered = false script = ExtResource("2_vkwmy") [node name="строб" parent="." instance=ExtResource("3_uhdvc")] -material = SubResource("ShaderMaterial_laka7") +material = SubResource("ShaderMaterial_ogspn") position = Vector2(560, 560) scale = Vector2(1100, 1100) diff --git a/scenes/frm_threats.gd b/scenes/frm_threats.gd deleted file mode 100644 index ae162802..00000000 --- a/scenes/frm_threats.gd +++ /dev/null @@ -1,24 +0,0 @@ -extends "res://scenes/рамка.gd" - -var TableHeader = preload('res://table/header.tscn') -var TableNode = preload('res://table/node.tscn') -var db_th_id = 0 - - -func on_row_pressed(i_row: int): - var selected = $scrl_threats/tbl_threats.is_row_selected(i_row) - $scrl_threats/tbl_threats.set_row_selected(i_row, not selected) - - -func _ready() -> void: - assert(TableHeader) - assert(TableNode) - call_deferred('init_table') - - -func init_table(): - $scrl_threats/tbl_threats.set_header([TableHeader, TableHeader, TableHeader, TableHeader]) - $scrl_threats/tbl_threats.set_header_text(['Номер', 'Пеленг', 'Частота, МГц', 'Назначено']) - $scrl_threats/tbl_threats.set_columns_min_size([50, 140, 140, 100]) - $scrl_threats/tbl_threats.pin_header($scrl_threats, self) - $scrl_threats/tbl_threats.connect('row_pressed', Callable(self, 'on_row_pressed')) diff --git a/scenes/scrl_threats.gd b/scenes/scrl_threats.gd new file mode 100644 index 00000000..bb28aad9 --- /dev/null +++ b/scenes/scrl_threats.gd @@ -0,0 +1,61 @@ +extends ScrollContainer + +const CellLineEdit = preload('res://scenes/ячейка-2.tscn') +const TableHeader = preload('res://table/header.tscn') +const TableNode = preload('res://table/node.tscn') + + +const TABLE_ROW = [CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit] +const TABLE_COLUMN_PARAM = ['id', 'aoa', 'freq', 'proto'] ## Параметры цели отображаемые в таблице. +const TABLE_HEADERS_TEXT = ['Номер', 'Пеленг', 'Частота, МГц', 'Протокол'] ## + + +func on_row_pressed(i_row: int): + var selected = $tbl_threats.is_row_selected(i_row) + $tbl_threats.set_row_selected(i_row, not selected) + + +func init_table(): + $tbl_threats.set_header([TableHeader, TableHeader, TableHeader, TableHeader]) + $tbl_threats.set_header_text(TABLE_HEADERS_TEXT) + $tbl_threats.set_columns_min_size([50, 140, 140, 100]) + $tbl_threats.pin_header(self, get_parent()) + $tbl_threats.connect('row_pressed', Callable(self, 'on_row_pressed')) + + +func _ready() -> void: + var th_table_id: = Dictionary() + Threats.connect('threat_new', Callable(self, 'on_threat_new').bind(th_table_id)) + Threats.connect('threat_lost', Callable(self, 'on_threat_lost').bind(th_table_id)) + call_deferred('init_table') + + +func rehash(th_table_id: Dictionary): + var rows_count = $tbl_threats.get_rows_count() + for i_row in rows_count: + var item = $tbl_threats.get_node2(0, i_row) + th_table_id[int(item.text)] = i_row + + +func on_threat_lost(_threats, th, th_table_id: Dictionary): + $tbl_threats.remove_row(th_table_id[th.id]) + th_table_id.clear() + rehash(th_table_id) + + +func on_threat_new(_threats, th, th_table_id): + var i_row = $tbl_threats.get_rows_count() + $tbl_threats.add_row(TABLE_ROW) + var row = map_th_to_row(th) + $tbl_threats.set_row_text(i_row, row) + th_table_id[th.id] = i_row + + +func map_th_to_row(th): + var row: = Array() + row.resize(TABLE_COLUMN_PARAM.size()) + var i_col: int = 0 + for param_name in TABLE_COLUMN_PARAM: + row[i_col] = '%s' % th.get(param_name) + i_col += 1 + return row diff --git a/scenes/журнал.gd b/scenes/журнал.gd index d6e6b358..5b9e6250 100644 --- a/scenes/журнал.gd +++ b/scenes/журнал.gd @@ -7,6 +7,7 @@ func on_command_fail(unit, addr): Log.message(Logger.ERROR, 'Ошибка: ко func _ready() -> void: Log.info('Модуль журнала работы готов') + Log.info('Операционная система: %s' % [OS.get_distribution_name()]) Threats.connect('threat_new', Callable(self, 'on_threats_changed').bind('Цель обнаружена')) Threats.connect('threat_lost', Callable(self, 'on_threats_changed').bind('Цель потеряна')) diff --git a/scenes/кнопка-эмс.gd b/scenes/кнопка-эмс.gd index e6822b5c..37bcaf7d 100644 --- a/scenes/кнопка-эмс.gd +++ b/scenes/кнопка-эмс.gd @@ -4,11 +4,11 @@ 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 = '': @@ -53,4 +53,3 @@ func button_connect(button_signal: String, proc: Callable): func _on_button_mouse_entered(): emit_signal("mouse_entered") - diff --git a/scenes/работа.gd b/scenes/работа.gd index 4cb6917d..336859f6 100644 --- a/scenes/работа.gd +++ b/scenes/работа.gd @@ -129,7 +129,7 @@ func get_strob_band(pos: Vector2, prev: float) -> float: ## Устанавливает центр строба по частоте и направлению func set_strob(pos: Vector2) -> void: var radp: Vector2 = Tools.map_dec_to_rad(strob_center, pos) - if radp.y < $canvas.get_radius_max(): + if radp.y < $canvas.get_radius_outter(): $canvas.set_strob_dir(radp.x) $canvas.set_strob_radius(radp.y) diff --git a/scenes/работа.tscn b/scenes/работа.tscn index 40579c56..56ce1a72 100644 --- a/scenes/работа.tscn +++ b/scenes/работа.tscn @@ -1,19 +1,19 @@ [gd_scene load_steps=10 format=3 uid="uid://b276iygic5itk"] -[ext_resource type="Script" path="res://scenes/работа.gd" id="1_mjubw"] -[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_e52cq"] -[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="3_e52uj"] -[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/frame.tscn" id="4_q174u"] -[ext_resource type="Script" path="res://scenes/frm_threats.gd" id="5_j3m4d"] -[ext_resource type="Script" path="res://table/table.gd" id="6_vxixh"] -[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="7_jt1qo"] -[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="8_1iv1j"] +[ext_resource type="Script" path="res://scenes/работа.gd" id="1_qjoce"] +[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_47xio"] +[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="2_bl0yt"] +[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/frame.tscn" id="3_l1omj"] +[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="4_5es2r"] +[ext_resource type="Script" path="res://table/table.gd" id="4_mqhcf"] +[ext_resource type="Script" path="res://scenes/scrl_threats.gd" id="6_nr8d7"] +[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="7_22fjb"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ugj8"] [node name="Работа" type="Panel"] -script = ExtResource("1_mjubw") -Bip = ExtResource("2_e52cq") +script = ExtResource("1_qjoce") +Bip = ExtResource("2_47xio") col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627) col_red = Color(1, 0.568627, 0.431373, 0.239216) drag_scale_band = 0.05 @@ -25,20 +25,19 @@ strob_min_width = 5.0 metadata/_edit_vertical_guides_ = [] metadata/_edit_lock_ = true -[node name="canvas" parent="." instance=ExtResource("3_e52uj")] +[node name="canvas" parent="." instance=ExtResource("2_bl0yt")] metadata/_edit_lock_ = true -[node name="frm_threats" parent="." instance=ExtResource("4_q174u")] +[node name="frm_threats" parent="." instance=ExtResource("3_l1omj")] layout_mode = 0 offset_left = 1121.0 offset_top = 6.0 offset_right = 1594.0 offset_bottom = 642.0 -script = ExtResource("5_j3m4d") -text = "Список целей" +script = null metadata/_edit_lock_ = true -[node name="рамка-параметры-цели" parent="frm_threats" instance=ExtResource("4_q174u")] +[node name="рамка-параметры-цели" parent="frm_threats" instance=ExtResource("3_l1omj")] layout_mode = 0 offset_left = 5.0 offset_top = 313.0 @@ -204,13 +203,14 @@ offset_top = 57.0 offset_right = 464.0 offset_bottom = 306.0 horizontal_scroll_mode = 0 +script = ExtResource("6_nr8d7") [node name="tbl_threats" type="GridContainer" parent="frm_threats/scrl_threats"] layout_mode = 2 columns = 4 -script = ExtResource("6_vxixh") +script = ExtResource("4_mqhcf") -[node name="рамка-сеансы-помех" parent="." instance=ExtResource("4_q174u")] +[node name="рамка-сеансы-помех" parent="." instance=ExtResource("3_l1omj")] layout_mode = 0 offset_left = 1121.0 offset_top = 648.0 @@ -304,7 +304,7 @@ theme_override_colors/font_color = Color(0.729412, 0.729412, 0.729412, 1) text = "ПД-М4С" horizontal_alignment = 1 -[node name="рамка-помеха" parent="рамка-сеансы-помех" instance=ExtResource("4_q174u")] +[node name="рамка-помеха" parent="рамка-сеансы-помех" instance=ExtResource("3_l1omj")] layout_mode = 0 offset_left = 5.0 offset_top = 250.0 @@ -463,7 +463,7 @@ theme_override_colors/font_color = Color(0.729412, 0.729412, 0.729412, 1) text = "ЛЧМ" horizontal_alignment = 1 -[node name="btn_auto_threat" parent="." instance=ExtResource("7_jt1qo")] +[node name="btn_auto_threat" parent="." instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 912.0 offset_top = 67.0 @@ -471,7 +471,7 @@ offset_right = 1102.0 offset_bottom = 117.0 text = "Автоматически" -[node name="btn_strobe" parent="." instance=ExtResource("7_jt1qo")] +[node name="btn_strobe" parent="." instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 912.0 offset_top = 6.0 @@ -479,7 +479,7 @@ offset_right = 1102.0 offset_bottom = 56.0 text = "Строб" -[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 980.0 @@ -491,7 +491,7 @@ grow_vertical = 2 text = "ОЗП-1" metadata/rfi_name = "ozp1" -[node name="btn_p4" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p4" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 1052.0 @@ -504,7 +504,7 @@ tooltip_text = "Выбор цели или сектора" text = "<-" metadata/rfi_name = "" -[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 840.0 offset_top = 1118.0 @@ -513,7 +513,7 @@ offset_bottom = 1168.0 text = "СВ-М2" metadata/rfi_name = "svm2" -[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 910.0 offset_top = 1118.0 @@ -522,7 +522,7 @@ offset_bottom = 1168.0 text = "K1" metadata/rfi_name = "k1" -[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 770.0 offset_top = 1118.0 @@ -531,7 +531,7 @@ offset_bottom = 1168.0 text = "СВ-И1" metadata/rfi_name = "svi1" -[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 700.0 offset_top = 1118.0 @@ -540,7 +540,7 @@ offset_bottom = 1168.0 text = "ПД-ЧМ" metadata/rfi_name = "pdchm" -[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 630.0 @@ -552,7 +552,7 @@ grow_vertical = 2 text = "ПД-М4С" metadata/rfi_name = "pdm4s" -[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 350.0 offset_top = 1118.0 @@ -561,7 +561,7 @@ offset_bottom = 1168.0 text = "ЛЧМ-1" metadata/rfi_name = "lchm1" -[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 420.0 @@ -573,7 +573,7 @@ grow_vertical = 2 text = "МЧМ-1" metadata/rfi_name = "mchm1" -[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 490.0 @@ -585,7 +585,7 @@ grow_vertical = 2 text = "ПД-М2" metadata/rfi_name = "pdm2" -[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 560.0 @@ -597,7 +597,7 @@ grow_vertical = 2 text = "ПД-М4" metadata/rfi_name = "pdm4" -[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 1 anchors_preset = -1 offset_left = 280.0 @@ -609,7 +609,7 @@ grow_vertical = 2 text = "СРН-М2" metadata/rfi_name = "srnm2" -[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 210.0 offset_top = 1118.0 @@ -618,7 +618,7 @@ offset_bottom = 1168.0 text = "СРН-И1" metadata/rfi_name = "srni1" -[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 140.0 offset_top = 1118.0 @@ -627,7 +627,7 @@ offset_bottom = 1168.0 text = "Откл." metadata/rfi_name = "" -[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_jt1qo")] +[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")] layout_mode = 0 offset_left = 10.0 offset_top = 1118.0 @@ -643,7 +643,7 @@ offset_left = 96.0 offset_top = 109.0 offset_right = 164.0 offset_bottom = 142.0 -theme_override_fonts/font = ExtResource("8_1iv1j") +theme_override_fonts/font = ExtResource("7_22fjb") theme_override_font_sizes/font_size = 20 text = "88" vertical_alignment = 1 @@ -652,7 +652,7 @@ vertical_alignment = 1 layout_mode = 0 offset_right = 68.0 offset_bottom = 33.0 -theme_override_fonts/font = ExtResource("8_1iv1j") +theme_override_fonts/font = ExtResource("7_22fjb") theme_override_font_sizes/font_size = 20 text = "00" vertical_alignment = 1 @@ -664,7 +664,7 @@ offset_left = 96.0 offset_top = 29.0 offset_right = 188.0 offset_bottom = 88.0 -theme_override_fonts/font = ExtResource("8_1iv1j") +theme_override_fonts/font = ExtResource("7_22fjb") theme_override_font_sizes/font_size = 56 text = "88" @@ -672,7 +672,7 @@ text = "88" layout_mode = 0 offset_right = 92.0 offset_bottom = 59.0 -theme_override_fonts/font = ExtResource("8_1iv1j") +theme_override_fonts/font = ExtResource("7_22fjb") theme_override_font_sizes/font_size = 56 text = "00" diff --git a/scripts/capsrpb.gd b/scripts/capsrpb.gd index 8478e7d4..ac3b93ab 100644 --- a/scripts/capsrpb.gd +++ b/scripts/capsrpb.gd @@ -3,22 +3,22 @@ extends Node ## Реализация "Протокол информационного сопряжения ## СПО АСУ изделия «МП‑550» с СПО «Управления КАПС РПБ»" -const ONLINE_TIMEOUT = 5.0 ## Время ожидания пакета от ячейки, секунды -const BUFFER_SIZE = 2048 ## Размер приёмного буфера для датаграмм + +const ONLINE_TIMEOUT = 3000 ## Время ожидания пакета от КАПС РПБ, мс +const BUFFER_SIZE = 2048 ## Размер приёмного буфера для датаграмм class CapsRpb: - signal line_changed(unit: CapsRpb) - signal data_received(unit: CapsRpb) - signal command_fail(unit: CapsRpb) - signal parse_error(unit: CapsRpb, msg: String) + signal line_changed(unit: CapsRpb) ## Сигнал состояние связи изменилось + signal data_received(unit: CapsRpb) ## Сигнал данные приняты + signal command_fail(unit: CapsRpb) ## Сигнал при не выполнении команды + signal parse_error(unit: CapsRpb, msg: String) ## Сигнал ошибки разбора сообщения static var json_conv: = JSON.new() - var online: = false - var name: String - var json_dic: Dictionary - var tick: = 0.0 - var tick_rx: = 0.0 + var online: = false ## Состояние на связи + var name: String ## Имя экземпляра + var json_dic: Dictionary ## Аппарат для разбора сообщений + var tick: = 0 ## Тик время последнего обновления, мс func _to_string() -> String: return String('капсрпб: "%s" %s ' % [self.name, ['отключен', 'на связи'][int(online)]]) func _init(nm): self.name = nm diff --git a/scripts/repsettings.gd b/scripts/repsettings.gd index d9261c4d..c060ef81 100644 --- a/scripts/repsettings.gd +++ b/scripts/repsettings.gd @@ -31,8 +31,8 @@ extends Node 'time_lost': 5000, ## Время после последнего обновления в мс, через которое цель считается потерянной 'freq_low': 200.0, ## Нижняя рабочая частота, МГЦ 'freq_high': 6000.0, ## Нижняя рабочая частота, МГЦ - 'radius_inner': 100, ## Внутренний радиус диаграммы в пикселях для отображения частота-пеленг - 'radius_outter': 800 ## Наружний радиус диаграммы в пикселях для отображения частота-пеленг + 'radius_inner': 200, ## Внутренний радиус диаграммы в пикселях для отображения частота-пеленг + 'radius_outter': 550 ## Наружний радиус диаграммы в пикселях для отображения частота-пеленг } diff --git a/scripts/threats.gd b/scripts/threats.gd index 778b0f9b..0353ebe1 100644 --- a/scripts/threats.gd +++ b/scripts/threats.gd @@ -5,26 +5,26 @@ extends Node ## Цель class Threat: - var alt: float ## Текущая высота, метры. - var aoa: float ## Курсовой угол на источник сигнала, градусы. - var atick: float ## Тик обнаружения. - var baud: float ## Модуляционная скорость. - var fflags: Dictionary ## Флаги достоверности полей. - var freq: float ## Частота несущей или центральная частота, МГц. - var freqm: String ## Режим смены частоты. - var lat: float ## Текущие координаты, долгота в градусах. - var lon: float ## Текущие координаты, широта в градусах. - var power: float ## Уровень принимаемого сигнала, дБм. - var proto: String ## Тип протокола источника сигнала. - var rkrp: String ## Рекомендуемый режим помехи. - var rparams: String ## Рекомендуемые параметры помехи. - var salt: float ## Координаты старта, высота от уровня моря, м. - var slat: float ## Координаты старта, широта в градусах. - var slon: float ## Координаты старта, долгота в градусах. - var tick: int ## Время приёма сигнала, мс. - var tmod: String ## Тип модуляции. - var width: float ## Ширина занимаемого диапазона частот, МГц. - var id: int ## Идентификатор цели. + var alt: float ## Текущая высота, метры. + var aoa: float ## Курсовой угол на источник сигнала, градусы. + var atick: float ## Тик обнаружения. + var baud: float ## Модуляционная скорость. + var fflags: Dictionary ## Флаги достоверности полей. + var freq: float ## Частота несущей или центральная частота, МГц. + var freqm: String ## Режим смены частоты. + var lat: float ## Текущие координаты, долгота в градусах. + var lon: float ## Текущие координаты, широта в градусах. + var power: float ## Уровень принимаемого сигнала, дБм. + var proto: String ## Тип протокола источника сигнала. + var rkrp: String ## Рекомендуемый режим помехи. + var rparams: String ## Рекомендуемые параметры помехи. + var salt: float ## Координаты старта, высота от уровня моря, м. + var slat: float ## Координаты старта, широта в градусах. + var slon: float ## Координаты старта, долгота в градусах. + var tick: int ## Тик время приёма сигнала, мс. + var tmod: String ## Тип модуляции. + var width: float ## Ширина занимаемого диапазона частот, МГц. + var id: int ## Идентификатор цели. func _init(): Tools.get_members_names(self).any(func(vn): fflags[vn] = false) func _to_string() -> String: return 'номер:%d пеленг:%0.1f частота:%0.1f МГц' % [id, aoa, freq] @@ -50,7 +50,7 @@ func _ready() -> void: add_child(timer_check_lost) unit.connect('data_received', Callable(self, 'on_data_capsrpb_received')) timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(REPSettings.ThreatParams.time_lost)) - timer_check_lost.start(REPSettings.ThreatParams.time_lost / 2.0) + timer_check_lost.start(REPSettings.ThreatParams.time_lost / 1000.0) ## Периодически проверяет приборы на связи diff --git a/shaders/sector.gdshader b/shaders/sector.gdshader index 6597b4d0..e8d8cf50 100644 --- a/shaders/sector.gdshader +++ b/shaders/sector.gdshader @@ -11,7 +11,7 @@ uniform float dir: hint_range(0.0, 360.0) = 0.0; uniform float inner_clip: hint_range(0.0, 0.125) = 0.045; -const vec2 center = vec2(0.125, 0.125); /* Центр должен быть в (0.5, 0.5), но это не так */ +const vec2 center = vec2(0.125, 0.125); /* Центр. Должен быть в (0.5, 0.5), но это не так */ const float dsa = 0.0025; /* Относительное расстояние на котором выполняется сглаживание краёв по радиальным линиям */ const float dsr = 0.00025; /* Относительное расстояние на котором выполняется сглаживание краёв по круговым линиям */ diff --git a/table/table.gd b/table/table.gd index 68001e55..f7d64372 100644 --- a/table/table.gd +++ b/table/table.gd @@ -48,7 +48,7 @@ func pin_header(scrl: ScrollContainer, prnt: Control): scrl.remove_child(header) prnt.add_child(header) ## TODO: Это значение следует получить из темы - var v_separation: = 3.0 + var v_separation = get_theme_constant('v_separation') header.position = scrl.position - Vector2(0, header.size.y + v_separation) scroll = scrl scroll_adj = scrl.position @@ -466,6 +466,7 @@ func connect_columns(dest_node: Node, event_name: String, callback: String, clmn assert (OK == node.connect(event_name, conn)) node.set_meta(META_NAME_CALLEBLE, conn) + ## func set_rows_text(rows: Array) -> void: for i_row in rows.size():