From a4257a92cb4606036251d08e3cbca9fe12fbaead Mon Sep 17 00:00:00 2001 From: gnorbury Date: Sun, 20 Aug 2023 10:11:42 -0400 Subject: [PATCH] Multi_rx - show tg holds in terminal --- op25/gr-op25_repeater/apps/terminal.py | 7 +++++++ op25/gr-op25_repeater/apps/tk_p25.py | 1 + op25/gr-op25_repeater/www/www-static/main.js | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/op25/gr-op25_repeater/apps/terminal.py b/op25/gr-op25_repeater/apps/terminal.py index 0bd3b22c..ec2a300b 100755 --- a/op25/gr-op25_repeater/apps/terminal.py +++ b/op25/gr-op25_repeater/apps/terminal.py @@ -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 @@ -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() @@ -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: diff --git a/op25/gr-op25_repeater/apps/tk_p25.py b/op25/gr-op25_repeater/apps/tk_p25.py index bb491684..8a98cff8 100644 --- a/op25/gr-op25_repeater/apps/tk_p25.py +++ b/op25/gr-op25_repeater/apps/tk_p25.py @@ -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 diff --git a/op25/gr-op25_repeater/www/www-static/main.js b/op25/gr-op25_repeater/www/www-static/main.js index 8e3bcc24..d4d9822d 100644 --- a/op25/gr-op25_repeater/www/www-static/main.js +++ b/op25/gr-op25_repeater/www/www-static/main.js @@ -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 = []; @@ -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'] = ""; @@ -366,6 +368,9 @@ function channel_status() { html = ""; if (current_tgid != null) { html += "" + current_tgid + ""; + if (hold_tgid != 0) { + html += " [HOLD]"; + } } else if (c_grpaddr != 0) { html += "" + c_grpaddr + "";