From 61fd13514b987ad60eaffc54a304899a2c7ac24a Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Fri, 26 Feb 2021 21:51:42 -0800 Subject: [PATCH] increase positions logged --- bridge_gps_data.py | 2 +- gps_data.py | 2 +- scripts/dashboard/dashboard.py | 5 +++++ scripts/dashboard/dashboard_settings-SAMPLE.py | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bridge_gps_data.py b/bridge_gps_data.py index 6ac8414..0a41540 100755 --- a/bridge_gps_data.py +++ b/bridge_gps_data.py @@ -167,7 +167,7 @@ def dashboard_loc_write(call, lat, lon, time): # dash_entries = [] dash_entries.insert(0, {'call': call, 'lat': lat, 'lon': lon, 'time':time}) with open("/tmp/gps_data_user_loc.txt", 'w') as user_loc_file: - user_loc_file.write(str(dash_entries[:15])) + user_loc_file.write(str(dash_entries[:50])) user_loc_file.close() logger.info('User location saved for dashboard') #logger.info(dash_entries) diff --git a/gps_data.py b/gps_data.py index a9d8978..2c6e928 100644 --- a/gps_data.py +++ b/gps_data.py @@ -160,7 +160,7 @@ def dashboard_loc_write(call, lat, lon, time): # dash_entries = [] dash_entries.insert(0, {'call': call, 'lat': lat, 'lon': lon, 'time':time}) with open("/tmp/gps_data_user_loc.txt", 'w') as user_loc_file: - user_loc_file.write(str(dash_entries[:15])) + user_loc_file.write(str(dash_entries[:50])) user_loc_file.close() logger.info('User location saved for dashboard') #logger.info(dash_entries) diff --git a/scripts/dashboard/dashboard.py b/scripts/dashboard/dashboard.py index 2ac5e1c..e01df20 100644 --- a/scripts/dashboard/dashboard.py +++ b/scripts/dashboard/dashboard.py @@ -58,7 +58,12 @@ def get_loc_data(): ''' + display_number = 15 for e in dash_loc: + if display_number == 0: + break + else: + display_number = display_number - 1 tmp_loc = tmp_loc + ''' ''' + e['call'] + '''  ''' + str(e['lat']) + '''  diff --git a/scripts/dashboard/dashboard_settings-SAMPLE.py b/scripts/dashboard/dashboard_settings-SAMPLE.py index 1c36c8e..b856b1a 100644 --- a/scripts/dashboard/dashboard_settings-SAMPLE.py +++ b/scripts/dashboard/dashboard_settings-SAMPLE.py @@ -51,3 +51,4 @@ contact_website = 'https://hbl.ink' # Center dashboard map over these coordinates map_center = (47.00, -120.00) zoom_level = 7 +