updated type hints and comments

This commit is contained in:
Mikayla
2024-09-26 21:00:57 +00:00
parent e4cb1f6c70
commit 69855af861
8 changed files with 52 additions and 31 deletions

View File

@@ -105,11 +105,11 @@ function facility.new(config)
sps_low_power = false,
disabled_sps = false,
-- alarm tones
tone_states = {}, ---@type boolean[]
tone_states = {}, ---@type { [TONE]: boolean }
test_tone_set = false,
test_tone_reset = false,
test_tone_states = {}, ---@type boolean[]
test_alarm_states = {}, ---@type boolean[]
test_tone_states = {}, ---@type { [TONE]: boolean }
test_alarm_states = {}, ---@type { [ALARM]: boolean }
-- statistics
im_stat_init = false,
avg_charge = util.mov_avg(3), -- 3 seconds

View File

@@ -56,8 +56,8 @@ local self = {
next_ids = { rtu = 0, plc = 0, crd = 0, pdg = 0 },
-- rtu device tracking and invalid assignment detection
dev_dbg = {
duplicate = {}, ---@type unit_session
out_of_range = {}, ---@type unit_session
duplicate = {}, ---@type unit_session[]
out_of_range = {}, ---@type unit_session[]
connected = {} ---@type { induction: boolean, sps: boolean, tanks: boolean[], units: unit_connections[] }
}
}