From 573c263548e60f10b3b29c8e46b46dfe43c032cc Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Fri, 7 Oct 2022 10:29:25 -0400 Subject: [PATCH] same ppm fault check as with scram for enabling an enabled reactor --- reactor-plc/plc.lua | 5 +++-- reactor-plc/startup.lua | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reactor-plc/plc.lua b/reactor-plc/plc.lua index 78045af..4a69c5e 100644 --- a/reactor-plc/plc.lua +++ b/reactor-plc/plc.lua @@ -19,8 +19,9 @@ local print_ts = util.print_ts local println_ts = util.println_ts -- I sure hope the devs don't change this error message, not that it would have safety implications --- I wish they didn't change it to error on SCRAM calls if the reactor was already inactive +-- I wish they didn't change it to be like this local PCALL_SCRAM_MSG = "pcall: Scram requires the reactor to be active." +local PCALL_START_MSG = "pcall: Reactor is already active." -- RPS SAFETY CONSTANTS @@ -193,7 +194,7 @@ function plc.rps_init(reactor) log.info("RPS: reactor start") self.reactor.activate() - if self.reactor.__p_is_faulted() then + if self.reactor.__p_is_faulted() and (self.reactor.__p_last_fault() ~= PCALL_START_MSG) then log.error("RPS: failed reactor start") else self.reactor_enabled = true diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index ed6378e..4909737 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -13,7 +13,7 @@ local config = require("reactor-plc.config") local plc = require("reactor-plc.plc") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "beta-v0.8.7" +local R_PLC_VERSION = "beta-v0.8.8" local print = util.print local println = util.println