From 16d6372d7bad5b053956f7e742d9ba766b10ed82 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Fri, 24 Feb 2023 23:59:39 -0500 Subject: [PATCH] #118 bugfixes with cleanup --- install_manifest.json | 20 ++++++++++---------- rtu/rtu.lua | 4 ++-- rtu/startup.lua | 2 +- scada-common/types.lua | 16 ++++++++-------- supervisor/facility.lua | 2 +- supervisor/startup.lua | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/install_manifest.json b/install_manifest.json index f68183c..1f0e40f 100644 --- a/install_manifest.json +++ b/install_manifest.json @@ -2,10 +2,10 @@ "versions": { "bootloader": "0.2", "comms": "1.4.0", - "reactor-plc": "beta-v0.11.1", - "rtu": "beta-v0.11.2", - "supervisor": "beta-v0.12.2", - "coordinator": "beta-v0.10.1", + "reactor-plc": "v0.12.0", + "rtu": "v0.12.1", + "supervisor": "v0.13.1", + "coordinator": "v0.11.0", "pocket": "alpha-v0.0.0" }, "files": { @@ -177,13 +177,13 @@ }, "sizes": { "system": 1982, - "common": 88163, - "graphics": 99360, + "common": 88565, + "graphics": 99858, "lockbox": 100797, - "reactor-plc": 75902, - "rtu": 81679, - "supervisor": 268416, - "coordinator": 181783, + "reactor-plc": 75621, + "rtu": 85496, + "supervisor": 270182, + "coordinator": 183279, "pocket": 335 } } \ No newline at end of file diff --git a/rtu/rtu.lua b/rtu/rtu.lua index e2c9b44..1344a3e 100644 --- a/rtu/rtu.lua +++ b/rtu/rtu.lua @@ -219,10 +219,10 @@ function rtu.comms(version, modem, local_port, server_port, range, conn_watchdog for i = 1, #units do local unit = units[i] ---@type rtu_unit_registry_entry - if type ~= nil then + if unit.type ~= nil then local advert = { unit.type, unit.index, unit.reactor } - if type == RTU_UNIT_TYPE.REDSTONE then + if unit.type == RTU_UNIT_TYPE.REDSTONE then insert(advert, unit.device) end diff --git a/rtu/startup.lua b/rtu/startup.lua index a97658c..aff3a22 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -25,7 +25,7 @@ local sna_rtu = require("rtu.dev.sna_rtu") local sps_rtu = require("rtu.dev.sps_rtu") local turbinev_rtu = require("rtu.dev.turbinev_rtu") -local RTU_VERSION = "v0.12.0" +local RTU_VERSION = "v0.12.1" local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE diff --git a/scada-common/types.lua b/scada-common/types.lua index 8cc31f8..7ad0eb8 100644 --- a/scada-common/types.lua +++ b/scada-common/types.lua @@ -121,14 +121,14 @@ types.TRI_FAIL = { ---@enum PROCESS types.PROCESS = { - INACTIVE = 1, - MAX_BURN = 2, - BURN_RATE = 3, - CHARGE = 4, - GEN_RATE = 5, - MATRIX_FAULT_IDLE = 6, - SYSTEM_ALARM_IDLE = 7, - GEN_RATE_FAULT_IDLE = 8 + INACTIVE = 0, + MAX_BURN = 1, + BURN_RATE = 2, + CHARGE = 3, + GEN_RATE = 4, + MATRIX_FAULT_IDLE = 5, + SYSTEM_ALARM_IDLE = 6, + GEN_RATE_FAULT_IDLE = 7 } types.PROCESS_NAMES = { diff --git a/supervisor/facility.lua b/supervisor/facility.lua index db56aec..21da1a1 100644 --- a/supervisor/facility.lua +++ b/supervisor/facility.lua @@ -292,7 +292,7 @@ function facility.new(num_reactors, cooling_conf) if state_changed then self.saturated = false - log.debug("FAC: state changed from " .. PROCESS_NAMES[self.last_mode] .. " to " .. PROCESS_NAMES[self.mode]) + log.debug("FAC: state changed from " .. PROCESS_NAMES[self.last_mode + 1] .. " to " .. PROCESS_NAMES[self.mode + 1]) if (self.last_mode == PROCESS.INACTIVE) or (self.last_mode == PROCESS.GEN_RATE_FAULT_IDLE) then self.start_fail = START_STATUS.OK diff --git a/supervisor/startup.lua b/supervisor/startup.lua index e537572..0682994 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -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.0" +local SUPERVISOR_VERSION = "v0.13.1" local print = util.print local println = util.println