Hi all you friendly Pythonistas,
I'm a bit of a code newbie. So I don't know how to get my app to update the GPS location constantly in the background. Right now I use this code to update every time I press a button (which makes my app super slow):
latitude = gps_tools.refresh()
longitude = gps_tools.refresh()
which refers to:
latitude = gps_data['position']['latitude']
longitude = gps_data['position']['longitude']
satellites = gps_data['satellites']['used_satellites']
speed = gps_data['course']['speed']
print satellites, latitude, longitude, speed, count
return satellites, latitude, longitude, speed, count
However, there is a part of the app that is constantly updating the GPS. This is
print "this (gps(event)) should be called regularly"
gps_data = event
Which is the callback for
So GPS data is being updated regularly. I just need a way to get my variables latitude and longitude to automatically update every 10 seconds or so. How do I do that asynchronously (without causing the whole app to wait for updates)?
Thanks a lot!!!