Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local start_time
- local debug_out = ""
- local t_max = 500
- local t_index = 0
- local function init()
- start_time = getTime()/100
- debug_out = "\r\n\r\nInit'g swscanner.lua @ " .. start_time .. " seconds after startup \r\n\r\n"
- serialWrite(debug_out)
- end
- -- periodically called function
- local function run()
- t_index = t_index + 1
- if t_index <= t_max then
- local fa = getSwitchName(t_index)
- if fa ~= nil then
- serialWrite(tostring(t_index) .. ": " .. fa .. "\r\n")
- end
- else
- serialWrite(".")
- end
- end
- return {run=run, init=init}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement