Skip to content

Commit

Permalink
Multi_rx - show tg holds in terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbod committed Aug 20, 2023
1 parent 9475fac commit a4257a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions op25/gr-op25_repeater/apps/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def __init__(self, input_q, output_q, sock=None, **kwds):
self.current_msgqid = '0'
self.channel_list = []
self.capture_active = False
self.hold_tgid = 0
self.maxx = 0
self.maxy = 0
self.sock = sock
Expand Down Expand Up @@ -167,6 +168,8 @@ def title_help(self):
title_str = "OP25 (symbol capture)"
else:
title_str = "OP25"
if self.hold_tgid != 0:
title_str += (" (holding tg %d)" % self.hold_tgid)
help_str = "(f)req (h)old (s)kip (l)ock (W)list (B)list (q)uit (1-6)plot (,.<>)tune"
self.title_bar.erase()
self.help_bar.erase()
Expand Down Expand Up @@ -428,6 +431,10 @@ def process_json(self, js):
if msg[c_id]['capture'] != self.capture_active:
self.capture_active = msg[c_id]['capture']
self.title_help()
if msg[c_id]['hold_tgid'] is not None:
if msg[c_id]['hold_tgid'] != self.hold_tgid:
self.hold_tgid = msg[c_id]['hold_tgid']
self.title_help()
if msg[c_id]['tgid'] is not None:
s += ' Talkgroup ID %s' % (int(msg[c_id]['tgid']))
if 'tdma' in msg[c_id] and msg[c_id]['tdma'] is not None:
Expand Down
1 change: 1 addition & 0 deletions op25/gr-op25_repeater/apps/tk_p25.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,7 @@ def get_status(self):
d['srcaddr'] = self.talkgroups[self.current_tgid]['srcaddr'] if self.current_tgid is not None else 0
d['srctag'] = self.system.get_rid_tag(self.talkgroups[self.current_tgid]['srcaddr']) if self.current_tgid is not None else ""
d['encrypted'] = self.talkgroups[self.current_tgid]['encrypted'] if self.current_tgid is not None else 0
d['hold_tgid'] = self.hold_tgid if self.hold_tgid is not None else 0
d['mode'] = None
d['stream'] = self.meta_stream
d['msgqid'] = self.msgq_id
Expand Down
5 changes: 5 additions & 0 deletions op25/gr-op25_repeater/www/www-static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var auto_tracking = null;
var fine_tune = null;
var current_tgid = null;
var capture_active = false;
var hold_tgid = 0;
var send_busy = 0;
var send_qfull = 0;
var send_queue = [];
Expand Down Expand Up @@ -293,6 +294,7 @@ function channel_update(d) {
c_srctag = d[c_id]['srctag'];
c_stream_url = d[c_id]['stream_url'];
capture_active = d[c_id]['capture'];
hold_tgid = d[c_id]['hold_tgid'];
s2_c.style['display'] = "";
s2_d.style['display'] = "";
s2_e.style['display'] = "";
Expand Down Expand Up @@ -366,6 +368,9 @@ function channel_status() {
html = "";
if (current_tgid != null) {
html += "<span class=\"value\">" + current_tgid + "</span>";
if (hold_tgid != 0) {
html += "<span class=\"value\"> [HOLD]</span>";
}
}
else if (c_grpaddr != 0) {
html += "<span class=\"value\">" + c_grpaddr + "</span>";
Expand Down

0 comments on commit a4257a9

Please sign in to comment.