add adjustable UNIT time
This commit is contained in:
parent
122b1be148
commit
8d80600f43
@ -56,6 +56,9 @@ import pickle
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Import UNIT time from rules.py
|
||||
from rules import UNIT_TIME
|
||||
|
||||
|
||||
# Does anybody read this stuff? There's a PEP somewhere that says I should do this.
|
||||
__author__ = 'Cortney T. Buffington, N0MJS'
|
||||
@ -152,7 +155,7 @@ def rule_timer_loop():
|
||||
else:
|
||||
logger.debug('(ROUTER) Conference Bridge NO ACTION: System: %s, Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID']))
|
||||
|
||||
_then = _now - 60
|
||||
_then = _now - 60 * UNIT_TIME
|
||||
remove_list = []
|
||||
for unit in UNIT_MAP:
|
||||
if UNIT_MAP[unit][1] < (_then):
|
||||
@ -1051,9 +1054,7 @@ class routerHBP(HBSYSTEM):
|
||||
else:
|
||||
self.unit_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _dtype_vseq, _stream_id, _data)
|
||||
elif _call_type == 'vcsbk':
|
||||
# Route CSBK packets to destination TG. Necessary for group data to work with GPS/Data decoder.
|
||||
self.group_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _dtype_vseq, _stream_id, _data)
|
||||
logger.debug('CSBK recieved, but HBlink does not process them currently. Packets routed to talkgroup.')
|
||||
logger.debug('CSBK recieved, but HBlink does not process them currently')
|
||||
else:
|
||||
logger.error('Unknown call type recieved -- not processed')
|
||||
|
||||
|
@ -53,6 +53,11 @@ list the names of each system that should bridge unit to unit (individual) calls
|
||||
|
||||
UNIT = ['ONE', 'TWO']
|
||||
|
||||
'''
|
||||
The amount of time to keep sending private calls to a system before flooding again
|
||||
'''
|
||||
UNIT_TIME = 15
|
||||
|
||||
'''
|
||||
This is for testing the syntax of the file. It won't eliminate all errors, but running this file
|
||||
like it were a Python program itself will tell you if the syntax is correct!
|
||||
|
Loading…
Reference in New Issue
Block a user