mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-12 06:44:12 +02:00
Start on the actual AX.25 demodulator.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 "AX25Demodulator.h"
|
||||
|
||||
CAX25Demodulator::CAX25Demodulator(uint16_t n) :
|
||||
m_n(n)
|
||||
{
|
||||
}
|
||||
|
||||
void CAX25Demodulator::process(q15_t sample)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(AX25Demodulator_H)
|
||||
#define AX25Demodulator_H
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
class CAX25Demodulator {
|
||||
public:
|
||||
CAX25Demodulator(uint16_t n);
|
||||
|
||||
void process(q15_t sample);
|
||||
|
||||
private:
|
||||
uint16_t m_n;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+8
-1
@@ -20,7 +20,10 @@
|
||||
#include "Globals.h"
|
||||
#include "AX25RX.h"
|
||||
|
||||
CAX25RX::CAX25RX()
|
||||
CAX25RX::CAX25RX() :
|
||||
m_demod1(1U),
|
||||
m_demod2(2U),
|
||||
m_demod3(3U)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,6 +31,10 @@ void CAX25RX::samples(const q15_t* samples, uint8_t length)
|
||||
{
|
||||
for (uint8_t i = 0U; i < length; i++) {
|
||||
q15_t sample = samples[i];
|
||||
|
||||
m_demod1.process(sample);
|
||||
m_demod2.process(sample);
|
||||
m_demod3.process(sample);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "AX25Demodulator.h"
|
||||
|
||||
class CAX25RX {
|
||||
public:
|
||||
CAX25RX();
|
||||
@@ -28,6 +30,9 @@ public:
|
||||
void samples(const q15_t* samples, uint8_t length);
|
||||
|
||||
private:
|
||||
CAX25Demodulator m_demod1;
|
||||
CAX25Demodulator m_demod2;
|
||||
CAX25Demodulator m_demod3;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user