From b7e5ced2e8716d81bec604184e2c5f8521d80433 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Fri, 6 May 2022 09:10:50 -0400 Subject: [PATCH] PLC bugfixes --- reactor-plc/plc.lua | 12 ++++++------ reactor-plc/startup.lua | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactor-plc/plc.lua b/reactor-plc/plc.lua index 9010610..4ed8cb7 100644 --- a/reactor-plc/plc.lua +++ b/reactor-plc/plc.lua @@ -114,9 +114,9 @@ plc.rps_init = function (reactor) -- lost the peripheral or terminated, handled later log.error("RPS: failed to check reactor heated coolant level") _set_fault() - state[state_keys.ex_hcoolant] = false + self.state[state_keys.ex_hcoolant] = false else - state[state_keys.ex_hcoolant] = hc_filled > 0.95 + self.state[state_keys.ex_hcoolant] = hc_filled > 0.95 end end @@ -127,9 +127,9 @@ plc.rps_init = function (reactor) -- lost the peripheral or terminated, handled later log.error("RPS: failed to check reactor fuel") _set_fault() - state[state_keys.no_fuel] = false + self.state[state_keys.no_fuel] = false else - state[state_keys.no_fuel] = fuel.amount == 0 + self.state[state_keys.no_fuel] = fuel == 0 end end @@ -142,12 +142,12 @@ plc.rps_init = function (reactor) -- report a PLC comms timeout local trip_timeout = function () - state[state_keys.timed_out] = true + self.state[state_keys.timed_out] = true end -- manually SCRAM the reactor local trip_manual = function () - state[state_keys.manual] = true + self.state[state_keys.manual] = true end -- SCRAM the reactor now diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index deb2b82..e1b07ab 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -11,7 +11,7 @@ local config = require("config") local plc = require("plc") local threads = require("threads") -local R_PLC_VERSION = "alpha-v0.6.3" +local R_PLC_VERSION = "alpha-v0.6.4" local print = util.print local println = util.println