#474 run main reactor-plc loop clock when not networked

This commit is contained in:
Mikayla Fischler 2024-04-14 19:24:12 -04:00
parent 48b91ac808
commit 0b60dc9fa4
2 changed files with 12 additions and 15 deletions

View File

@ -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

View File

@ -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