talkgroup goto: thx Triptolemus

master
Max 2 years ago
parent 679336d55d
commit 3612767021
  1. 1
      op25/gr-op25_repeater/apps/README
  2. 18
      op25/gr-op25_repeater/apps/terminal.py
  3. 28
      op25/gr-op25_repeater/apps/trunking.py
  4. 5
      op25/gr-op25_repeater/www/www-static/index.html
  5. 15
      op25/gr-op25_repeater/www/www-static/main.js

@ -37,6 +37,7 @@ should open. You must click on the terminal window to restore it to
focus, otherwise all keystrokes are consumed by gnuplot. Once in the
terminal window there are several keyboard commands:
h - hold
H - hold/goto the specified tgid
l - lockout
s - skip
q - quit program

@ -179,6 +179,24 @@ class curses_terminal(threading.Thread):
freq = None
if freq:
self.send_command('set_freq', freq)
elif c == ord('H'):
self.prompt.addstr(0, 0, 'Hold tgid')
self.prompt.refresh()
self.text_win.erase()
response = self.textpad.edit()
self.prompt.erase()
self.prompt.refresh()
self.text_win.erase()
self.text_win.refresh()
self.title_help()
try:
tgid = int(response)
if (tgid < 0) or (tgid > 65535):
tgid = 0
except:
tgid = 0
self.send_command('hold', tgid)
elif c == ord(','):
self.send_command('adj_tune', -100)
elif c == ord('.'):

@ -791,7 +791,7 @@ class rx_ctl (object):
cmd = msg.to_string()
if self.debug > 10:
sys.stderr.write('process_qmsg: command: %s\n' % cmd)
self.update_state(cmd, curr_time)
self.update_state(cmd, curr_time, int(msg.arg1())) # self.update_state(cmd, curr_time)
return
elif mtype == -1: # timeout
if self.debug > 10:
@ -966,7 +966,7 @@ class rx_ctl (object):
for frequency in gc_frequencies: # expire working frequencies
self.free_frequency(frequency, curr_time)
def update_state(self, command, curr_time):
def update_state(self, command, curr_time, cmd_data = 0): # def update_state(self, command, curr_time):
if not self.configs:
return # run in "manual mode" if no conf
@ -1058,12 +1058,28 @@ class rx_ctl (object):
pass
elif command == 'hold':
self.last_command = {'command': command, 'time': curr_time}
if self.hold_mode is False and self.current_tgid:
self.tgid_hold = self.current_tgid
if cmd_data != 0:
self.tgid_hold = cmd_data
self.tgid_hold_until = curr_time + 86400 * 10000
self.hold_mode = True
if self.debug > 0:
sys.stderr.write ('%f set hold tg(%s) until %f\n' % (time.time(), self.current_tgid, self.tgid_hold_until))
if self.debug > 0:
sys.stderr.write ('%f set hold tg(%s) until %f\n' % (time.time(), self.tgid_hold, self.tgid_hold_until))
if self.current_tgid != self.tgid_hold:
self.current_tgid = self.tgid_hold
self.current_srcaddr = 0
self.current_grpaddr = 0
self.current_alg = ""
self.current_algid = 128
self.current_keyid = 0
new_state = self.states.CC
new_frequency = tsys.trunk_cc
elif self.hold_mode is False:
if self.current_tgid:
self.tgid_hold = self.current_tgid
self.tgid_hold_until = curr_time + 86400 * 10000
self.hold_mode = True
if self.debug > 0:
sys.stderr.write ('%f set hold tg(%s) until %f\n' % (time.time(), self.tgid_hold, self.tgid_hold_until))
elif self.hold_mode is True:
self.current_tgid = None
self.tgid_hold = None

@ -101,6 +101,11 @@ Before proceeding you will need to know the control channel frequency or frequen
<div>
<input type="button" class="control-button" name="lockout" value="LOCKOUT" onclick="javascript:this.blur(); f_scan_button(&quot;lockout&quot;);">
</div>
<div>
<input type="button" class="control-button" name="popout" value="GO TO" onclick="javascript:f_goto_button(&quot;goto&quot;);">
</div>
</div>
<div class="statDisplay">

@ -700,6 +700,21 @@ function f_scan_button(command) {
send_command(command, current_tgid);
}
function f_goto_button(command) {
var _tgid = 0;
if (command == "goto") {
command = "hold"
if (current_tgid != null)
_tgid = current_tgid;
_tgid = parseInt(prompt("Enter tgid to hold!!!", _tgid));
if (isNaN(_tgid) || (_tgid < 0) || (_tgid > 65535))
_tgid = 0;
send_command(command, _tgid);
}
}
function f_debug() {
if (!d_debug) return;
var html = "busy " + send_busy;

Loading…
Cancel
Save