mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
19 lines
334 B
Lua
19 lines
334 B
Lua
|
|
-- rc.gps
|
||
|
|
|
||
|
|
error("gps is not fully implemented", 0)
|
||
|
|
|
||
|
|
local expect = require("cc.expect").expect
|
||
|
|
local rednet = require("rednet")
|
||
|
|
|
||
|
|
local gps = {}
|
||
|
|
gps.CHANNEL_GPS = 65534
|
||
|
|
|
||
|
|
function gps.locate(timeout, debug)
|
||
|
|
timeout = expect(1, timeout, "number", "nil") or 2
|
||
|
|
expect(2, debug, "boolean", "nil")
|
||
|
|
|
||
|
|
rednet.broadcast()
|
||
|
|
end
|
||
|
|
|
||
|
|
return gps
|