#146 increased timeout times and added to config files
This commit is contained in:
@@ -8,11 +8,13 @@ config.SCADA_SV_LISTEN = 16101
|
||||
config.SCADA_API_LISTEN = 16200
|
||||
-- max trusted modem message distance (0 to disable check)
|
||||
config.TRUSTED_RANGE = 0
|
||||
-- time in seconds (>= 1) before assuming a remote device is no longer active
|
||||
config.COMMS_TIMEOUT = 5
|
||||
|
||||
-- expected number of reactor units, used only to require that number of unit monitors
|
||||
config.NUM_UNITS = 4
|
||||
|
||||
-- graphics color
|
||||
-- override default display colors (prettier in my opinion)
|
||||
config.RECOLOR = true
|
||||
|
||||
-- alarm sounder volume (0.0 to 3.0, 1.0 being standard max volume, this is the option given to to speaker.play())
|
||||
@@ -29,9 +31,4 @@ config.LOG_PATH = "/log.txt"
|
||||
-- 1 = NEW (replaces existing file on start)
|
||||
config.LOG_MODE = 0
|
||||
|
||||
-- crypto config
|
||||
config.SECURE = true
|
||||
-- must be common between all devices
|
||||
config.PASSWORD = "testpassword!"
|
||||
|
||||
return config
|
||||
|
||||
@@ -19,7 +19,7 @@ local iocontrol = require("coordinator.iocontrol")
|
||||
local renderer = require("coordinator.renderer")
|
||||
local sounder = require("coordinator.sounder")
|
||||
|
||||
local COORDINATOR_VERSION = "beta-v0.9.6"
|
||||
local COORDINATOR_VERSION = "beta-v0.9.7"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
@@ -42,14 +42,15 @@ cfv.assert_port(config.SCADA_SV_PORT)
|
||||
cfv.assert_port(config.SCADA_SV_LISTEN)
|
||||
cfv.assert_port(config.SCADA_API_LISTEN)
|
||||
cfv.assert_type_int(config.TRUSTED_RANGE)
|
||||
cfv.assert_type_num(config.COMMS_TIMEOUT)
|
||||
cfv.assert_min(config.COMMS_TIMEOUT, 1)
|
||||
cfv.assert_type_int(config.NUM_UNITS)
|
||||
cfv.assert_type_bool(config.RECOLOR)
|
||||
cfv.assert_type_num(config.SOUNDER_VOLUME)
|
||||
cfv.assert_type_bool(config.TIME_24_HOUR)
|
||||
cfv.assert_type_str(config.LOG_PATH)
|
||||
cfv.assert_type_int(config.LOG_MODE)
|
||||
cfv.assert_type_bool(config.SECURE)
|
||||
cfv.assert_type_str(config.PASSWORD)
|
||||
|
||||
assert(cfv.valid(), "bad config file: missing/invalid fields")
|
||||
|
||||
----------------------------------------
|
||||
@@ -142,7 +143,7 @@ local function main()
|
||||
end
|
||||
|
||||
-- create connection watchdog
|
||||
local conn_watchdog = util.new_watchdog(5)
|
||||
local conn_watchdog = util.new_watchdog(config.COMMS_TIMEOUT)
|
||||
conn_watchdog.cancel()
|
||||
log.debug("boot> conn watchdog created")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user