From 5cdfc0f288a9b186c16f0ea450b23065109e0ae1 Mon Sep 17 00:00:00 2001 From: Ale2610 Date: Sat, 29 Aug 2015 18:45:37 +0200 Subject: [PATCH] Update gps.lua --- src/apps/gps.lua | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/apps/gps.lua b/src/apps/gps.lua index f33a38a..e57925f 100644 --- a/src/apps/gps.lua +++ b/src/apps/gps.lua @@ -1,17 +1,5 @@ -term.setBackgroundColor(colors.white) -term.clear() -term.setCursorPos(1,1) -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) +local x, y, z = gps.locate(0) +if not x then + x, y, z = "?", "?", "?" end +sPhone.winOk("X Y Z", x.." "..y.." "..z)