From f34e31c00a5fa87a7f5efd3dd4cccc5ec5baeddc Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 3 Jul 2021 20:25:25 -0400 Subject: [PATCH] clear lat and long if grid is set --- groundstation/loc-add-foxtelem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/loc-add-foxtelem.py b/groundstation/loc-add-foxtelem.py index 4edf0510..3b641aa9 100644 --- a/groundstation/loc-add-foxtelem.py +++ b/groundstation/loc-add-foxtelem.py @@ -75,7 +75,7 @@ else: #file = open(r"/home/pi/CubeSatSim/groundstation/.profile","w+") -if ((latitude != 0) and (longitude != 0)): +if ((latitude != 0) and (longitude != 0) or grid): latSedStr = 'sed -i "s/latitude=.*/latitude=' + str(latitude) + '/g" /home/pi/FoxTelemetryData/FoxTelem.properties' #print (latSedStr) @@ -85,7 +85,8 @@ if ((latitude != 0) and (longitude != 0)): #print (longSedStr) system(longSedStr) - print("\nFoxTelem configuration updated with your latitude and longitude") + if not grid: + print("\nFoxTelem configuration updated with your latitude and longitude") if grid: