From 2aa52d2e2c0ea5548f6c21703f29eea34048d03e Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Thu, 11 Apr 2024 20:30:54 -0400 Subject: [PATCH] simplified a config validation assert --- coordinator/coordinator.lua | 2 +- reactor-plc/plc.lua | 2 +- reactor-plc/startup.lua | 2 +- rtu/rtu.lua | 2 +- rtu/startup.lua | 2 +- supervisor/supervisor.lua | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coordinator/coordinator.lua b/coordinator/coordinator.lua index 40d71d8..de92ef0 100644 --- a/coordinator/coordinator.lua +++ b/coordinator/coordinator.lua @@ -89,7 +89,7 @@ function coordinator.load_config() if type(config.AuthKey) == "string" then local len = string.len(config.AuthKey) - cfv.assert_eq(len == 0 or len >= 8, true) + cfv.assert(len == 0 or len >= 8) end cfv.assert_type_int(config.LogMode) diff --git a/reactor-plc/plc.lua b/reactor-plc/plc.lua index b5c299d..fb906a3 100644 --- a/reactor-plc/plc.lua +++ b/reactor-plc/plc.lua @@ -74,7 +74,7 @@ function plc.load_config() if type(config.AuthKey) == "string" then local len = string.len(config.AuthKey) - cfv.assert_eq(len == 0 or len >= 8, true) + cfv.assert(len == 0 or len >= 8) end end diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index 8931652..09994cb 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.7.6" +local R_PLC_VERSION = "v1.7.7" local println = util.println local println_ts = util.println_ts diff --git a/rtu/rtu.lua b/rtu/rtu.lua index 7e00b98..71cea40 100644 --- a/rtu/rtu.lua +++ b/rtu/rtu.lua @@ -60,7 +60,7 @@ function rtu.load_config() if type(config.AuthKey) == "string" then local len = string.len(config.AuthKey) - cfv.assert_eq(len == 0 or len >= 8, true) + cfv.assert(len == 0 or len >= 8) end cfv.assert_type_int(config.LogMode) diff --git a/rtu/startup.lua b/rtu/startup.lua index 4d7ecbd..9470124 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -31,7 +31,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 = "v1.9.3" +local RTU_VERSION = "v1.9.4" local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE local RTU_UNIT_HW_STATE = databus.RTU_UNIT_HW_STATE diff --git a/supervisor/supervisor.lua b/supervisor/supervisor.lua index 3d6d7c7..75d71d8 100644 --- a/supervisor/supervisor.lua +++ b/supervisor/supervisor.lua @@ -78,7 +78,7 @@ function supervisor.load_config() if type(config.AuthKey) == "string" then local len = string.len(config.AuthKey) - cfv.assert_eq(len == 0 or len >= 8, true) + cfv.assert(len == 0 or len >= 8) end cfv.assert_type_int(config.LogMode)