mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-08-21 14:36:21 +02:00
Remove the delay when using COS.
This commit is contained in:
@@ -78,9 +78,11 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
|
||||
q15_t currentRFSample = q15_t((q31_t(samples[i]) << 8) / m_rxLevel);
|
||||
uint8_t ctcssState = m_ctcssRX.process(currentRFSample);
|
||||
|
||||
// Delay the audio by 100ms to better match the CTCSS detector output
|
||||
m_inputRFRB.put(currentRFSample);
|
||||
m_inputRFRB.get(currentRFSample);
|
||||
if (!m_useCOS) {
|
||||
// Delay the audio by 100ms to better match the CTCSS detector output
|
||||
m_inputRFRB.put(currentRFSample);
|
||||
m_inputRFRB.get(currentRFSample);
|
||||
}
|
||||
|
||||
q15_t currentExtSample;
|
||||
bool inputExt = m_inputExtRB.get(currentExtSample);//always consume the external input data so it does not overflow
|
||||
@@ -153,9 +155,8 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
|
||||
void CFM::process()
|
||||
{
|
||||
q15_t sample;
|
||||
while(io.getSpace() >= 3U && m_outputRFRB.get(sample)) {
|
||||
while(io.getSpace() >= 3U && m_outputRFRB.get(sample))
|
||||
io.write(STATE_FM, &sample, 1U);
|
||||
}
|
||||
}
|
||||
|
||||
void CFM::reset()
|
||||
@@ -704,4 +705,3 @@ void CFM::insertSilence(uint16_t ms)
|
||||
for (uint32_t i = 0U; i < nSamples; i++)
|
||||
m_outputRFRB.put(0);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -82,7 +82,7 @@ void CNXDNTX::process()
|
||||
m_poBuffer[m_poLen++] = NXDN_PREAMBLE[2U];
|
||||
} else {
|
||||
for (uint8_t i = 0U; i < NXDN_FRAME_LENGTH_BYTES; i++) {
|
||||
uint8_t c;
|
||||
uint8_t c = 0U;
|
||||
m_buffer.get(c);
|
||||
m_poBuffer[m_poLen++] = c;
|
||||
}
|
||||
@@ -168,4 +168,3 @@ uint8_t CNXDNTX::getSpace() const
|
||||
{
|
||||
return m_buffer.getSpace() / NXDN_FRAME_LENGTH_BYTES;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void CP25TX::process()
|
||||
uint8_t length;
|
||||
m_buffer.get(length);
|
||||
for (uint8_t i = 0U; i < length; i++) {
|
||||
uint8_t c;
|
||||
uint8_t c = 0U;
|
||||
m_buffer.get(c);
|
||||
m_poBuffer[m_poLen++] = c;
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2018,2020 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
|
||||
@@ -61,7 +61,7 @@ void CPOCSAGTX::process()
|
||||
m_poBuffer[m_poLen++] = POCSAG_SYNC;
|
||||
} else {
|
||||
for (uint8_t i = 0U; i < POCSAG_FRAME_LENGTH_BYTES; i++) {
|
||||
uint8_t c;
|
||||
uint8_t c = 0U;
|
||||
m_buffer.get(c);
|
||||
m_poBuffer[m_poLen++] = c;
|
||||
}
|
||||
@@ -147,4 +147,3 @@ uint8_t CPOCSAGTX::getSpace() const
|
||||
{
|
||||
return m_buffer.getSpace() / POCSAG_FRAME_LENGTH_BYTES;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2018,2020 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -76,7 +76,7 @@ void CYSFTX::process()
|
||||
m_poBuffer[m_poLen++] = YSF_START_SYNC;
|
||||
} else {
|
||||
for (uint8_t i = 0U; i < YSF_FRAME_LENGTH_BYTES; i++) {
|
||||
uint8_t c;
|
||||
uint8_t c = 0U;
|
||||
m_buffer.get(c);
|
||||
m_poBuffer[m_poLen++] = c;
|
||||
}
|
||||
@@ -192,4 +192,3 @@ void CYSFTX::setParams(bool on, uint8_t txHang)
|
||||
m_loDev = on;
|
||||
m_txHang = txHang * 1200U;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user