2017-10-07 22:18:33 +02:00
|
|
|
|
2020-02-08 18:21:38 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Copyright (C) 2019-2020 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/>. //
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2017-10-07 22:18:33 +02:00
|
|
|
#ifndef PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_
|
|
|
|
|
#define PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_
|
|
|
|
|
|
|
|
|
|
#include <QByteArray>
|
2017-11-19 18:18:17 +01:00
|
|
|
#include <QString>
|
|
|
|
|
|
2017-10-07 22:18:33 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
class Serializable;
|
|
|
|
|
|
|
|
|
|
struct LoRaDemodSettings
|
|
|
|
|
{
|
2020-02-12 17:56:41 +01:00
|
|
|
enum CodingScheme
|
|
|
|
|
{
|
|
|
|
|
CodingTTY, //!< plain TTY (5 bits)
|
|
|
|
|
CodingASCII, //!< plain ASCII (7 bits)
|
|
|
|
|
CodingLoRa //!< Standard LoRa
|
|
|
|
|
};
|
|
|
|
|
|
2020-02-08 18:21:38 +01:00
|
|
|
int m_inputFrequencyOffset;
|
2017-10-08 00:28:42 +02:00
|
|
|
int m_bandwidthIndex;
|
2020-01-30 18:26:43 +01:00
|
|
|
int m_spreadFactor;
|
2020-02-08 18:21:38 +01:00
|
|
|
int m_deBits; //!< Low data rate optmize (DE) bits
|
2020-02-12 17:56:41 +01:00
|
|
|
CodingScheme m_codingScheme;
|
2017-10-07 22:18:33 +02:00
|
|
|
uint32_t m_rgbColor;
|
2017-11-19 18:18:17 +01:00
|
|
|
QString m_title;
|
2017-10-07 22:18:33 +02:00
|
|
|
|
|
|
|
|
Serializable *m_channelMarker;
|
|
|
|
|
Serializable *m_spectrumGUI;
|
|
|
|
|
|
2017-10-08 00:28:42 +02:00
|
|
|
static const int bandwidths[];
|
2020-02-08 18:21:38 +01:00
|
|
|
static const int nbBandwidths;
|
2020-02-12 13:17:15 +01:00
|
|
|
static const int oversampling;
|
2017-10-08 00:28:42 +02:00
|
|
|
|
2017-10-07 22:18:33 +02:00
|
|
|
LoRaDemodSettings();
|
|
|
|
|
void resetToDefaults();
|
|
|
|
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
|
|
|
|
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
|
|
|
|
|
QByteArray serialize() const;
|
|
|
|
|
bool deserialize(const QByteArray& data);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_ */
|