#57 updates per safety pass, fixed plc_sys fields staying nil on degraded start, fixed repeated SCRAM messages when unlinked

This commit is contained in:
Mikayla Fischler
2022-05-22 17:57:24 -04:00
parent 26c6010ce0
commit a93f0a4452
6 changed files with 47 additions and 31 deletions

View File

@@ -19,11 +19,13 @@ end
-- timestamped print
util.print_ts = function (message)
if message == nil then return end
term.write(os.date("[%H:%M:%S] ") .. message)
end
-- timestamped print line
util.println_ts = function (message)
if message == nil then return end
print(os.date("[%H:%M:%S] ") .. message)
end
@@ -37,10 +39,10 @@ util.time_ms = function ()
end
-- current time
---@return integer seconds
---@return number seconds
util.time_s = function ()
---@diagnostic disable-next-line: undefined-field
return os.epoch('local') / 1000
return os.epoch('local') / 1000.0
end
-- current time