Skip to content

Commit

Permalink
Merge branch 'main' of Predator
Browse files Browse the repository at this point in the history
  • Loading branch information
connervieira committed Jun 10, 2024
2 parents 9750288 + 64954bd commit 237a02b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,11 @@ def gps_daemon():
most_recent_gps_location = get_gps_location()
time.sleep(float(config["general"]["gps"]["lazy_polling_interval"])) # Wait before polling the GPS again.
def get_gps_location_lazy(): # This function gets the most recent GPS location from the lazy GPS monitor.
return most_recent_gps_location
try:
return most_recent_gps_location
except:
return [0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]

if (config["general"]["gps"]["enabled"] == True): # Only start the GPS polling thread if the GPS is enabled.
gps_daemon_thread = threading.Thread(target=gps_daemon, name="LazyGPSDaemon") # Create the lazy GPS manager thread.
gps_daemon_thread.start() # Start the GPS daemon thread.
Expand Down

0 comments on commit 237a02b

Please sign in to comment.