mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#474 run main reactor-plc loop clock when not networked
This commit is contained in:
parent
48b91ac808
commit
0b60dc9fa4
@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc")
|
|||||||
local renderer = require("reactor-plc.renderer")
|
local renderer = require("reactor-plc.renderer")
|
||||||
local threads = require("reactor-plc.threads")
|
local threads = require("reactor-plc.threads")
|
||||||
|
|
||||||
local R_PLC_VERSION = "v1.7.8"
|
local R_PLC_VERSION = "v1.7.9"
|
||||||
|
|
||||||
local println = util.println
|
local println = util.println
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
@ -71,13 +71,11 @@ function threads.thread__main(smem, init)
|
|||||||
-- blink heartbeat indicator
|
-- blink heartbeat indicator
|
||||||
databus.heartbeat()
|
databus.heartbeat()
|
||||||
|
|
||||||
-- core clock tick
|
|
||||||
if networked then
|
|
||||||
-- start next clock timer
|
-- start next clock timer
|
||||||
loop_clock.start()
|
loop_clock.start()
|
||||||
|
|
||||||
-- send updated data
|
-- send updated data
|
||||||
if nic.is_connected() then
|
if networked and nic.is_connected() then
|
||||||
if plc_comms.is_linked() then
|
if plc_comms.is_linked() then
|
||||||
smem.q.mq_comms_tx.push_command(MQ__COMM_CMD.SEND_STATUS)
|
smem.q.mq_comms_tx.push_command(MQ__COMM_CMD.SEND_STATUS)
|
||||||
else
|
else
|
||||||
@ -89,7 +87,6 @@ function threads.thread__main(smem, init)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- are we now formed after waiting to be formed?
|
-- are we now formed after waiting to be formed?
|
||||||
if (not plc_state.reactor_formed) and rps.is_formed() then
|
if (not plc_state.reactor_formed) and rps.is_formed() then
|
||||||
|
Loading…
Reference in New Issue
Block a user