#248 fixed network light not going out on PLC/RTU when disconnected

This commit is contained in:
Mikayla Fischler
2023-06-05 17:47:43 -04:00
parent 360609df1f
commit 63147bfab5
7 changed files with 17 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
-- Main SCADA Coordinator GUI
--
local types = require("scada-common.types")
local util = require("scada-common.util")
local databus = require("rtu.databus")
@@ -53,7 +54,7 @@ local function init(panel, units)
local modem = LED{parent=system,label="MODEM",colors=cpair(colors.green,colors.green_off)}
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,colors.gray}}
network.update(5)
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
system.line_break()
modem.register(databus.ps, "has_modem", modem.update)

View File

@@ -257,6 +257,7 @@ function rtu.comms(version, modem, rtu_channel, svr_channel, range, conn_watchdo
rtu_state.linked = false
self.sv_addr = comms.BROADCAST
self.r_seq_num = nil
databus.tx_link_state(types.PANEL_LINK_STATE.DISCONNECTED)
end
-- close the connection to the server

View File

@@ -28,7 +28,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
local sps_rtu = require("rtu.dev.sps_rtu")
local turbinev_rtu = require("rtu.dev.turbinev_rtu")
local RTU_VERSION = "v1.2.8"
local RTU_VERSION = "v1.3.1"
local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE
local RTU_UNIT_HW_STATE = databus.RTU_UNIT_HW_STATE