LUA API gps error

  • borisff
  • borisff's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 65
  • Thank you received: 3

TPL_KUNENA_MESSAGE_CREATED LUA API gps error

10 Apr 2021 18:40 - 10 Apr 2021 20:49
#1
Example page 105 of JETI DCDS_Lua_API_1.5.pdf
local position = gps.newPoint("49.57873221509796","17.398918569087982")
(or local position = gps.newPoint(49.57873221509796,17.398918569087982))
local latitudes, longitudes = gps.getString(position) -- this line number 89
gives an error
Error in gps: ./Apps/gps.lua:89: attempt to call a nil value (field 'getString')
attempt to call a nil value (filed 'getString') both in emulator and real DC-24 console


Thanks
Last edit: 10 Apr 2021 20:49 by borisff.

Please Log in or Create an account to join the conversation.

  • Raf
  • Raf's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 141
  • Thank you received: 192

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA API gps error

25 Jun 2021 08:54
#2
Oh, there is a typo, use function name "getStrig"...
Voltario T30, Touch Switch, MicroVario, AMS, SE6
The following user(s) said Thank You: borisff, nikolausi, LeonAir

Please Log in or Create an account to join the conversation.

  • borisff
  • borisff's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 65
  • Thank you received: 3

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA API gps error

25 Jun 2021 09:10
#3
yep, thanks
local p3= gps.newPoint("49.57873221509796","17.398918569087982")
local la3, lo3 = gps.getStrig(p3)
print(lFormat("la=%s lo=%s", la3, lo3))

console:
la=49.57873222 lo=17.39891857

How do you find that ?

Please Log in or Create an account to join the conversation.

  • nikolausi
  • nikolausi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 328
  • Thank you received: 153

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA API gps error

23 Jan 2022 13:47
#4
Functions gps.getBearing and gps.getDestination are missing in Functions overview of JETI DC/DS Lua Programming API v1.5
Hope they make it into next version

Thanks

Please Log in or Create an account to join the conversation.

  • Raf
  • Raf's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 141
  • Thank you received: 192

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA API gps error

03 Feb 2022 14:44 - 03 Feb 2022 14:44
#5
Hihi, important is that they are not missing in implementation :-)
And documentation for those functions is not missing too.
Voltario T30, Touch Switch, MicroVario, AMS, SE6
Last edit: 03 Feb 2022 14:44 by Raf.

Please Log in or Create an account to join the conversation.

Time to create page: 0.328 seconds
Powered by Kunena Forum