fix SVRD UNIT

This commit is contained in:
KF7EEL 2021-09-06 11:54:59 -07:00
parent c1e867721b
commit dd521eb385
3 changed files with 5 additions and 2 deletions

View File

@ -496,6 +496,7 @@ class routerOBP(OPENBRIDGE):
self._targets = []
def svrd_received(self, _mode, _data):
print(UNIT_MAP)
logger.info('SVRD Received. Mode: ' + str(_mode) + ' Data: ' + str(_data))
if _mode == b'UNIT':
UNIT_MAP[_data] = (self._system, time())

View File

@ -1171,8 +1171,9 @@ def rule_timer_loop():
global UNIT_MAP
logger.debug('(ROUTER) routerHBP Rule timer loop started')
_now = time()
_then = _now - 60
_then = _now - 3600
remove_list = []
print(UNIT_MAP)
for unit in UNIT_MAP:
if UNIT_MAP[unit][1] < (_then):
remove_list.append(unit)
@ -1197,6 +1198,7 @@ class OBP(OPENBRIDGE):
def svrd_received(self, _mode, _data):
if _mode == b'UNIT':
UNIT_MAP[_data] = (self._system, time())
print(UNIT_MAP)
class HBP(HBSYSTEM):

View File

@ -288,7 +288,7 @@ class OPENBRIDGE(DatagramProtocol):
_stream_id = _data[16:20]
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data)
else:
self.svrd_received(_d_pkt[:4], _d_pkt[4:])
self.svrd_received(_d_pkt[4:8], _d_pkt[4:])
#************************************************
# HB MASTER CLASS