From 3ea07e56238895afe23e0799b871c8e711a5c033 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Mon, 28 Oct 2024 11:13:08 +0300 Subject: [PATCH] =?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=A7=D0=B8=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BE=D1=82=20=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/работа/работа.gd | 14 +++++++------- scripts/interfer.gd | 8 ++++---- scripts/threats.gd | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scenes/работа/работа.gd b/scenes/работа/работа.gd index 3d601054..c7346477 100644 --- a/scenes/работа/работа.gd +++ b/scenes/работа/работа.gd @@ -72,7 +72,7 @@ const fs_freq: Dictionary = { 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] } + 6: [3500.0, 6000.0, 500.0, 550.0] } ## Размеры карты для разных режимов РТО и РЛС соответственно @@ -167,7 +167,7 @@ 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): @@ -185,7 +185,7 @@ func map_threat_to_bip(th: threats.Threat, bip: Control): 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( + bip.position = tools.pos_calc( th.freq, th.aoa, radius_center, @@ -200,7 +200,7 @@ func on_threat_update(th): var bip = get_node('%d' % th.id) bip.update() map_threat_to_bip(th, bip) - + ## Обработчик выбора помехи для цели. func on_interfer_new(ecm): @@ -231,8 +231,8 @@ func on_interfer_off_all(): bip.set_track_visible(false) fs_active.clear() update_fs_colors() - - + + func on_interfer_off(ecm_id): fs_active.erase(ecm_id) fs_selected.erase(ecm_id) @@ -499,7 +499,7 @@ func set_btns_disabled(value: bool, btn): btn.set_disabled(true) else: btn.set_disabled(value) - + func on_fs_update_color(ecms): fs_active.clear() for ecm in ecms.values(): diff --git a/scripts/interfer.gd b/scripts/interfer.gd index 672e2c57..834d47ce 100644 --- a/scripts/interfer.gd +++ b/scripts/interfer.gd @@ -115,7 +115,7 @@ func _ready(): signaller.connect('th_aoa_update', Callable(self, 'on_th_aoa_update').bind(ecms, unit)) signaller.connect('interfer_off', Callable(self, 'on_interfer_off')) threats.connect('threat_lost', Callable(self, 'on_threats_lost').bind(ecms, unit)) - + ## Проверяет состояние отправки пакета и если не доставлен, повторяет отправку. func on_timer_check_state(unit, ecms, resend_timeout): @@ -137,8 +137,8 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit): ecm.kni = thr.aoa send_ecm(ecm, unit) signaller.emit_signal('fs_update_color', ecms) - - + + ## Производит приём состояния помех. [param unit] -> [param ecms]. func on_data_capsrpb_received(unit: capsrpb.CapsRpb, ecms: Dictionary): if not unit.json_dic.has('ts'): return @@ -262,7 +262,7 @@ func on_interfer_off_all(unit, ecms): push_id(ecm.ispp) send_ecm(ecm, unit) signaller.emit_signal('interfer_off',ecm, ecms, thrs) - + func on_threats_lost(th, ecms, unit): for key in interfer.thrs: if interfer.thrs[key] == th.id: diff --git a/scripts/threats.gd b/scripts/threats.gd index d991962c..6ee893f2 100644 --- a/scripts/threats.gd +++ b/scripts/threats.gd @@ -76,7 +76,7 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary): call_deferred('emit_signal', 'threat_lost', th) if sz != threats.size(): call_deferred('emit_signal', 'threats_resized', threats) - + func on_timer_aoa_update(threats:Dictionary): signaller.emit_signal('th_aoa_update', threats)