optimizations on data handling in pocket and computer for internally loading reactor data structures

This commit is contained in:
Mikayla Fischler
2024-10-06 18:21:04 -04:00
parent f1a13f1125
commit 4e5858bd2d
4 changed files with 33 additions and 64 deletions

View File

@@ -167,12 +167,10 @@ local function new_view(root)
unit.reset_rps_ack = reset.on_response
local function start_button_en_check()
if (unit.reactor_data ~= nil) and (unit.reactor_data.mek_status ~= nil) then
local can_start = (not unit.reactor_data.mek_status.status) and
(not unit.reactor_data.rps_tripped) and
(unit.a_group == AUTO_GROUP.MANUAL)
if can_start then start.enable() else start.disable() end
end
local can_start = (not unit.reactor_data.mek_status.status) and
(not unit.reactor_data.rps_tripped) and
(unit.a_group == AUTO_GROUP.MANUAL)
if can_start then start.enable() else start.disable() end
end
start.register(u_ps, "status", start_button_en_check)