feat: Add GPS host script with fixed coordinates for initialization
This commit is contained in:
10
gpshost.lua
Normal file
10
gpshost.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Runs a GPS host at boot with fixed coordinates.
|
||||||
|
|
||||||
|
local x, y, z = 0, 64, 0 -- TODO: set these to this computer's GPS host coordinates
|
||||||
|
|
||||||
|
-- If your modem isn't on a default side, open rednet explicitly (optional).
|
||||||
|
-- Example:
|
||||||
|
-- local side = "top"
|
||||||
|
-- if peripheral.getType(side) == "modem" and not rednet.isOpen(side) then rednet.open(side) end
|
||||||
|
|
||||||
|
shell.run("gps", "host", tostring(x), tostring(y), tostring(z))
|
||||||
Reference in New Issue
Block a user