mirror of https://github.com/g4klx/MMDVM.git
Add a dummy AX25 transmit function and make AX25 RX changes.
This commit is contained in:
parent
e210062365
commit
7ad70d04a4
33
AX25RX.cpp
33
AX25RX.cpp
|
@ -63,7 +63,8 @@ m_state(),
|
||||||
m_demod1(3),
|
m_demod1(3),
|
||||||
m_demod2(6),
|
m_demod2(6),
|
||||||
m_demod3(9),
|
m_demod3(9),
|
||||||
m_lastFCS(0U)
|
m_lastFCS(0U),
|
||||||
|
m_count(0U)
|
||||||
{
|
{
|
||||||
m_filter.numTaps = FILTER_LEN;
|
m_filter.numTaps = FILTER_LEN;
|
||||||
m_filter.pState = m_state;
|
m_filter.pState = m_state;
|
||||||
|
@ -75,28 +76,38 @@ void CAX25RX::samples(q15_t* samples, uint8_t length)
|
||||||
q15_t output[RX_BLOCK_SIZE];
|
q15_t output[RX_BLOCK_SIZE];
|
||||||
::arm_fir_fast_q15(&m_filter, samples, output, RX_BLOCK_SIZE);
|
::arm_fir_fast_q15(&m_filter, samples, output, RX_BLOCK_SIZE);
|
||||||
|
|
||||||
m_lastFCS = 0U;
|
m_count++;
|
||||||
|
|
||||||
CAX25Frame frame;
|
CAX25Frame frame;
|
||||||
|
|
||||||
bool ret = m_demod1.process(output, length, frame);
|
bool ret = m_demod1.process(output, length, frame);
|
||||||
if (ret && frame.m_fcs != m_lastFCS) {
|
if (ret) {
|
||||||
|
if (frame.m_fcs != m_lastFCS || m_count > 2U) {
|
||||||
|
m_lastFCS = frame.m_fcs;
|
||||||
|
m_count = 0U;
|
||||||
|
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
||||||
|
}
|
||||||
DEBUG1("Decoder 1 reported");
|
DEBUG1("Decoder 1 reported");
|
||||||
m_lastFCS = frame.m_fcs;
|
|
||||||
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = m_demod2.process(output, length, frame);
|
ret = m_demod2.process(output, length, frame);
|
||||||
if (ret && frame.m_fcs != m_lastFCS) {
|
if (ret) {
|
||||||
|
if (frame.m_fcs != m_lastFCS || m_count > 2U) {
|
||||||
|
m_lastFCS = frame.m_fcs;
|
||||||
|
m_count = 0U;
|
||||||
|
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
||||||
|
}
|
||||||
DEBUG1("Decoder 2 reported");
|
DEBUG1("Decoder 2 reported");
|
||||||
m_lastFCS = frame.m_fcs;
|
|
||||||
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = m_demod3.process(output, length, frame);
|
ret = m_demod3.process(output, length, frame);
|
||||||
if (ret && frame.m_fcs != m_lastFCS) {
|
if (ret) {
|
||||||
|
if (frame.m_fcs != m_lastFCS || m_count > 2U) {
|
||||||
|
m_lastFCS = frame.m_fcs;
|
||||||
|
m_count = 0U;
|
||||||
|
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
||||||
|
}
|
||||||
DEBUG1("Decoder 3 reported");
|
DEBUG1("Decoder 3 reported");
|
||||||
m_lastFCS = frame.m_fcs;
|
|
||||||
serial.writeAX25Data(frame.m_data, frame.m_length - 2U);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
AX25RX.h
1
AX25RX.h
|
@ -38,6 +38,7 @@ private:
|
||||||
CAX25Demodulator m_demod2;
|
CAX25Demodulator m_demod2;
|
||||||
CAX25Demodulator m_demod3;
|
CAX25Demodulator m_demod3;
|
||||||
uint16_t m_lastFCS;
|
uint16_t m_lastFCS;
|
||||||
|
uint32_t m_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
|
#include "Globals.h"
|
||||||
|
#include "AX25TX.h"
|
||||||
|
|
||||||
|
|
||||||
|
CAX25TX::CAX25TX()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAX25TX::process()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t CAX25TX::writeData(const uint8_t* data, uint16_t length)
|
||||||
|
{
|
||||||
|
return 0U;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAX25TX::setParams(int8_t twist)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAX25TX::setTXDelay(uint8_t delay)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t CAX25TX::getSpace() const
|
||||||
|
{
|
||||||
|
return 0U;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue