add comments

This commit is contained in:
Waldek 2021-05-20 09:31:16 +02:00 committed by GitHub
parent cc7f3c279f
commit cc53dda1e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -752,7 +752,9 @@ def process_message(_bmessage):
log_message = '{} {} {} SYS: {:8.8s} SRC_ID: {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s} Time: {}s '.format(_now[10:19], p[0][6:], p[1], p[3], p[5], p[7],p[8],alias_tgid(int(p[8]),talkgroup_ids), p[6], alias_short(int(p[6]), subscriber_ids), int(float(p[9])))
# log only to file if system is NOT OpenBridge event (not logging open bridge system, name depends on your OB definitions) AND transmit time is LONGER as 2sec (make sense for very short transmits)
if LASTHEARD_INC:
if int(float(p[9]))> 2:
# save QSOs to lastheared.log for which transmission duration is longer than 2 sec,
# use >= 0 instead of >2 if you want to record all activities
if int(float(p[9])) > 2:
log_lh_message = '{},{},{},{},{},{},{},TS{},TG{},{},{},{}'.format(_now, p[9], p[0], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids))
lh_logfile = open(LOG_PATH+"lastheard.log", "a")
lh_logfile.write(log_lh_message + '\n')
@ -783,6 +785,7 @@ def process_message(_bmessage):
my_list.append(row[10])
n += 1
f.write(hline+"\n")
# maximum number of lists in lastheard on the main page
if n == 20:
break
f.write("</table></fieldset><br>")