From 14377e734853e5ab5a43186eea57a2ecd5373d1a Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Wed, 27 Apr 2022 15:01:10 -0400 Subject: [PATCH] don't run PLC comms thread if not networked --- reactor-plc/startup.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index 025c274..23ca80a 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -129,7 +129,11 @@ local iss_thread = threads.thread__iss(__shared_memory) local comms_thread = threads.thread__comms(__shared_memory) -- run threads -parallel.waitForAll(main_thread.exec, iss_thread.exec, comms_thread.exec) +if __shared_memory.networked then + 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) ? println_ts("exited")