From 520c2e0541b3dbe101fd1a86870ae45f04ec7b24 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 19 Sep 2021 22:59:14 -0400 Subject: [PATCH] added name update --- groundstation/loc-add-foxtelem.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/groundstation/loc-add-foxtelem.py b/groundstation/loc-add-foxtelem.py index d9fa11e2..42ab8e37 100644 --- a/groundstation/loc-add-foxtelem.py +++ b/groundstation/loc-add-foxtelem.py @@ -129,7 +129,11 @@ if ((latitude != 0) and (longitude != 0) or grid): receiver_gpsSedStr = 'sudo sed -i "s/ ' + dquote + 'lon' + dquote + ': .*/ ' + dquote + 'lon' + dquote + ': ' + str(longitude) + '/g" /var/lib/openwebrx/settings.json' #print (receiver_gpsSedStr) system(receiver_gpsSedStr) - + + nameSedStr = 'sudo sed -i "s/ ' + dquote + 'receiver_location' + dquote + ': .*/ ' + dquote + 'receiver_location' + dquote + ': ' + location + ',/g" /var/lib/openwebrx/settings.json' + #print (nameSedStr) + system(nameSedStr) + print("\nOpenWebRX configuration updated with your latitude and longitude") @@ -184,7 +188,13 @@ if ((latitude != 0) and (longitude != 0) or grid): system(altSedStr) print("\nKLAtracker configuration updated with your alitude") - + + aslSedStr = 'sudo sed -i "s/ ' + dquote + 'receiver_asl' + dquote + ': .*/ ' + dquote + 'receiver_asl' + dquote + ': ' + str(altitude) + ',/g" /var/lib/openwebrx/settings.json' + #print (receiver_gpsSedStr) + system(aslSedStr) + + print("\nOpenWebRX configuration updated with your alitude") + break else: print("\nAltitude cannot be negative!")