bit of everything

This commit is contained in:
kepler155c@gmail.com
2017-07-23 22:37:07 -04:00
parent 027f386ed1
commit f8bcf90a6b
30 changed files with 866 additions and 502 deletions

View File

@@ -6,15 +6,14 @@ require = requireInjector(getfenv(1))
local GPS = require('gps')
function turtle.enableGPS(timeout)
if turtle.getState().coordSystem == 'GPS' then
if turtle.point.gps == 'GPS' then
return turtle.point
end
local pt = GPS.getPointAndHeading(timeout)
if pt then
turtle.setPoint(pt)
turtle.getState().coordSystem = 'GPS'
return true
turtle.setPoint(pt, true)
return turtle.point
end
end