Исправление. Назначение помех группы принудительно
This commit is contained in:
@@ -2,12 +2,13 @@ class_name frm_ecm_list extends NinePatchRect
|
||||
|
||||
|
||||
const srn_sectors: Dictionary = {
|
||||
'srni1': [4, 5, 6, 7, 8, 9, 10, 11] }
|
||||
'srni1': [12, 13, 14, 15, 16, 17, 18, 19] }
|
||||
|
||||
const jtids_sectors: Dictionary = {
|
||||
'svi1': [12, 13, 14, 15, 16, 17, 18, 19] }
|
||||
'svi1': [4, 5, 6, 7, 8, 9, 10, 11] }
|
||||
|
||||
const kupd_sectors: Dictionary = {}
|
||||
const kupd_sectors: Dictionary = {
|
||||
'lchm1': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 23, 24, 25, 26, 27] }
|
||||
|
||||
const panika_sectors: Dictionary = {
|
||||
'lchm1': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 23, 24, 25, 26, 27],
|
||||
|
||||
@@ -126,6 +126,7 @@ func on_interfer_off(ecm, ecms, thrs, table_index):
|
||||
rehash(table_index)
|
||||
ecms.erase(ecm.ispp)
|
||||
thrs.erase(ecm.ispp)
|
||||
interfer.push_id(ecm.ispp)
|
||||
|
||||
|
||||
## Перестраивает индекс таблицы. Вызывать при удалении строки
|
||||
|
||||
@@ -64,13 +64,21 @@ const fs_sectors: Dictionary = {
|
||||
1: [270.0, 360.0] }
|
||||
|
||||
const fs_freq: Dictionary = {
|
||||
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] }
|
||||
#0: [390.0, 510.0, 200.0, 250.0],
|
||||
#1: [800.0, 1065.0, 250.0, 300.0],
|
||||
#2: [1065.0, 1210.0, 300.0, 350.0],
|
||||
#3: [1150.0, 1280.0, 350.0, 400.0],
|
||||
#4: [1490.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]
|
||||
0: [390.0, 510.0, 200.0, 250.0, 433.0],
|
||||
1: [800.0, 1065.0, 250.0, 300.0, 860.0],
|
||||
2: [1065.0, 1210.0, 300.0, 350.0, 1137.0],
|
||||
3: [1150.0, 1280.0, 350.0, 400.0, 1227.0],
|
||||
4: [1490.0, 2000.0, 400.0, 450.0, 1575.0],
|
||||
5: [2000.0, 3500.0, 450.0, 500.0, 2450.0],
|
||||
6: [3500.0, 6000.0, 500.0, 550.0, 5800.0]
|
||||
}
|
||||
|
||||
|
||||
## Размеры карты для разных режимов РТО и РЛС соответственно
|
||||
@@ -461,8 +469,9 @@ func set_ecm_btns_state(value: bool):
|
||||
set_btns_disabled(value, btn)
|
||||
|
||||
|
||||
|
||||
func get_fs_param(index: int) -> Array:
|
||||
var freq = (fs_freq[index / 4][0] + fs_freq[index / 4][1])/2
|
||||
var freq = (fs_freq[index / 4][4])
|
||||
var sector = (fs_sectors[index % 4][0] + fs_sectors[index % 4][1])/2 - 45.0
|
||||
if sector < 0:
|
||||
sector += 360.0
|
||||
@@ -508,6 +517,7 @@ func on_fs_update_color(ecms):
|
||||
set_fs_color(ecm)
|
||||
update_fs_colors()
|
||||
|
||||
|
||||
func on_interfer_prenuditelno (prenuditelno_sectors):
|
||||
for key in prenuditelno_sectors:
|
||||
var sectors = []
|
||||
|
||||
@@ -229,11 +229,12 @@ func on_interfer_rcv(interfer_params: Array, unit, ecms):
|
||||
|
||||
|
||||
func interfer_create(interfer_name, ecms, param, kni, id, dict, source_interfer):
|
||||
print_debug(ecms)
|
||||
var ispp: int = 0
|
||||
if interfer_name == 'k1':
|
||||
param['dur'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = 1.0 # Необходимо добавить параметры управления
|
||||
var key = dict.find_key(id)
|
||||
var key = ecms.find_key(id)
|
||||
if source_interfer != SOURCE_INTERFER[2]:
|
||||
if key != null:
|
||||
ispp = key
|
||||
@@ -243,6 +244,7 @@ func interfer_create(interfer_name, ecms, param, kni, id, dict, source_interfer)
|
||||
ispp = pop_id()
|
||||
if ispp == 0: return
|
||||
else: ispp = id
|
||||
print_debug(id_array)
|
||||
dict[ispp] = id
|
||||
msg_ss += 1
|
||||
var ecm: Interfer
|
||||
@@ -262,7 +264,6 @@ func interfer_create(interfer_name, ecms, param, kni, id, dict, source_interfer)
|
||||
signaller.emit_signal('interfer_new', ecm)
|
||||
if interfer_name == 'off':
|
||||
signaller.emit_signal('interfer_off', ecm, ecms, thrs)
|
||||
push_id(ecm.ispp)
|
||||
thrs.erase(ispp)
|
||||
ecm.tick_tx = Time.get_ticks_msec()
|
||||
|
||||
@@ -275,7 +276,6 @@ func send_ecm(ecm, unit):
|
||||
func on_interfer_off_all(unit, ecms):
|
||||
for ecm in ecms.values():
|
||||
ecm.krp = INTERFER_OFF
|
||||
push_id(ecm.ispp)
|
||||
send_ecm(ecm, unit)
|
||||
signaller.emit_signal('interfer_off',ecm, ecms, thrs)
|
||||
|
||||
@@ -285,7 +285,6 @@ func on_threats_lost(th, ecms, unit):
|
||||
var ecm_id = key
|
||||
var ecm = ecms[ecm_id]
|
||||
ecm.krp = INTERFER_OFF
|
||||
push_id(ecm.ispp)
|
||||
send_ecm(ecm, unit)
|
||||
signaller.emit_signal('interfer_off',ecm, ecms, thrs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user