fix typo, add experimental comments

This commit is contained in:
KF7EEL 2021-12-09 13:43:47 -08:00
parent ea66cda2c3
commit e05b826fd4
2 changed files with 8 additions and 2 deletions

View File

@ -1346,6 +1346,7 @@ def aprs_process(packet):
user_settings = ast.literal_eval(os.popen('cat ' + user_settings_file).read()) user_settings = ast.literal_eval(os.popen('cat ' + user_settings_file).read())
for i in user_settings.items(): for i in user_settings.items():
sms_id = i[0] sms_id = i[0]
print(sms_id)
ssid = i[1][1]['ssid'] ssid = i[1][1]['ssid']
if i[1][1]['ssid'] == '': if i[1][1]['ssid'] == '':
ssid = user_ssid ssid = user_ssid
@ -1353,10 +1354,15 @@ def aprs_process(packet):
logger.info(aprslib.parse(packet)['from']) logger.info(aprslib.parse(packet)['from'])
mailbox_write(re.sub('-.*','', aprslib.parse(packet)['addresse']), aprslib.parse(packet)['from'], time(), 'From APRS-IS: ' + aprslib.parse(packet)['message_text'], aprslib.parse(packet)['from']) mailbox_write(re.sub('-.*','', aprslib.parse(packet)['addresse']), aprslib.parse(packet)['from'], time(), 'From APRS-IS: ' + aprslib.parse(packet)['message_text'], aprslib.parse(packet)['from'])
send_sms(False, sms_id, 9, 9, 'unit', str('APRS / ' + str(aprslib.parse(packet)['from']) + ': ' + aprslib.parse(packet)['message_text'])) send_sms(False, sms_id, 9, 9, 'unit', str('APRS / ' + str(aprslib.parse(packet)['from']) + ': ' + aprslib.parse(packet)['message_text']))
## print(UNIT_MAP[bytes_3(sms_id)][1])
## print(type(UNIT_MAP[bytes_3(sms_id)][1]))
## print(float(datetime.datetime.utcnow().strftime('%s')) - UNIT_MAP[bytes_3(sms_id)][1])
##
## if float(datetime.datetime.utcnow().strftime('%s')) - UNIT_MAP[bytes_3(sms_id)][1] < 60:
try: try:
if 'msgNo' in aprslib.parse(packet): if 'msgNo' in aprslib.parse(packet):
#sleep(1) #sleep(1)
## print(UNIT_MAP)
# Write function to check UNIT_MAP and see if X amount of time has passed, if time passed, no ACK. This will prevent multiple gateways from # Write function to check UNIT_MAP and see if X amount of time has passed, if time passed, no ACK. This will prevent multiple gateways from
# ACKing. time of 24hrs? # ACKing. time of 24hrs?
logger.info(str(aprslib.parse(packet)['addresse']) + '>APHBL3,TCPIP*:' + ':' + str(aprslib.parse(packet)['from'].ljust(9)) +':ack' + str(aprslib.parse(packet)['msgNo'])) logger.info(str(aprslib.parse(packet)['addresse']) + '>APHBL3,TCPIP*:' + ':' + str(aprslib.parse(packet)['from'].ljust(9)) +':ack' + str(aprslib.parse(packet)['msgNo']))

View File

@ -7112,7 +7112,7 @@ Name: <strong>''' + p.name + '''</strong>&nbsp; -&nbsp; Port: <strong>''' + str(
''' '''
for ss in ss_all: for ss in ss_all:
ss_log = ss_log + '''<tr> ss_log = ss_log + '''<tr>
<td><p style="text-align: center;"><strong>''' + ss.callsign + '''<strong></p> \n <p style="text-align: center;"><a href="/ss/''' + str(ss.dmr_id) + '''"><button type="button" class="btn btn-warning">''' + str(i.dmr_id) + '''</button></a></p></td> <td><p style="text-align: center;"><strong>''' + ss.callsign + '''<strong></p> \n <p style="text-align: center;"><a href="/ss/''' + str(ss.dmr_id) + '''"><button type="button" class="btn btn-warning">''' + str(ss.dmr_id) + '''</button></a></p></td>
<td><p style="text-align: center;">''' + ss.message + '''</p></td> <td><p style="text-align: center;">''' + ss.message + '''</p></td>
</tr> </tr>
''' '''