2018-02-22 16:52:49 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2018 F4HKW //
|
|
|
|
// for F4EXB / SDRAngel //
|
|
|
|
// using LeanSDR Framework (C) 2016 F4DAV //
|
|
|
|
// //
|
|
|
|
// 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 //
|
2019-04-11 00:39:30 -04:00
|
|
|
// (at your option) any later version. //
|
2018-02-22 16:52:49 -05:00
|
|
|
// //
|
|
|
|
// 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_DATVDEMODGUI_H
|
|
|
|
#define INCLUDE_DATVDEMODGUI_H
|
|
|
|
|
2020-10-04 00:16:15 -04:00
|
|
|
#include "channel/channelgui.h"
|
2018-02-22 16:52:49 -05:00
|
|
|
#include "dsp/channelmarker.h"
|
|
|
|
#include "dsp/movingaverage.h"
|
2022-01-08 23:27:12 -05:00
|
|
|
#include "settings/rollupstate.h"
|
2018-02-22 16:52:49 -05:00
|
|
|
|
|
|
|
#include "datvdemod.h"
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
|
|
|
|
class PluginAPI;
|
|
|
|
class DeviceUISet;
|
|
|
|
class BasebandSampleSink;
|
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class DATVDemodGUI;
|
|
|
|
}
|
|
|
|
|
2020-10-04 00:16:15 -04:00
|
|
|
class DATVDemodGUI : public ChannelGUI
|
2018-02-22 16:52:49 -05:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
static DATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
|
|
|
virtual void destroy();
|
|
|
|
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& arrData);
|
2022-04-12 10:20:45 -04:00
|
|
|
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
|
|
|
|
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
|
|
|
|
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
|
|
|
|
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
|
|
|
|
virtual QString getTitle() const { return m_settings.m_title; };
|
|
|
|
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
|
2022-04-12 12:27:27 -04:00
|
|
|
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
|
|
|
|
virtual bool getHidden() const { return m_settings.m_hidden; }
|
2022-04-16 10:45:53 -04:00
|
|
|
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
|
2018-02-22 16:52:49 -05:00
|
|
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
2022-04-17 19:42:03 -04:00
|
|
|
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
|
|
|
|
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
|
2018-02-22 16:52:49 -05:00
|
|
|
|
2020-11-21 14:24:18 -05:00
|
|
|
static const char* const m_strChannelID;
|
2018-02-22 16:52:49 -05:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void channelMarkerChangedByCursor();
|
|
|
|
void channelMarkerHighlightedByCursor();
|
|
|
|
|
|
|
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
2020-09-21 14:10:17 -04:00
|
|
|
void onMenuDialogCalled(const QPoint& p);
|
2019-07-16 20:51:46 -04:00
|
|
|
void handleInputMessages();
|
2019-03-19 18:12:54 -04:00
|
|
|
void audioSelect();
|
2021-03-06 18:29:01 -05:00
|
|
|
void ldpcToolSelect();
|
2018-02-22 16:52:49 -05:00
|
|
|
void tick();
|
2021-10-28 16:50:40 -04:00
|
|
|
void tickMeter();
|
2018-02-22 16:52:49 -05:00
|
|
|
|
2019-07-16 20:51:46 -04:00
|
|
|
void on_cmbStandard_currentIndexChanged(int index);
|
2022-04-12 10:20:45 -04:00
|
|
|
void on_cmbModulation_currentIndexChanged(int arg1);
|
|
|
|
void on_cmbFEC_currentIndexChanged(int arg1);
|
2021-02-27 06:51:32 -05:00
|
|
|
void on_softLDPC_clicked();
|
|
|
|
void on_maxBitflips_valueChanged(int value);
|
2018-02-22 16:52:49 -05:00
|
|
|
void on_chkViterbi_clicked();
|
|
|
|
void on_chkHardMetric_clicked();
|
2019-03-23 05:51:01 -04:00
|
|
|
void on_resetDefaults_clicked();
|
2018-02-22 16:52:49 -05:00
|
|
|
void on_spiSymbolRate_valueChanged(int arg1);
|
2022-10-16 16:59:52 -04:00
|
|
|
void on_datvStdSR_valueChanged(int value);
|
2018-02-22 16:52:49 -05:00
|
|
|
void on_spiNotchFilters_valueChanged(int arg1);
|
|
|
|
void on_chkAllowDrift_clicked();
|
2019-03-23 05:51:01 -04:00
|
|
|
void on_fullScreen_clicked();
|
2018-02-22 16:52:49 -05:00
|
|
|
void on_mouseEvent(QMouseEvent* obj);
|
2021-04-11 18:31:47 -04:00
|
|
|
void on_StreamDataAvailable(int intBytes, int intPercent, qint64 intTotalReceived);
|
2018-02-25 19:04:45 -05:00
|
|
|
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData);
|
2018-02-22 16:52:49 -05:00
|
|
|
void on_chkFastlock_clicked();
|
2018-02-25 19:04:45 -05:00
|
|
|
void on_cmbFilter_currentIndexChanged(int index);
|
|
|
|
void on_spiRollOff_valueChanged(int arg1);
|
|
|
|
void on_spiExcursion_valueChanged(int arg1);
|
2018-03-10 13:30:55 -05:00
|
|
|
void on_deltaFrequency_changed(qint64 value);
|
|
|
|
void on_rfBandwidth_changed(qint64 value);
|
2019-03-22 03:05:01 -04:00
|
|
|
void on_audioMute_toggled(bool checked);
|
|
|
|
void on_audioVolume_valueChanged(int value);
|
2019-03-23 01:06:42 -04:00
|
|
|
void on_videoMute_toggled(bool checked);
|
2019-07-28 04:54:04 -04:00
|
|
|
void on_udpTS_clicked(bool checked);
|
|
|
|
void on_udpTSAddress_editingFinished();
|
|
|
|
void on_udpTSPort_editingFinished();
|
2021-04-11 17:52:16 -04:00
|
|
|
void on_playerEnable_clicked();
|
2018-02-25 19:04:45 -05:00
|
|
|
|
2018-02-22 16:52:49 -05:00
|
|
|
private:
|
|
|
|
Ui::DATVDemodGUI* ui;
|
|
|
|
PluginAPI* m_objPluginAPI;
|
|
|
|
DeviceUISet* m_deviceUISet;
|
|
|
|
|
2022-04-16 10:45:53 -04:00
|
|
|
ChannelMarker m_channelMarker;
|
2022-01-08 23:27:12 -05:00
|
|
|
RollupState m_rollupState;
|
2021-10-30 06:35:02 -04:00
|
|
|
DATVDemod* m_datvDemod;
|
2018-02-22 16:52:49 -05:00
|
|
|
MessageQueue m_inputMessageQueue;
|
2019-03-17 21:26:03 -04:00
|
|
|
DATVDemodSettings m_settings;
|
2022-04-13 05:08:21 -04:00
|
|
|
qint64 m_deviceCenterFrequency;
|
|
|
|
int m_basebandSampleRate;
|
2018-02-22 16:52:49 -05:00
|
|
|
|
|
|
|
QTimer m_objTimer;
|
|
|
|
qint64 m_intPreviousDecodedData;
|
|
|
|
qint64 m_intLastDecodedData;
|
|
|
|
qint64 m_intLastSpeed;
|
|
|
|
int m_intReadyDecodedData;
|
|
|
|
|
|
|
|
bool m_blnBasicSettingsShown;
|
|
|
|
bool m_blnDoApplySettings;
|
|
|
|
bool m_blnButtonPlayClicked;
|
2019-07-16 20:51:46 -04:00
|
|
|
int m_modcodModulationIndex;
|
|
|
|
int m_modcodCodeRateIndex;
|
|
|
|
bool m_cstlnSetByModcod;
|
2018-02-22 16:52:49 -05:00
|
|
|
|
2018-03-10 17:01:03 -05:00
|
|
|
MovingAverageUtil<double, double, 4> m_objMagSqAverage;
|
2022-10-16 16:59:52 -04:00
|
|
|
static const QList<int> m_symbolRates;
|
2018-03-10 17:01:03 -05:00
|
|
|
|
2018-02-22 16:52:49 -05:00
|
|
|
explicit DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent = 0);
|
|
|
|
virtual ~DATVDemodGUI();
|
|
|
|
|
|
|
|
void blockApplySettings(bool blnBlock);
|
2019-03-17 21:26:03 -04:00
|
|
|
void applySettings(bool force = false);
|
|
|
|
void displaySettings();
|
2019-07-16 20:51:46 -04:00
|
|
|
void displaySystemConfiguration();
|
2018-02-22 16:52:49 -05:00
|
|
|
QString formatBytes(qint64 intBytes);
|
|
|
|
|
2018-02-25 19:04:45 -05:00
|
|
|
void displayRRCParameters(bool blnVisible);
|
|
|
|
|
2018-02-22 16:52:49 -05:00
|
|
|
void leaveEvent(QEvent*);
|
|
|
|
void enterEvent(QEvent*);
|
2020-10-03 13:51:14 -04:00
|
|
|
bool handleMessage(const Message& objMessage);
|
2022-04-12 10:20:45 -04:00
|
|
|
void makeUIConnections();
|
2022-04-13 05:08:21 -04:00
|
|
|
void updateAbsoluteCenterFrequency();
|
2022-10-16 16:59:52 -04:00
|
|
|
int indexFromSymbolRate(int sampleRate);
|
|
|
|
int symbolRateFromIndex(int index);
|
2018-02-22 16:52:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_DATVDEMODGUI_H
|