increase positions logged
This commit is contained in:
parent
f2107c9715
commit
79e90246a5
@ -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)
|
||||
|
@ -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'] != '':
|
||||
|
@ -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> ''' + str(e['lat']) + ''' </strong></td>
|
||||
|
@ -51,3 +51,4 @@ contact_website = 'https://hbl.ink'
|
||||
# Center dashboard map over these coordinates
|
||||
map_center = (47.00, -120.00)
|
||||
zoom_level = 7
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user