don't run PLC comms thread if not networked

This commit is contained in:
Mikayla Fischler 2022-04-27 15:01:10 -04:00
parent 8c4598e7a6
commit 14377e7348

View File

@ -129,7 +129,11 @@ local iss_thread = threads.thread__iss(__shared_memory)
local comms_thread = threads.thread__comms(__shared_memory) local comms_thread = threads.thread__comms(__shared_memory)
-- run threads -- run threads
if __shared_memory.networked then
parallel.waitForAll(main_thread.exec, iss_thread.exec, comms_thread.exec) parallel.waitForAll(main_thread.exec, iss_thread.exec, comms_thread.exec)
else
parallel.waitForAll(main_thread.exec, iss_thread.exec)
end
-- send an alarm: plc_comms.send_alarm(ALARMS.PLC_SHUTDOWN) ? -- send an alarm: plc_comms.send_alarm(ALARMS.PLC_SHUTDOWN) ?
println_ts("exited") println_ts("exited")