RTU advertisement sends as basic array, re-ordered input registers on turbine RTU

This commit is contained in:
Mikayla Fischler
2022-05-13 09:39:28 -04:00
parent 13fcf265b7
commit 635e7b7f59
2 changed files with 6 additions and 8 deletions

View File

@@ -256,16 +256,14 @@ rtu.comms = function (modem, local_port, server_port, conn_watchdog)
local type = comms.rtu_t_to_advert_type(unit.type)
if type ~= nil then
---@class rtu_advertisement
local advert = {
type = type, ---@type integer
index = unit.index, ---@type integer
reactor = unit.reactor, ---@type integer
rsio = nil ---@type table|nil
type,
unit.index,
unit.reactor
}
if type == RTU_ADVERT_TYPES.REDSTONE then
advert.rsio = unit.device
insert(advert, unit.device)
end
insert(advertisement, advert)