From 09a3843b853f5277ee30b708599d3c3f868efbe4 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Fri, 9 Oct 2015 17:27:13 +0200 Subject: [PATCH] Update gps.lua --- src/apps/gps.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apps/gps.lua b/src/apps/gps.lua index cc082e7..75abe44 100644 --- a/src/apps/gps.lua +++ b/src/apps/gps.lua @@ -2,4 +2,8 @@ local x, y, z = gps.locate(0) if not x then x, y, z = "?", "?", "?" end -sPhone.winOk("X Y Z", math.ceil(x).." "..math.ceil(y).." "..math.ceil(z)) +if tonumber(x) then + sPhone.winOk("X Y Z", math.ceil(x).." "..math.ceil(y).." "..math.ceil(z)) +else + sPhone.winOk("X Y Z","? ? ?") +end