#188 refactored RPS dmg_high to high_dmg
This commit is contained in:
@@ -102,7 +102,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout)
|
||||
rps_trip_cause = "ok", ---@type rps_trip_cause
|
||||
---@class rps_status
|
||||
rps_status = {
|
||||
dmg_high = false,
|
||||
high_dmg = false,
|
||||
high_temp = false,
|
||||
low_cool = false,
|
||||
ex_waste = false,
|
||||
@@ -169,7 +169,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout)
|
||||
local function _copy_rps_status(rps_status)
|
||||
self.sDB.rps_tripped = rps_status[1]
|
||||
self.sDB.rps_trip_cause = rps_status[2]
|
||||
self.sDB.rps_status.dmg_high = rps_status[3]
|
||||
self.sDB.rps_status.high_dmg = rps_status[3]
|
||||
self.sDB.rps_status.high_temp = rps_status[4]
|
||||
self.sDB.rps_status.low_cool = rps_status[5]
|
||||
self.sDB.rps_status.ex_waste = rps_status[6]
|
||||
|
||||
@@ -14,7 +14,7 @@ local svsessions = require("supervisor.session.svsessions")
|
||||
local config = require("supervisor.config")
|
||||
local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local SUPERVISOR_VERSION = "v0.13.14"
|
||||
local SUPERVISOR_VERSION = "v0.14.0"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
|
||||
@@ -96,7 +96,7 @@ function unit.new(reactor_id, num_boilers, num_turbines)
|
||||
last_rate_change_ms = 0,
|
||||
---@type rps_status
|
||||
last_rps_trips = {
|
||||
dmg_high = false,
|
||||
high_dmg = false,
|
||||
high_temp = false,
|
||||
low_cool = false,
|
||||
ex_waste = false,
|
||||
@@ -115,7 +115,7 @@ function unit.new(reactor_id, num_boilers, num_turbines)
|
||||
rps_trip = false,
|
||||
---@type rps_status
|
||||
rps_status = {
|
||||
dmg_high = false,
|
||||
high_dmg = false,
|
||||
high_temp = false,
|
||||
low_cool = false,
|
||||
ex_waste = false,
|
||||
|
||||
@@ -474,7 +474,7 @@ function logic.update_alarms(self)
|
||||
_update_alarm_state(self, plc_cache.damage >= 100, self.alarms.CriticalDamage)
|
||||
|
||||
-- Reactor Damage
|
||||
local rps_dmg_90 = plc_cache.rps_status.dmg_high and not self.last_rps_trips.dmg_high
|
||||
local rps_dmg_90 = plc_cache.rps_status.high_dmg and not self.last_rps_trips.high_dmg
|
||||
_update_alarm_state(self, (plc_cache.damage > 0) or rps_dmg_90, self.alarms.ReactorDamage)
|
||||
|
||||
-- Over-Temperature
|
||||
@@ -676,7 +676,7 @@ function logic.update_status_text(self)
|
||||
|
||||
if plc_db.rps_trip_cause == RPS_TRIP_CAUSE.OK then
|
||||
-- hmm...
|
||||
elseif plc_db.rps_trip_cause == RPS_TRIP_CAUSE.DMG_HIGH then
|
||||
elseif plc_db.rps_trip_cause == RPS_TRIP_CAUSE.HIGH_DMG then
|
||||
cause = "core damage high"
|
||||
elseif plc_db.rps_trip_cause == RPS_TRIP_CAUSE.HIGH_TEMP then
|
||||
cause = "core temperature high"
|
||||
@@ -772,7 +772,7 @@ function logic.handle_redstone(self)
|
||||
self.io_ctl.digital_write(IO.R_AUTO_CTRL, self.auto_engaged)
|
||||
self.io_ctl.digital_write(IO.R_SCRAMMED, self.plc_cache.rps_trip)
|
||||
self.io_ctl.digital_write(IO.R_AUTO_SCRAM, self.plc_cache.rps_status.automatic)
|
||||
self.io_ctl.digital_write(IO.R_DMG_HIGH, self.plc_cache.rps_status.dmg_high)
|
||||
self.io_ctl.digital_write(IO.R_HIGH_DMG, self.plc_cache.rps_status.high_dmg)
|
||||
self.io_ctl.digital_write(IO.R_HIGH_TEMP, self.plc_cache.rps_status.high_temp)
|
||||
self.io_ctl.digital_write(IO.R_LOW_COOLANT, self.plc_cache.rps_status.low_cool)
|
||||
self.io_ctl.digital_write(IO.R_EXCESS_HC, self.plc_cache.rps_status.ex_hcool)
|
||||
|
||||
Reference in New Issue
Block a user