From 4b61e1a802dd6c88cec157b0cca7e36419909379 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 21 Nov 2021 04:10:06 +0000 Subject: [PATCH] Rewrite incoming GPS on TG 900999 to PC 900999 Rewrite incoming ECHO on PC9990 to TG9990 --- bridge_master.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bridge_master.py b/bridge_master.py index aec2440..57cafd6 100644 --- a/bridge_master.py +++ b/bridge_master.py @@ -2020,6 +2020,17 @@ class routerHBP(HBSYSTEM): #Add system to SUB_MAP SUB_MAP[_rf_src] = (self._system,_slot,pkt_time) + + #Rewrite GPS Data comming in as a group call to a unit call + if (_call_type == 'group' or _call_type == 'vcsbk') and _int_dst_id == 900999: + _bits = header(_slot,'unit',_bits) + logger.info('(%s) Type Rewrite - GPS data from ID: %s, on TG 900999 rewritten to unit call to ID 900999',self._system,int_id(_rf_src)) + + #Rewrite incoming loro request to group call + if _call_type == 'group' and _int_dst_id == 9990: + _bits = header(_slot,'group',_bits) + logger.info('(%s) Type Rewrite - Echo data from ID: %s, on PC 9990 rewritten to group call to TG 9990',self._system,int_id(_rf_src)) + if _call_type == 'unit' and (_dtype_vseq == 6 or _dtype_vseq == 7 or _dtype_vseq == 8 or (_stream_id != self.STATUS[_slot]['RX_STREAM_ID'] and _dtype_vseq == 3)): _data_call = True