Рефактор

This commit is contained in:
lepshiy
2024-12-11 10:54:23 +03:00
committed by sasha80
parent 6e74f8a142
commit d629b45032
5 changed files with 18 additions and 6 deletions

View File

@@ -136,6 +136,14 @@ func on_manual_control():
func on_full_auto():
auto_status = 3
func on_manual_control():
auto_status = 0
func on_full_auto():
auto_status = 3
func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit):
for thr in threats.values():
var th_id = thr.id
@@ -159,10 +167,10 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit):
## Производит приём состояния помех. [param unit] -> [param ecms].
func on_data_capsrpb_received(unit: capsrpb.CapsRpb, ecms: Dictionary):
if not unit.json_dic.has('ts'): return
if not (unit.json_dic['ts'] is float): return
if unit.json_dic['ts'] != 5: return
if not unit.json_dic.has('msvk'): return
if not unit.json_dic.has('ts'): return
if not (unit.json_dic['ts'] is float): return
if unit.json_dic['ts'] != 5: return
if not unit.json_dic.has('msvk'): return
if not (unit.json_dic['msvk'] is Array): return
var msvk = unit.json_dic['msvk']
var sz: = ecms.size()
@@ -279,6 +287,7 @@ func on_interfer_off_all(unit, ecms):
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: