increase positions logged

This commit is contained in:
KF7EEL 2021-02-26 21:53:27 -08:00
parent f2107c9715
commit 79e90246a5
4 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -104,7 +104,7 @@ __status__ = 'pre-alpha'
# AT-D878 - Compressed UDP
# MD-380 - Unified Data Transport
hdr_type = ''
btf = ''
btf = -1
ssid = ''
# From dmr_utils3, modified to decode entire packet. Works for 1/2 rate coded data.
@ -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)
@ -321,7 +321,7 @@ def process_sms(_rf_src, sms):
elif 'A-' in sms and '@' in sms:
#Example SMS text: @ARMDS A-This is a test.
aprs_dest = re.sub('@| A-.*','',sms)
aprs_msg = re.sub('@.* A-|','',sms)
aprs_msg = re.sub('^@|.* A-|','',sms)
logger.info('APRS message to ' + aprs_dest.upper() + '. Message: ' + aprs_msg)
user_settings = ast.literal_eval(os.popen('cat ./user_settings.txt').read())
if int_id(_rf_src) in user_settings and user_settings[int_id(_rf_src)][1]['ssid'] != '':

View File

@ -58,7 +58,12 @@ def get_loc_data():
</td>
</tr>
'''
display_number = 15
for e in dash_loc:
if display_number == 0:
break
else:
display_number = display_number - 1
tmp_loc = tmp_loc + '''<tr>
<td style="text-align: center;"><a href="https://aprs.fi/''' + e['call'] + '''"><strong>''' + e['call'] + '''</strong></a></td>
<td style="text-align: center;"><strong>&nbsp;''' + str(e['lat']) + '''&nbsp;</strong></td>

View File

@ -51,3 +51,4 @@ contact_website = 'https://hbl.ink'
# Center dashboard map over these coordinates
map_center = (47.00, -120.00)
zoom_level = 7