mirror of https://github.com/g4klx/MMDVM.git
Workaround for TX buffer overflows.
This commit is contained in:
parent
8f9744c0ec
commit
4fb563f534
|
@ -93,7 +93,7 @@ bool CDMRSlotRX::processSample(q15_t sample)
|
||||||
if (m_dataPtr >= min && m_dataPtr <= max)
|
if (m_dataPtr >= min && m_dataPtr <= max)
|
||||||
correlateSync(sample);
|
correlateSync(sample);
|
||||||
} else {
|
} else {
|
||||||
if (m_dataPtr >= 160U && m_dataPtr <= 530U)
|
if (m_dataPtr >= 380U && m_dataPtr <= 530U)
|
||||||
correlateSync(sample);
|
correlateSync(sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ void CDMRTX::process()
|
||||||
if (m_poLen > 0U) {
|
if (m_poLen > 0U) {
|
||||||
uint16_t space = io.getSpace();
|
uint16_t space = io.getSpace();
|
||||||
|
|
||||||
while (space > (4U * DMR_RADIO_SYMBOL_LENGTH)) {
|
while (space > (4U * DMR_RADIO_SYMBOL_LENGTH) && space < 1000U) {
|
||||||
uint8_t c = m_poBuffer[m_poPtr];
|
uint8_t c = m_poBuffer[m_poPtr];
|
||||||
uint8_t m = m_markBuffer[m_poPtr];
|
uint8_t m = m_markBuffer[m_poPtr];
|
||||||
m_poPtr++;
|
m_poPtr++;
|
||||||
|
|
|
@ -260,7 +260,7 @@ void CDStarTX::process()
|
||||||
if (m_poLen > 0U) {
|
if (m_poLen > 0U) {
|
||||||
uint16_t space = io.getSpace();
|
uint16_t space = io.getSpace();
|
||||||
|
|
||||||
while (space > (8U * DSTAR_RADIO_BIT_LENGTH)) {
|
while (space > (8U * DSTAR_RADIO_BIT_LENGTH) && space < 1000U) {
|
||||||
uint8_t c = m_poBuffer[m_poPtr++];
|
uint8_t c = m_poBuffer[m_poPtr++];
|
||||||
writeByte(c);
|
writeByte(c);
|
||||||
|
|
||||||
|
|
2
IO.cpp
2
IO.cpp
|
@ -32,7 +32,7 @@ const uint16_t GMSK_FILTER_LEN = 12U;
|
||||||
|
|
||||||
const uint16_t DC_OFFSET = 2048U;
|
const uint16_t DC_OFFSET = 2048U;
|
||||||
|
|
||||||
const uint16_t TX_BUFFER_SIZE = 1001U;
|
const uint16_t TX_BUFFER_SIZE = 501U;
|
||||||
const uint16_t RX_BUFFER_SIZE = 601U;
|
const uint16_t RX_BUFFER_SIZE = 601U;
|
||||||
|
|
||||||
#if defined(__SAM3X8E__)
|
#if defined(__SAM3X8E__)
|
||||||
|
|
|
@ -75,7 +75,7 @@ void CYSFTX::process()
|
||||||
if (m_poLen > 0U) {
|
if (m_poLen > 0U) {
|
||||||
uint16_t space = io.getSpace();
|
uint16_t space = io.getSpace();
|
||||||
|
|
||||||
while (space > (4U * YSF_RADIO_SYMBOL_LENGTH)) {
|
while (space > (4U * YSF_RADIO_SYMBOL_LENGTH) && space < 1000U) {
|
||||||
uint8_t c = m_poBuffer[m_poPtr++];
|
uint8_t c = m_poBuffer[m_poPtr++];
|
||||||
writeByte(c);
|
writeByte(c);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue