PLC bugfixes

This commit is contained in:
Mikayla Fischler 2022-05-06 09:10:50 -04:00
parent eaabe51537
commit b7e5ced2e8
2 changed files with 7 additions and 7 deletions

View File

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

View File

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