This commit is contained in:
n0mjs710 2019-01-07 10:50:55 -06:00
commit 0c37e82c61

View File

@ -270,15 +270,15 @@ class HBSYSTEM(DatagramProtocol):
#logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID']) #logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID'])
def send_peer(self, _peer, _packet): def send_peer(self, _peer, _packet):
#if _packet[:4] == 'DMRD': if _packet[:4] == 'DMRD':
self.transport.write(b''.join([_packet[:11], _peer, _packet[15:]]), self._peers[_peer]['SOCKADDR']) _packet = b''.join([_packet[:11], _peer, _packet[15:]])
self.transport.write(_packet, self._peers[_peer]['SOCKADDR'])
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!! # KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
#logger.debug('(%s) TX Packet to %s on port %s: %s', self._peers[_peer]['RADIO_ID'], self._peers[_peer]['IP'], self._peers[_peer]['PORT'], ahex(_packet)) #logger.debug('(%s) TX Packet to %s on port %s: %s', self._peers[_peer]['RADIO_ID'], self._peers[_peer]['IP'], self._peers[_peer]['PORT'], ahex(_packet))
def send_master(self, _packet): def send_master(self, _packet):
#if _packet[:4] == b'DMRD': if _packet[:4] == b'DMRD':
# _packet = _packet[:11] + self._config['RADIO_ID'] + _packet[15:] _packet = b''.join([_packet[:11], self._config['RADIO_ID'], _packet[15:]])
_packet = b''.join([_packet[:11], self._config['RADIO_ID'], _packet[15:]])
self.transport.write(_packet, self._config['MASTER_SOCKADDR']) self.transport.write(_packet, self._config['MASTER_SOCKADDR'])
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!! # KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
# logger.debug('(%s) TX Packet to %s:%s -- %s', self._system, self._config['MASTER_IP'], self._config['MASTER_PORT'], ahex(_packet)) # logger.debug('(%s) TX Packet to %s:%s -- %s', self._system, self._config['MASTER_IP'], self._config['MASTER_PORT'], ahex(_packet))