fix SVRD UNIT
This commit is contained in:
parent
c1e867721b
commit
dd521eb385
@ -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())
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user