mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
RTU advertisement sends as basic array, re-ordered input registers on turbine RTU
This commit is contained in:
parent
13fcf265b7
commit
635e7b7f59
@ -23,15 +23,15 @@ turbine_rtu.new = function (turbine)
|
||||
self.rtu.connect_input_reg(self.turbine.getVents)
|
||||
self.rtu.connect_input_reg(self.turbine.getDispersers)
|
||||
self.rtu.connect_input_reg(self.turbine.getCondensers)
|
||||
self.rtu.connect_input_reg(self.turbine.getDumpingMode)
|
||||
self.rtu.connect_input_reg(self.turbine.getSteamCapacity)
|
||||
self.rtu.connect_input_reg(self.turbine.getMaxFlowRate)
|
||||
self.rtu.connect_input_reg(self.turbine.getMaxWaterOutput)
|
||||
self.rtu.connect_input_reg(self.turbine.getMaxProduction)
|
||||
self.rtu.connect_input_reg(self.turbine.getMaxWaterOutput)
|
||||
-- current state
|
||||
self.rtu.connect_input_reg(self.turbine.getFlowRate)
|
||||
self.rtu.connect_input_reg(self.turbine.getProductionRate)
|
||||
self.rtu.connect_input_reg(self.turbine.getLastSteamInputRate)
|
||||
self.rtu.connect_input_reg(self.turbine.getDumpingMode)
|
||||
-- tanks
|
||||
self.rtu.connect_input_reg(self.turbine.getSteam)
|
||||
self.rtu.connect_input_reg(self.turbine.getSteamNeeded)
|
||||
|
10
rtu/rtu.lua
10
rtu/rtu.lua
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user