mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-02-02 05:14:21 +01:00
Check the guard byte on the fast data.
This commit is contained in:
parent
f7fe4d6683
commit
a1bea49c88
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2015,2018 by Jonathan Naylor, G4KLX
|
||||
* Copyright (C) 2009-2015,2018,2019 by Jonathan Naylor, G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -111,6 +111,10 @@ const unsigned int DSTAR_FRAMES_PER_SEC = 50U;
|
|||
const unsigned char SCRAMBLER_BYTE1 = 0x70U;
|
||||
const unsigned char SCRAMBLER_BYTE2 = 0x4FU;
|
||||
const unsigned char SCRAMBLER_BYTE3 = 0x93U;
|
||||
const unsigned char SCRAMBLER_BYTE4 = 0x40U;
|
||||
const unsigned char SCRAMBLER_BYTE5 = 0x64U;
|
||||
|
||||
const unsigned char FAST_DATA_GUARD_BYTE = 0x02U;
|
||||
|
||||
const unsigned int DPLUS_PORT = 20001U;
|
||||
const unsigned int DEXTRA_PORT = 30001U;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2010-2015,2018,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -743,7 +743,8 @@ void CRepeaterHandler::processRepeater(CAMBEData& data)
|
|||
// Check for the fast data signature
|
||||
if (!m_fastData) {
|
||||
unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK;
|
||||
if (slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2)
|
||||
unsigned char guard = data[4U] ^ SCRAMBLER_BYTE5;
|
||||
if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) {
|
||||
m_fastData = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue