Merge branch 'devel' into 580-wired-comms-networking
This commit is contained in:
@@ -17,8 +17,8 @@ local max_distance = nil
|
||||
local comms = {}
|
||||
|
||||
-- protocol/data versions (protocol/data independent changes tracked by util.lua version)
|
||||
comms.version = "3.0.6"
|
||||
comms.api_version = "0.0.9"
|
||||
comms.version = "3.0.8"
|
||||
comms.api_version = "0.0.10"
|
||||
|
||||
---@enum PROTOCOL
|
||||
local PROTOCOL = {
|
||||
@@ -52,9 +52,10 @@ local MGMT_TYPE = {
|
||||
RTU_ADVERT = 3, -- RTU capability advertisement
|
||||
RTU_DEV_REMOUNT = 4, -- RTU multiblock possbily changed (formed, unformed) due to PPM remount
|
||||
RTU_TONE_ALARM = 5, -- instruct RTUs to play specified alarm tones
|
||||
DIAG_TONE_GET = 6, -- diagnostic: get alarm tones
|
||||
DIAG_TONE_SET = 7, -- diagnostic: set alarm tones
|
||||
DIAG_ALARM_SET = 8 -- diagnostic: set alarm to simulate audio for
|
||||
DIAG_TONE_GET = 6, -- (API) diagnostic: get alarm tones
|
||||
DIAG_TONE_SET = 7, -- (API) diagnostic: set alarm tones
|
||||
DIAG_ALARM_SET = 8, -- (API) diagnostic: set alarm to simulate audio for
|
||||
INFO_LIST_CMP = 9 -- (API) info: list all computers on the network
|
||||
}
|
||||
|
||||
---@enum CRDN_TYPE
|
||||
@@ -72,7 +73,8 @@ local CRDN_TYPE = {
|
||||
API_GET_UNIT = 10, -- API: get reactor unit data
|
||||
API_GET_CTRL = 11, -- API: get data for the control app
|
||||
API_GET_PROC = 12, -- API: get data for the process app
|
||||
API_GET_WASTE = 13 -- API: get data for the waste app
|
||||
API_GET_WASTE = 13, -- API: get data for the waste app
|
||||
API_GET_RAD = 14 -- API: get data for the radiation monitor app
|
||||
}
|
||||
|
||||
---@enum ESTABLISH_ACK
|
||||
|
||||
@@ -88,6 +88,7 @@ constants.FLOW_STABILITY_DELAY_MS = 10000
|
||||
-- - background radiation 0.0000001 Sv/h (99.99 nSv/h)
|
||||
-- - "green tint" radiation 0.00001 Sv/h (10 uSv/h)
|
||||
-- - damaging radiation 0.00006 Sv/h (60 uSv/h)
|
||||
|
||||
constants.LOW_RADIATION = 0.00001
|
||||
constants.HAZARD_RADIATION = 0.00006
|
||||
constants.HIGH_RADIATION = 0.001
|
||||
@@ -95,6 +96,11 @@ constants.VERY_HIGH_RADIATION = 0.1
|
||||
constants.SEVERE_RADIATION = 8.0
|
||||
constants.EXTREME_RADIATION = 100.0
|
||||
|
||||
-- nominal RTT is ping (0ms to 10ms usually) + 150ms for SV main loop tick
|
||||
|
||||
constants.WARN_RTT = 300 -- 2x as long as expected w/ 0 ping
|
||||
constants.HIGH_RTT = 500 -- 3.33x as long as expected w/ 0 ping
|
||||
|
||||
--#endregion
|
||||
|
||||
--#region Mekanism Configuration Constants
|
||||
|
||||
@@ -53,12 +53,12 @@ function psil.create()
|
||||
if ic[key] == nil then alloc(key) end
|
||||
|
||||
if ic[key].value ~= value then
|
||||
ic[key].value = value
|
||||
|
||||
for i = 1, #ic[key].subscribers do
|
||||
ic[key].subscribers[i].notify(value)
|
||||
end
|
||||
end
|
||||
|
||||
ic[key].value = value
|
||||
end
|
||||
|
||||
-- publish a toggled boolean value to a given key, passing it to all subscribers if it has changed<br>
|
||||
|
||||
Reference in New Issue
Block a user