1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-02 13:17:48 -04:00

M17 Modulator: start M17 processor

This commit is contained in:
f4exb 2022-06-10 17:54:18 +02:00
parent 7e8e1c12fa
commit 6a22606beb
2 changed files with 70 additions and 3 deletions

View File

@ -369,7 +369,7 @@
<item>
<widget class="ButtonSwitch" name="tone">
<property name="toolTip">
<string>Tone modulation (1 kHz)</string>
<string>FM tone modulation</string>
</property>
<property name="text">
<string>...</string>
@ -389,7 +389,7 @@
</size>
</property>
<property name="toolTip">
<string>Tone frequency</string>
<string>FM tone frequency</string>
</property>
<property name="minimum">
<number>10</number>
@ -414,7 +414,7 @@
</size>
</property>
<property name="toolTip">
<string>Tone frequency (kHz)</string>
<string>FM tone frequency (kHz)</string>
</property>
<property name="text">
<string>1.00k</string>

View File

@ -0,0 +1,67 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2022 Edouard Griffiths, F4EXB //
// //
// 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 as version 3 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 V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_M17MODPROCESSOR_H
#define INCLUDE_M17MODPROCESSOR_H
#include <QObject>
#include <QByteArray>
#include "util/message.h"
#include "util/messagequeue.h"
#include "audio/audiofifo.h"
class M17ModProcessor : public QObject
{
Q_OBJECT
public:
class MsgSendPacket : public Message {
MESSAGE_CLASS_DECLARATION
public:
const QByteArray& getPacket() const { return m_packet; }
static MsgSendPacket* create(const QByteArray& packet) {
return new MsgSendPacket(packet);
}
private:
QByteArray m_packet;
MsgSendPacket(const QByteArray& bytes) :
Message(),
m_packet(bytes)
{ }
};
M17ModProcessor();
~M17ModProcessor();
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
AudioFifo *getSymbolFifo() { return &m_basebandFifo; }
private:
MessageQueue m_inputMessageQueue;
AudioFifo m_basebandFifo; //!< Samples are 16 bit integer baseband 48 kS/s samples
bool handleMessage(const Message& cmd);
private slots:
void handleInputMessages();
};
#endif // INCLUDE_M17MODPROCESSOR_H