fix typos
This commit is contained in:
parent
5f2861f4c6
commit
b7cc6ca9cb
@ -212,7 +212,8 @@ def sos_write(dmr_id, time, message):
|
|||||||
else:
|
else:
|
||||||
sos_call = user_settings[dmr_id][0]['call'] + '-' + user_settings[dmr_id][1]['ssid']
|
sos_call = user_settings[dmr_id][0]['call'] + '-' + user_settings[dmr_id][1]['ssid']
|
||||||
except:
|
except:
|
||||||
sos_call = str(get_alias((dmr_id), subscriber_ids)) sos_info = {'call': sos_call, 'dmr_id': dmr_id, 'time': time, 'message':message}
|
sos_call = str(get_alias((dmr_id), subscriber_ids))
|
||||||
|
sos_info = {'call': sos_call, 'dmr_id': dmr_id, 'time': time, 'message':message}
|
||||||
with open("/tmp/gps_data_user_sos.txt", 'w') as sos_file:
|
with open("/tmp/gps_data_user_sos.txt", 'w') as sos_file:
|
||||||
sos_file.write(str(sos_info))
|
sos_file.write(str(sos_info))
|
||||||
sos_file.close()
|
sos_file.close()
|
||||||
@ -284,7 +285,7 @@ def process_sms(_rf_src, sms):
|
|||||||
elif '@COM' in sms:
|
elif '@COM' in sms:
|
||||||
user_setting_write(int_id(_rf_src), re.sub(' .*|@','',sms), re.sub('@COM |@COM','',sms))
|
user_setting_write(int_id(_rf_src), re.sub(' .*|@','',sms), re.sub('@COM |@COM','',sms))
|
||||||
elif '@BB' in sms:
|
elif '@BB' in sms:
|
||||||
dashboard_bb_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.time(), re.sub('@BB|@BB ','',sms))
|
dashboard_bb_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time(), re.sub('@BB|@BB ','',sms))
|
||||||
elif '@' and ' E-' in sms:
|
elif '@' and ' E-' in sms:
|
||||||
email_message = str(re.sub('.*@|.* E-', '', sms))
|
email_message = str(re.sub('.*@|.* E-', '', sms))
|
||||||
to_email = str(re.sub(' E-.*', '', sms))
|
to_email = str(re.sub(' E-.*', '', sms))
|
||||||
@ -299,14 +300,14 @@ def process_sms(_rf_src, sms):
|
|||||||
logger.info(error_exception)
|
logger.info(error_exception)
|
||||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||||
elif '@SOS' in sms or '@NOTICE' in sms:
|
elif '@SOS' in sms or '@NOTICE' in sms:
|
||||||
sos_write(int_id(_rf_src), time.time(), sms)
|
sos_write(int_id(_rf_src), time(), sms)
|
||||||
elif '@REM SOS' == sms:
|
elif '@REM SOS' == sms:
|
||||||
os.remove('/tmp/gps_data_user_sos.txt')
|
os.remove('/tmp/gps_data_user_sos.txt')
|
||||||
logger.info('Removing SOS')
|
logger.info('Removing SOS')
|
||||||
elif '@' and 'M-' in sms:
|
elif '@' and 'M-' in sms:
|
||||||
message = re.sub('^@|.* M-|','',sms)
|
message = re.sub('^@|.* M-|','',sms)
|
||||||
recipient = re.sub('@| M-.*','',sms)
|
recipient = re.sub('@| M-.*','',sms)
|
||||||
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.time(), message, str(recipient).upper())
|
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time(), message, str(recipient).upper())
|
||||||
elif '@REM MAIL' == sms:
|
elif '@REM MAIL' == sms:
|
||||||
mailbox_delete(_rf_src)
|
mailbox_delete(_rf_src)
|
||||||
elif '@MH' in sms:
|
elif '@MH' in sms:
|
||||||
@ -361,7 +362,7 @@ def process_sms(_rf_src, sms):
|
|||||||
try:
|
try:
|
||||||
aprslib.parse(aprs_loc_packet)
|
aprslib.parse(aprs_loc_packet)
|
||||||
aprs_send(aprs_loc_packet)
|
aprs_send(aprs_loc_packet)
|
||||||
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, aprs_lat, aprs_lon, time.time())
|
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, aprs_lat, aprs_lon, time())
|
||||||
#logger.info('Sent manual position to APRS')
|
#logger.info('Sent manual position to APRS')
|
||||||
except Exception as error_exception:
|
except Exception as error_exception:
|
||||||
logger.info('Exception. Not uploaded')
|
logger.info('Exception. Not uploaded')
|
||||||
@ -1545,7 +1546,7 @@ class routerHBP(HBSYSTEM):
|
|||||||
float(lat_deg) < 91
|
float(lat_deg) < 91
|
||||||
float(lon_deg) < 121
|
float(lon_deg) < 121
|
||||||
aprs_send(aprs_loc_packet)
|
aprs_send(aprs_loc_packet)
|
||||||
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, aprs_lat, aprs_lon, time.time())
|
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, aprs_lat, aprs_lon, time())
|
||||||
#logger.info('Sent APRS packet')
|
#logger.info('Sent APRS packet')
|
||||||
except Exception as error_exception:
|
except Exception as error_exception:
|
||||||
logger.info('Error. Failed to send packet. Packet may be malformed.')
|
logger.info('Error. Failed to send packet. Packet may be malformed.')
|
||||||
@ -1647,7 +1648,7 @@ class routerHBP(HBSYSTEM):
|
|||||||
float(loc.lat)
|
float(loc.lat)
|
||||||
float(loc.lon)
|
float(loc.lon)
|
||||||
aprs_send(aprs_loc_packet)
|
aprs_send(aprs_loc_packet)
|
||||||
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, str(loc.lat[0:7]) + str(loc.lat_dir), str(loc.lon[0:8]) + str(loc.lon_dir), time.time())
|
dashboard_loc_write(str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + ssid, str(loc.lat[0:7]) + str(loc.lat_dir), str(loc.lon[0:8]) + str(loc.lon_dir), time())
|
||||||
except Exception as error_exception:
|
except Exception as error_exception:
|
||||||
logger.info('Failed to parse packet. Packet may be deformed. Not uploaded.')
|
logger.info('Failed to parse packet. Packet may be deformed. Not uploaded.')
|
||||||
logger.info(error_exception)
|
logger.info(error_exception)
|
||||||
|
Loading…
Reference in New Issue
Block a user