Доработка. get_fs_param перенесена в prd.gd

This commit is contained in:
MaD_CaT
2025-05-29 10:29:40 +03:00
parent db3296c753
commit 858f38e8cd
2 changed files with 11 additions and 11 deletions

View File

@@ -282,6 +282,15 @@ func _ready() -> void:
unit_caps.connect('data_received', Callable(self, 'on_data_capsrpb_received'))
func get_fs_param(index: int) -> Array:
var freq = (FS_FREQ[index / 4][2])
var sector = (FS_SECTORS[index % 4][0] + FS_SECTORS[index % 4][1])/2 - 45.0
if sector < 0:
sector += 360.0
var width = FS_FREQ[index / 4][1] - FS_FREQ[index / 4][0]
return [sector, freq, width, index]
## Функция возвращает массив с индексами модулей ФС для выбранной помехи
func get_fs_index(ecm, fs_index_arr):
var sector: int