fix unit call bug
This commit is contained in:
parent
5c7742c7d0
commit
51d469768a
21
bridge.py
21
bridge.py
|
@ -439,9 +439,18 @@ class routerOBP(OPENBRIDGE):
|
||||||
pkt_time = time()
|
pkt_time = time()
|
||||||
dmrpkt = _data[20:53]
|
dmrpkt = _data[20:53]
|
||||||
_bits = _data[15]
|
_bits = _data[15]
|
||||||
|
|
||||||
|
# Check if subscriber is in STATIC_UNIT
|
||||||
|
for i in STATIC_UNIT:
|
||||||
|
# Subscriber is static. Add 20 years of time.
|
||||||
|
if i[0] == int_id(_rf_src):
|
||||||
|
map_time = pkt_time + time_20
|
||||||
|
# Proceed as normal
|
||||||
|
else:
|
||||||
|
map_time = pkt_time
|
||||||
|
|
||||||
# Make/update this unit in the UNIT_MAP cache
|
# Make/update this unit in the UNIT_MAP cache
|
||||||
UNIT_MAP[_rf_src] = (self.name, pkt_time)
|
UNIT_MAP[_rf_src] = (self.name, map_time)
|
||||||
|
|
||||||
|
|
||||||
# Is this a new call stream?
|
# Is this a new call stream?
|
||||||
|
@ -922,6 +931,16 @@ class routerHBP(HBSYSTEM):
|
||||||
dmrpkt = _data[20:53]
|
dmrpkt = _data[20:53]
|
||||||
_bits = _data[15]
|
_bits = _data[15]
|
||||||
|
|
||||||
|
# Check if subscriber is in STATIC_UNIT
|
||||||
|
for i in STATIC_UNIT:
|
||||||
|
# Subscriber is static. Add 20 years of time.
|
||||||
|
if i[0] == int_id(_rf_src):
|
||||||
|
map_time = pkt_time + time_20
|
||||||
|
# Proceed as normal
|
||||||
|
else:
|
||||||
|
map_time = pkt_time
|
||||||
|
|
||||||
|
|
||||||
# Make/update this unit in the UNIT_MAP cache
|
# Make/update this unit in the UNIT_MAP cache
|
||||||
UNIT_MAP[_rf_src] = (self.name, pkt_time)
|
UNIT_MAP[_rf_src] = (self.name, pkt_time)
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,19 @@ list the names of each system that should bridge unit to unit (individual) calls
|
||||||
UNIT = ['ONE', 'TWO']
|
UNIT = ['ONE', 'TWO']
|
||||||
|
|
||||||
'''
|
'''
|
||||||
The amount of time to keep sending private calls to a system before flooding again
|
Unit Call flood timeout:
|
||||||
|
The amount of time to keep sending private calls to a single system before
|
||||||
|
flooding all systems with the call. A higher value should be set for systems where subscribers
|
||||||
|
are not moving between systems often. A lower value should be set for systems that have subscribers
|
||||||
|
moving between systems often.
|
||||||
|
|
||||||
|
Time is in minutes.
|
||||||
'''
|
'''
|
||||||
UNIT_TIME = 15
|
UNIT_TIME = 15
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Input the DMR ID and SYSTEM of a subscriber that you would like to have always have private calls routed. This will not flood all systems.
|
Input the DMR ID and SYSTEM of a subscriber that you would like to have always have private calls routed.
|
||||||
|
This will not flood all systems.
|
||||||
'''
|
'''
|
||||||
STATIC_UNIT = [
|
STATIC_UNIT = [
|
||||||
[ 123, 'CLIENT-1'],
|
[ 123, 'CLIENT-1'],
|
||||||
|
|
Loading…
Reference in New Issue