mirror of
https://github.com/g4klx/MMDVM_HS.git
synced 2025-12-06 07:02:00 +01:00
Reducing DMRIdleRX buffer a little, fix some format and copyrights
This commit is contained in:
parent
56d3b16493
commit
1f2ae86612
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2009-2016 by Jonathan Naylor G4KLX
|
* Copyright (C) 2009-2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -202,7 +202,6 @@ void CDMRDMORX::correlateSync()
|
||||||
{
|
{
|
||||||
if ( (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) || \
|
if ( (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) || \
|
||||||
(countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_S2_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) ) {
|
(countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_S2_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) ) {
|
||||||
|
|
||||||
m_control = CONTROL_DATA;
|
m_control = CONTROL_DATA;
|
||||||
m_syncPtr = m_dataPtr;
|
m_syncPtr = m_dataPtr;
|
||||||
|
|
||||||
|
|
@ -215,11 +214,9 @@ void CDMRDMORX::correlateSync()
|
||||||
m_endPtr -= DMO_BUFFER_LENGTH_BITS;
|
m_endPtr -= DMO_BUFFER_LENGTH_BITS;
|
||||||
|
|
||||||
m_modeTimerCnt = 0;
|
m_modeTimerCnt = 0;
|
||||||
|
|
||||||
//DEBUG4("SYNC MS Data found pos/start/end:", m_dataPtr, m_startPtr, m_endPtr);
|
//DEBUG4("SYNC MS Data found pos/start/end:", m_dataPtr, m_startPtr, m_endPtr);
|
||||||
} else if ( (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) || \
|
} else if ( (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) || \
|
||||||
(countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_S2_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) ) {
|
(countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_S2_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) ) {
|
||||||
|
|
||||||
m_control = CONTROL_VOICE;
|
m_control = CONTROL_VOICE;
|
||||||
m_syncPtr = m_dataPtr;
|
m_syncPtr = m_dataPtr;
|
||||||
|
|
||||||
|
|
@ -232,7 +229,6 @@ void CDMRDMORX::correlateSync()
|
||||||
m_endPtr -= DMO_BUFFER_LENGTH_BITS;
|
m_endPtr -= DMO_BUFFER_LENGTH_BITS;
|
||||||
|
|
||||||
m_modeTimerCnt = 0;
|
m_modeTimerCnt = 0;
|
||||||
|
|
||||||
//DEBUG4("SYNC MS Voice found pos/start/end: ", m_dataPtr, m_startPtr, m_endPtr);
|
//DEBUG4("SYNC MS Voice found pos/start/end: ", m_dataPtr, m_startPtr, m_endPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -65,7 +65,6 @@ void CDMRIdleRX::databit(bool bit)
|
||||||
m_endPtr = m_dataPtr + DMR_SLOT_TYPE_LENGTH_BITS / 2U + DMR_INFO_LENGTH_BITS / 2U;
|
m_endPtr = m_dataPtr + DMR_SLOT_TYPE_LENGTH_BITS / 2U + DMR_INFO_LENGTH_BITS / 2U;
|
||||||
if (m_endPtr >= DMR_IDLE_LENGTH_BITS)
|
if (m_endPtr >= DMR_IDLE_LENGTH_BITS)
|
||||||
m_endPtr -= DMR_IDLE_LENGTH_BITS;
|
m_endPtr -= DMR_IDLE_LENGTH_BITS;
|
||||||
|
|
||||||
// DEBUG3("SYNC MS Data found pos/end:", m_dataPtr, m_endPtr);
|
// DEBUG3("SYNC MS Data found pos/end:", m_dataPtr, m_endPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "DMRDefines.h"
|
#include "DMRDefines.h"
|
||||||
|
|
||||||
const uint16_t DMR_IDLE_LENGTH_BITS = 400U;
|
const uint16_t DMR_IDLE_LENGTH_BITS = 320U;
|
||||||
|
|
||||||
class CDMRIdleRX {
|
class CDMRIdleRX {
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,7 @@ void CDMRSlotRX::reset()
|
||||||
|
|
||||||
bool CDMRSlotRX::databit(bool bit)
|
bool CDMRSlotRX::databit(bool bit)
|
||||||
{
|
{
|
||||||
uint16_t min;
|
uint16_t min, max;
|
||||||
uint16_t max;
|
|
||||||
|
|
||||||
m_delayPtr++;
|
m_delayPtr++;
|
||||||
if (m_delayPtr < m_delay)
|
if (m_delayPtr < m_delay)
|
||||||
|
|
@ -367,7 +366,6 @@ void CDMRSlotRX::correlateSync()
|
||||||
uint8_t control;
|
uint8_t control;
|
||||||
|
|
||||||
if (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) {
|
if (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_DATA_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) {
|
||||||
|
|
||||||
control = CONTROL_DATA;
|
control = CONTROL_DATA;
|
||||||
syncPtr = m_dataPtr;
|
syncPtr = m_dataPtr;
|
||||||
|
|
||||||
|
|
@ -390,11 +388,8 @@ void CDMRSlotRX::correlateSync()
|
||||||
m_endPtr1 = endPtr;
|
m_endPtr1 = endPtr;
|
||||||
m_control1 = control;
|
m_control1 = control;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DEBUG5("SYNC corr MS Data found slot/pos/start/end:", m_slot ? 2U : 1U, m_dataPtr, startPtr, endPtr);
|
//DEBUG5("SYNC corr MS Data found slot/pos/start/end:", m_slot ? 2U : 1U, m_dataPtr, startPtr, endPtr);
|
||||||
|
|
||||||
} else if (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) {
|
} else if (countBits64((m_patternBuffer & DMR_SYNC_BITS_MASK) ^ DMR_MS_VOICE_SYNC_BITS) <= MAX_SYNC_BYTES_ERRS) {
|
||||||
|
|
||||||
control = CONTROL_VOICE;
|
control = CONTROL_VOICE;
|
||||||
syncPtr = m_dataPtr;
|
syncPtr = m_dataPtr;
|
||||||
|
|
||||||
|
|
@ -417,7 +412,6 @@ void CDMRSlotRX::correlateSync()
|
||||||
m_endPtr1 = endPtr;
|
m_endPtr1 = endPtr;
|
||||||
m_control1 = control;
|
m_control1 = control;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DEBUG5("SYNC corr MS Voice found slot/pos/start/end: ", m_slot ? 2U : 1U, m_dataPtr, startPtr, endPtr);
|
//DEBUG5("SYNC corr MS Voice found slot/pos/start/end: ", m_slot ? 2U : 1U, m_dataPtr, startPtr, endPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue