same ppm fault check as with scram for enabling an enabled reactor

This commit is contained in:
Mikayla Fischler 2022-10-07 10:29:25 -04:00
parent d4da6a7f3a
commit 573c263548
2 changed files with 4 additions and 3 deletions

View File

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

View File

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