Update gps.lua
This commit is contained in:
parent
1099666012
commit
5cdfc0f288
1 changed files with 4 additions and 16 deletions
|
@ -1,17 +1,5 @@
|
||||||
term.setBackgroundColor(colors.white)
|
local x, y, z = gps.locate(0)
|
||||||
term.clear()
|
if not x then
|
||||||
term.setCursorPos(1,1)
|
x, y, z = "?", "?", "?"
|
||||||
term.setTextColor(colors.black)
|
|
||||||
print("Loading...")
|
|
||||||
while true do
|
|
||||||
term.clear()
|
|
||||||
x, y, z = gps.locate(0)
|
|
||||||
term.setCursorPos(1,3)
|
|
||||||
if not x then
|
|
||||||
x, y, z = "?", "?", "?"
|
|
||||||
end
|
|
||||||
print(" X: "..x)
|
|
||||||
print(" Y: "..y)
|
|
||||||
print(" Z: "..z)
|
|
||||||
sleep(1)
|
|
||||||
end
|
end
|
||||||
|
sPhone.winOk("X Y Z", x.." "..y.." "..z)
|
||||||
|
|
Loading…
Reference in a new issue