wrap os.pullEventRaw to have return types
This commit is contained in:
@@ -267,8 +267,7 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, sv_wa
|
||||
clock.start()
|
||||
|
||||
while (util.time_s() - start) < timeout_s and not self.sv_linked do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
|
||||
local event, p1, p2, p3, p4, p5 = util.pull_event()
|
||||
|
||||
if event == "timer" and clock.is_clock(p1) then
|
||||
-- timed out attempt, try again
|
||||
|
||||
@@ -13,7 +13,7 @@ local config = require("coordinator.config")
|
||||
local coordinator = require("coordinator.coordinator")
|
||||
local renderer = require("coordinator.renderer")
|
||||
|
||||
local COORDINATOR_VERSION = "alpha-v0.3.4"
|
||||
local COORDINATOR_VERSION = "alpha-v0.3.5"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
@@ -149,8 +149,7 @@ log.debug("boot> conn watchdog started")
|
||||
-- event loop
|
||||
-- ui_ok will never change in this loop, same as while true or exit if UI start failed
|
||||
while ui_ok do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local event, param1, param2, param3, param4, param5 = os.pullEventRaw()
|
||||
local event, param1, param2, param3, param4, param5 = util.pull_event()
|
||||
|
||||
-- handle event
|
||||
if event == "peripheral_detach" then
|
||||
|
||||
Reference in New Issue
Block a user