Рефактор.

This commit is contained in:
sasha80
2025-09-09 14:37:30 +03:00
parent ecf513497a
commit 8132cba863
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ const CAPS_PROTO: = {'json-capsrpb': capsrpb.CapsRpb}
const TCP_PROTO: = {'5p28': tcp5p28.TCP5P28}
const SERIAL_PROTO: = {'spt25': spt25.SPT25}
const MODBUS_PROTO: = {'mbcs': sch3.Sch3}
const UDPRX_PROTO: = {'udprx': navi.NaviSource}
const NAVI_PROTO: = {'navi': navi.NaviSource}
var tick: int = 0
@@ -227,8 +227,8 @@ func _ready() -> void:
var unit_profile = settings.UnitProfiles[unit_name][1]
var proto = settings.UnitProfiles[unit_name][0]
if proto in UDPRX_PROTO:
var new_unit = UDPRX_PROTO[proto].new(unit_name)
if proto in NAVI_PROTO:
var new_unit = NAVI_PROTO[proto].new(unit_name)
units[unit_name] = new_unit
units_udprx[unit_name] = new_unit
dst_ports[unit_name] = unit_profile[1]