28 changed files with 545 additions and 544 deletions
@ -1,49 +1,49 @@
@@ -1,49 +1,49 @@
|
||||
#ifndef _FCDPRO_HID_CMD_H_ |
||||
#define _FCDPRO_HID_CMD_H_ |
||||
|
||||
#define FCDPRO_HID_CMD_GET_IF_RSSI 104 // Returns 1 byte unsigned IF RSSI, -35dBm ~=0, -10dBm ~=70.
|
||||
#define FCDPRO_HID_CMD_GET_PLL_LOCK 105 // Returns 1 bit, true if locked
|
||||
|
||||
#define FCDPRO_HID_CMD_SET_DC_CORR 106 // Send with 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||
#define FCDPRO_HID_CMD_GET_DC_CORR 107 // Returns 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||
#define FCDPRO_HID_CMD_SET_IQ_CORR 108 // Send with 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||
#define FCDPRO_HID_CMD_GET_IQ_CORR 109 // Returns 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||
|
||||
#define FCDPRO_HID_CMD_SET_LNA_GAIN 110 // Send a 1 byte value, see enums for reference
|
||||
#define FCDPRO_HID_CMD_SET_LNA_ENHANCE 111 |
||||
#define FCDPRO_HID_CMD_SET_BAND 112 |
||||
#define FCDPRO_HID_CMD_SET_RF_FILTER 113 |
||||
#define FCDPRO_HID_CMD_SET_MIXER_GAIN 114 |
||||
#define FCDPRO_HID_CMD_SET_BIAS_CURRENT 115 |
||||
#define FCDPRO_HID_CMD_SET_MIXER_FILTER 116 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN1 117 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN_MODE 118 |
||||
#define FCDPRO_HID_CMD_SET_IF_RC_FILTER 119 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN2 120 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN3 121 |
||||
#define FCDPRO_HID_CMD_SET_IF_FILTER 122 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN4 123 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN5 124 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN6 125 |
||||
|
||||
#define FCDPRO_HID_CMD_GET_LNA_GAIN 150 // Retrieve a 1 byte value, see enums for reference
|
||||
#define FCDPRO_HID_CMD_GET_LNA_ENHANCE 151 |
||||
#define FCDPRO_HID_CMD_GET_BAND 152 |
||||
#define FCDPRO_HID_CMD_GET_RF_FILTER 153 |
||||
#define FCDPRO_HID_CMD_GET_MIXER_GAIN 154 |
||||
#define FCDPRO_HID_CMD_GET_BIAS_CURRENT 155 |
||||
#define FCDPRO_HID_CMD_GET_MIXER_FILTER 156 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN1 157 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN_MODE 158 |
||||
#define FCDPRO_HID_CMD_GET_IF_RC_FILTER 159 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN2 160 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN3 161 |
||||
#define FCDPRO_HID_CMD_GET_IF_FILTER 162 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN4 163 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN5 164 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN6 165 |
||||
|
||||
#define FCDPRO_HID_CMD_I2C_SEND_BYTE 200 |
||||
#define FCDPRO_HID_CMD_I2C_RECEIVE_BYTE 201 |
||||
|
||||
#endif // _FCDPRO_HID_CMD_H_
|
||||
#ifndef _FCDPRO_HID_CMD_H_ |
||||
#define _FCDPRO_HID_CMD_H_ |
||||
|
||||
#define FCDPRO_HID_CMD_GET_IF_RSSI 104 // Returns 1 byte unsigned IF RSSI, -35dBm ~=0, -10dBm ~=70.
|
||||
#define FCDPRO_HID_CMD_GET_PLL_LOCK 105 // Returns 1 bit, true if locked
|
||||
|
||||
#define FCDPRO_HID_CMD_SET_DC_CORR 106 // Send with 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||
#define FCDPRO_HID_CMD_GET_DC_CORR 107 // Returns 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||
#define FCDPRO_HID_CMD_SET_IQ_CORR 108 // Send with 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||
#define FCDPRO_HID_CMD_GET_IQ_CORR 109 // Returns 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||
|
||||
#define FCDPRO_HID_CMD_SET_LNA_GAIN 110 // Send a 1 byte value, see enums for reference
|
||||
#define FCDPRO_HID_CMD_SET_LNA_ENHANCE 111 |
||||
#define FCDPRO_HID_CMD_SET_BAND 112 |
||||
#define FCDPRO_HID_CMD_SET_RF_FILTER 113 |
||||
#define FCDPRO_HID_CMD_SET_MIXER_GAIN 114 |
||||
#define FCDPRO_HID_CMD_SET_BIAS_CURRENT 115 |
||||
#define FCDPRO_HID_CMD_SET_MIXER_FILTER 116 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN1 117 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN_MODE 118 |
||||
#define FCDPRO_HID_CMD_SET_IF_RC_FILTER 119 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN2 120 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN3 121 |
||||
#define FCDPRO_HID_CMD_SET_IF_FILTER 122 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN4 123 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN5 124 |
||||
#define FCDPRO_HID_CMD_SET_IF_GAIN6 125 |
||||
|
||||
#define FCDPRO_HID_CMD_GET_LNA_GAIN 150 // Retrieve a 1 byte value, see enums for reference
|
||||
#define FCDPRO_HID_CMD_GET_LNA_ENHANCE 151 |
||||
#define FCDPRO_HID_CMD_GET_BAND 152 |
||||
#define FCDPRO_HID_CMD_GET_RF_FILTER 153 |
||||
#define FCDPRO_HID_CMD_GET_MIXER_GAIN 154 |
||||
#define FCDPRO_HID_CMD_GET_BIAS_CURRENT 155 |
||||
#define FCDPRO_HID_CMD_GET_MIXER_FILTER 156 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN1 157 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN_MODE 158 |
||||
#define FCDPRO_HID_CMD_GET_IF_RC_FILTER 159 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN2 160 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN3 161 |
||||
#define FCDPRO_HID_CMD_GET_IF_FILTER 162 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN4 163 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN5 164 |
||||
#define FCDPRO_HID_CMD_GET_IF_GAIN6 165 |
||||
|
||||
#define FCDPRO_HID_CMD_I2C_SEND_BYTE 200 |
||||
#define FCDPRO_HID_CMD_I2C_RECEIVE_BYTE 201 |
||||
|
||||
#endif // _FCDPRO_HID_CMD_H_
|
||||
|
||||
@ -1,20 +1,20 @@
@@ -1,20 +1,20 @@
|
||||
#ifndef _FCD_PRO_PLUS_HID_CMD_H_ |
||||
#define _FCD_PRO_PLUS_HID_CMD_H_ |
||||
|
||||
#define FCDPROPLUS_HID_CMD_SET_LNA_GAIN 110 // Send one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_SET_RF_FILTER 113 // Send one byte enum, see TUNERRFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_SET_MIXER_GAIN 114 // Send one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_SET_IF_GAIN 117 // Send one byte value, valid value 0 to 59 (dB)
|
||||
#define FCDPROPLUS_HID_CMD_SET_IF_FILTER 122 // Send one byte enum, see TUNERIFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_SET_BIAS_TEE 126 // Send one byte, 1 on, 0 off
|
||||
|
||||
#define FCDPROPLUS_HID_CMD_GET_LNA_GAIN 150 // Returns one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_GET_RF_FILTER 153 // Returns one byte enum, see TUNERRFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_GET_MIXER_GAIN 154 // Returns one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_GET_IF_GAIN 157 // Returns one byte value, valid value 0 to 59 (dB)
|
||||
#define FCDPROPLUS_HID_CMD_GET_IF_FILTER 162 // Returns one byte enum, see TUNERIFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_GET_BIAS_TEE 166 // Returns one byte, 1 on, 0 off
|
||||
|
||||
#define FCD_RESET 255 // Reset to bootloader
|
||||
|
||||
#endif // _FCD_PRO_PLUS_HID_CMD_H_
|
||||
#ifndef _FCD_PRO_PLUS_HID_CMD_H_ |
||||
#define _FCD_PRO_PLUS_HID_CMD_H_ |
||||
|
||||
#define FCDPROPLUS_HID_CMD_SET_LNA_GAIN 110 // Send one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_SET_RF_FILTER 113 // Send one byte enum, see TUNERRFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_SET_MIXER_GAIN 114 // Send one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_SET_IF_GAIN 117 // Send one byte value, valid value 0 to 59 (dB)
|
||||
#define FCDPROPLUS_HID_CMD_SET_IF_FILTER 122 // Send one byte enum, see TUNERIFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_SET_BIAS_TEE 126 // Send one byte, 1 on, 0 off
|
||||
|
||||
#define FCDPROPLUS_HID_CMD_GET_LNA_GAIN 150 // Returns one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_GET_RF_FILTER 153 // Returns one byte enum, see TUNERRFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_GET_MIXER_GAIN 154 // Returns one byte, 1 on, 0 off
|
||||
#define FCDPROPLUS_HID_CMD_GET_IF_GAIN 157 // Returns one byte value, valid value 0 to 59 (dB)
|
||||
#define FCDPROPLUS_HID_CMD_GET_IF_FILTER 162 // Returns one byte enum, see TUNERIFFILTERENUM
|
||||
#define FCDPROPLUS_HID_CMD_GET_BIAS_TEE 166 // Returns one byte, 1 on, 0 off
|
||||
|
||||
#define FCD_RESET 255 // Reset to bootloader
|
||||
|
||||
#endif // _FCD_PRO_PLUS_HID_CMD_H_
|
||||
|
||||
@ -1,49 +1,49 @@
@@ -1,49 +1,49 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||
// written by Christian Daniel //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_AUDIODEVICEINFO_H |
||||
#define INCLUDE_AUDIODEVICEINFO_H |
||||
|
||||
#include <QStringList> |
||||
#include "util/export.h" |
||||
|
||||
class SDRANGEL_API AudioDeviceInfo { |
||||
public: |
||||
struct Device { |
||||
QString name; |
||||
QString api; |
||||
int id; |
||||
|
||||
Device(const QString& _name, const QString& _api, int _id) : |
||||
name(_name), |
||||
api(_api), |
||||
id(_id) |
||||
{ } |
||||
}; |
||||
typedef QList<Device> Devices; |
||||
|
||||
AudioDeviceInfo(); |
||||
|
||||
int match(const QString& api, const QString device) const; |
||||
|
||||
const Devices& getDevices() const { return m_devices; } |
||||
|
||||
private: |
||||
Devices m_devices; |
||||
}; |
||||
|
||||
#endif // INCLUDE_AUDIODEVICEINFO_H
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||
// written by Christian Daniel //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_AUDIODEVICEINFO_H |
||||
#define INCLUDE_AUDIODEVICEINFO_H |
||||
|
||||
#include <QStringList> |
||||
#include "util/export.h" |
||||
|
||||
class SDRANGEL_API AudioDeviceInfo { |
||||
public: |
||||
struct Device { |
||||
QString name; |
||||
QString api; |
||||
int id; |
||||
|
||||
Device(const QString& _name, const QString& _api, int _id) : |
||||
name(_name), |
||||
api(_api), |
||||
id(_id) |
||||
{ } |
||||
}; |
||||
typedef QList<Device> Devices; |
||||
|
||||
AudioDeviceInfo(); |
||||
|
||||
int match(const QString& api, const QString device) const; |
||||
|
||||
const Devices& getDevices() const { return m_devices; } |
||||
|
||||
private: |
||||
Devices m_devices; |
||||
}; |
||||
|
||||
#endif // INCLUDE_AUDIODEVICEINFO_H
|
||||
|
||||
@ -1,97 +1,97 @@
@@ -1,97 +1,97 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_DSPENGINE_H |
||||
#define INCLUDE_DSPENGINE_H |
||||
|
||||
#include <QObject> |
||||
#include <vector> |
||||
#include "dsp/dspdeviceengine.h" |
||||
#include "audio/audiooutput.h" |
||||
#include "util/export.h" |
||||
#ifdef DSD_USE_SERIALDV |
||||
#include "dsp/dvserialengine.h" |
||||
#endif |
||||
|
||||
class DSPDeviceEngine; |
||||
class ThreadedBasebandSampleSink; |
||||
|
||||
class SDRANGEL_API DSPEngine : public QObject { |
||||
Q_OBJECT |
||||
public: |
||||
DSPEngine(); |
||||
~DSPEngine(); |
||||
|
||||
static DSPEngine *instance(); |
||||
|
||||
uint getAudioSampleRate() const { return m_audioSampleRate; } |
||||
|
||||
DSPDeviceEngine *addDeviceEngine(); |
||||
void removeLastDeviceEngine(); |
||||
void stopAllAcquisitions(); |
||||
void stopAllDeviceEngines(); |
||||
|
||||
void startAudio(); |
||||
void stopAudio(); |
||||
void startAudioImmediate(); |
||||
void stopAudioImmediate(); |
||||
|
||||
DSPDeviceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; } |
||||
DSPDeviceEngine *getDeviceEngineByUID(uint uid); |
||||
|
||||
void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink
|
||||
void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink
|
||||
|
||||
// Serial DV methods:
|
||||
|
||||
bool hasDVSerialSupport() |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
return m_dvSerialSupport; |
||||
#else |
||||
return false; |
||||
#endif |
||||
} |
||||
|
||||
void setDVSerialSupport(bool support); |
||||
|
||||
void getDVSerialNames(std::vector<std::string>& deviceNames) |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
m_dvSerialEngine.getDevicesNames(deviceNames); |
||||
#endif |
||||
} |
||||
|
||||
void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo) |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo); |
||||
#endif |
||||
} |
||||
|
||||
private: |
||||
std::vector<DSPDeviceEngine*> m_deviceEngines; |
||||
uint m_deviceEnginesUIDSequence; |
||||
AudioOutput m_audioOutput; |
||||
uint m_audioSampleRate; |
||||
bool m_dvSerialSupport; |
||||
#ifdef DSD_USE_SERIALDV |
||||
DVSerialEngine m_dvSerialEngine; |
||||
#endif |
||||
}; |
||||
|
||||
#endif // INCLUDE_DSPENGINE_H
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_DSPENGINE_H |
||||
#define INCLUDE_DSPENGINE_H |
||||
|
||||
#include <QObject> |
||||
#include <vector> |
||||
#include "audio/audiooutput.h" |
||||
#include "dspdevicesourceengine.h" |
||||
#include "util/export.h" |
||||
#ifdef DSD_USE_SERIALDV |
||||
#include "dsp/dvserialengine.h" |
||||
#endif |
||||
|
||||
class DSPDeviceSourceEngine; |
||||
class ThreadedBasebandSampleSink; |
||||
|
||||
class SDRANGEL_API DSPEngine : public QObject { |
||||
Q_OBJECT |
||||
public: |
||||
DSPEngine(); |
||||
~DSPEngine(); |
||||
|
||||
static DSPEngine *instance(); |
||||
|
||||
uint getAudioSampleRate() const { return m_audioSampleRate; } |
||||
|
||||
DSPDeviceSourceEngine *addDeviceEngine(); |
||||
void removeLastDeviceEngine(); |
||||
void stopAllAcquisitions(); |
||||
void stopAllDeviceEngines(); |
||||
|
||||
void startAudio(); |
||||
void stopAudio(); |
||||
void startAudioImmediate(); |
||||
void stopAudioImmediate(); |
||||
|
||||
DSPDeviceSourceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; } |
||||
DSPDeviceSourceEngine *getDeviceEngineByUID(uint uid); |
||||
|
||||
void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink
|
||||
void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink
|
||||
|
||||
// Serial DV methods:
|
||||
|
||||
bool hasDVSerialSupport() |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
return m_dvSerialSupport; |
||||
#else |
||||
return false; |
||||
#endif |
||||
} |
||||
|
||||
void setDVSerialSupport(bool support); |
||||
|
||||
void getDVSerialNames(std::vector<std::string>& deviceNames) |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
m_dvSerialEngine.getDevicesNames(deviceNames); |
||||
#endif |
||||
} |
||||
|
||||
void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo) |
||||
{ |
||||
#ifdef DSD_USE_SERIALDV |
||||
m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo); |
||||
#endif |
||||
} |
||||
|
||||
private: |
||||
std::vector<DSPDeviceSourceEngine*> m_deviceEngines; |
||||
uint m_deviceEnginesUIDSequence; |
||||
AudioOutput m_audioOutput; |
||||
uint m_audioSampleRate; |
||||
bool m_dvSerialSupport; |
||||
#ifdef DSD_USE_SERIALDV |
||||
DVSerialEngine m_dvSerialEngine; |
||||
#endif |
||||
}; |
||||
|
||||
#endif // INCLUDE_DSPENGINE_H
|
||||
|
||||
@ -1,45 +1,45 @@
@@ -1,45 +1,45 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// OpenGL interface modernization. //
|
||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "gui/mypositiondialog.h" |
||||
#include "ui_myposdialog.h" |
||||
|
||||
|
||||
MyPositionDialog::MyPositionDialog(MainSettings& mainSettings, QWidget* parent) : |
||||
m_mainSettings(mainSettings), |
||||
QDialog(parent), |
||||
ui(new Ui::MyPositionDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
ui->latitudeSpinBox->setValue(m_mainSettings.getLatitude()); |
||||
ui->longitudeSpinBox->setValue(m_mainSettings.getLongitude()); |
||||
} |
||||
|
||||
MyPositionDialog::~MyPositionDialog() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void MyPositionDialog::accept() |
||||
{ |
||||
m_mainSettings.setLatitude(ui->latitudeSpinBox->value()); |
||||
m_mainSettings.setLongitude(ui->longitudeSpinBox->value()); |
||||
QDialog::accept(); |
||||
} |
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// OpenGL interface modernization. //
|
||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "gui/mypositiondialog.h" |
||||
#include "ui_myposdialog.h" |
||||
|
||||
|
||||
MyPositionDialog::MyPositionDialog(MainSettings& mainSettings, QWidget* parent) : |
||||
m_mainSettings(mainSettings), |
||||
QDialog(parent), |
||||
ui(new Ui::MyPositionDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
ui->latitudeSpinBox->setValue(m_mainSettings.getLatitude()); |
||||
ui->longitudeSpinBox->setValue(m_mainSettings.getLongitude()); |
||||
} |
||||
|
||||
MyPositionDialog::~MyPositionDialog() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void MyPositionDialog::accept() |
||||
{ |
||||
m_mainSettings.setLatitude(ui->latitudeSpinBox->value()); |
||||
m_mainSettings.setLongitude(ui->longitudeSpinBox->value()); |
||||
QDialog::accept(); |
||||
} |
||||
|
||||
@ -1,46 +1,46 @@
@@ -1,46 +1,46 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// OpenGL interface modernization. //
|
||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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 SDRBASE_GUI_MYPOSITIONDIALOG_H_ |
||||
#define SDRBASE_GUI_MYPOSITIONDIALOG_H_ |
||||
|
||||
#include <QDialog> |
||||
#include "settings/mainsettings.h" |
||||
|
||||
namespace Ui { |
||||
class MyPositionDialog; |
||||
} |
||||
|
||||
class MyPositionDialog : public QDialog { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
explicit MyPositionDialog(MainSettings& mainSettings, QWidget* parent = 0); |
||||
~MyPositionDialog(); |
||||
|
||||
private: |
||||
Ui::MyPositionDialog* ui; |
||||
MainSettings& m_mainSettings; |
||||
|
||||
private slots: |
||||
void accept(); |
||||
}; |
||||
|
||||
#endif /* SDRBASE_GUI_MYPOSITIONDIALOG_H_ */ |
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// OpenGL interface modernization. //
|
||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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 SDRBASE_GUI_MYPOSITIONDIALOG_H_ |
||||
#define SDRBASE_GUI_MYPOSITIONDIALOG_H_ |
||||
|
||||
#include <QDialog> |
||||
#include "settings/mainsettings.h" |
||||
|
||||
namespace Ui { |
||||
class MyPositionDialog; |
||||
} |
||||
|
||||
class MyPositionDialog : public QDialog { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
explicit MyPositionDialog(MainSettings& mainSettings, QWidget* parent = 0); |
||||
~MyPositionDialog(); |
||||
|
||||
private: |
||||
Ui::MyPositionDialog* ui; |
||||
MainSettings& m_mainSettings; |
||||
|
||||
private slots: |
||||
void accept(); |
||||
}; |
||||
|
||||
#endif /* SDRBASE_GUI_MYPOSITIONDIALOG_H_ */ |
||||
|
||||
@ -1,90 +1,90 @@
@@ -1,90 +1,90 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||
// written by Christian Daniel //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_SCALEENGINE_H |
||||
#define INCLUDE_SCALEENGINE_H |
||||
|
||||
#include <QFont> |
||||
#include <QString> |
||||
#include <QList> |
||||
#include "physicalunit.h" |
||||
#include "util/export.h" |
||||
|
||||
class SDRANGEL_API ScaleEngine { |
||||
public: |
||||
struct Tick { |
||||
float pos; |
||||
bool major; |
||||
float textPos; |
||||
float textSize; |
||||
QString text; |
||||
}; |
||||
typedef QList<Tick> TickList; |
||||
|
||||
private: |
||||
// base configuration
|
||||
Qt::Orientation m_orientation; |
||||
QFont m_font; |
||||
float m_charSize; |
||||
|
||||
// graph configuration
|
||||
float m_size; |
||||
Unit::Physical m_physicalUnit; |
||||
float m_rangeMin; |
||||
float m_rangeMax; |
||||
|
||||
// calculated values
|
||||
bool m_recalc; |
||||
double m_scale; |
||||
QString m_unitStr; |
||||
TickList m_tickList; |
||||
double m_majorTickValueDistance; |
||||
double m_firstMajorTickValue; |
||||
int m_numMinorTicks; |
||||
int m_decimalPlaces; |
||||
|
||||
QString formatTick(double value, int decimalPlaces, bool fancyTime = true); |
||||
void calcCharSize(); |
||||
void calcScaleFactor(); |
||||
double calcMajorTickUnits(double distance, int* retDecimalPlaces); |
||||
int calcTickTextSize(); |
||||
void forceTwoTicks(); |
||||
void reCalc(); |
||||
|
||||
double majorTickValue(int tick); |
||||
double minorTickValue(int tick); |
||||
|
||||
public: |
||||
ScaleEngine(); |
||||
|
||||
void setOrientation(Qt::Orientation orientation); |
||||
void setFont(const QFont& font); |
||||
void setSize(float size); |
||||
float getSize() { return m_size; } |
||||
void setRange(Unit::Physical physicalUnit, float rangeMin, float rangeMax); |
||||
|
||||
float getPosFromValue(double value); |
||||
float getValueFromPos(double pos); |
||||
const TickList& getTickList(); |
||||
|
||||
QString getRangeMinStr(); |
||||
QString getRangeMaxStr(); |
||||
|
||||
float getScaleWidth(); |
||||
}; |
||||
|
||||
#endif // INCLUDE_SCALEENGINE_H
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||
// written by Christian Daniel //
|
||||
// //
|
||||
// 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 //
|
||||
// //
|
||||
// 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_SCALEENGINE_H |
||||
#define INCLUDE_SCALEENGINE_H |
||||
|
||||
#include <QFont> |
||||
#include <QString> |
||||
#include <QList> |
||||
#include "physicalunit.h" |
||||
#include "util/export.h" |
||||
|
||||
class SDRANGEL_API ScaleEngine { |
||||
public: |
||||
struct Tick { |
||||
float pos; |
||||
bool major; |
||||
float textPos; |
||||
float textSize; |
||||
QString text; |
||||
}; |
||||
typedef QList<Tick> TickList; |
||||
|
||||
private: |
||||
// base configuration
|
||||
Qt::Orientation m_orientation; |
||||
QFont m_font; |
||||
float m_charSize; |
||||
|
||||
// graph configuration
|
||||
float m_size; |
||||
Unit::Physical m_physicalUnit; |
||||
float m_rangeMin; |
||||
float m_rangeMax; |
||||
|
||||
// calculated values
|
||||
bool m_recalc; |
||||
double m_scale; |
||||
QString m_unitStr; |
||||
TickList m_tickList; |
||||
double m_majorTickValueDistance; |
||||
double m_firstMajorTickValue; |
||||
int m_numMinorTicks; |
||||
int m_decimalPlaces; |
||||
|
||||
QString formatTick(double value, int decimalPlaces, bool fancyTime = true); |
||||
void calcCharSize(); |
||||
void calcScaleFactor(); |
||||
double calcMajorTickUnits(double distance, int* retDecimalPlaces); |
||||
int calcTickTextSize(); |
||||
void forceTwoTicks(); |
||||
void reCalc(); |
||||
|
||||
double majorTickValue(int tick); |
||||
double minorTickValue(int tick); |
||||
|
||||
public: |
||||
ScaleEngine(); |
||||
|
||||
void setOrientation(Qt::Orientation orientation); |
||||
void setFont(const QFont& font); |
||||
void setSize(float size); |
||||
float getSize() { return m_size; } |
||||
void setRange(Unit::Physical physicalUnit, float rangeMin, float rangeMax); |
||||
|
||||
float getPosFromValue(double value); |
||||
float getValueFromPos(double pos); |
||||
const TickList& getTickList(); |
||||
|
||||
QString getRangeMinStr(); |
||||
QString getRangeMaxStr(); |
||||
|
||||
float getScaleWidth(); |
||||
}; |
||||
|
||||
#endif // INCLUDE_SCALEENGINE_H
|
||||
|
||||
@ -1,45 +1,45 @@
@@ -1,45 +1,45 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 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 //
|
||||
// //
|
||||
// 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 __SDRANGEL_EXPORT_H |
||||
#define __SDRANGEL_EXPORT_H |
||||
|
||||
#if defined __GNUC__ |
||||
# if __GNUC__ >= 4 |
||||
# define __SDR_EXPORT __attribute__((visibility("default"))) |
||||
# define __SDR_IMPORT __attribute__((visibility("default"))) |
||||
# else |
||||
# define __SDR_EXPORT |
||||
# define __SDR_IMPORT |
||||
# endif |
||||
#elif _MSC_VER |
||||
# define __SDR_EXPORT __declspec(dllexport) |
||||
# define __SDR_IMPORT __declspec(dllimport) |
||||
#else |
||||
# define __SDR_EXPORT |
||||
# define __SDR_IMPORT |
||||
#endif |
||||
|
||||
#ifndef sdrangel_STATIC |
||||
# ifdef sdrangel_EXPORTS |
||||
# define SDRANGEL_API __SDR_EXPORT |
||||
# else |
||||
# define SDRANGEL_API __SDR_IMPORT |
||||
# endif |
||||
#else |
||||
#define SDRANGEL_API |
||||
#endif |
||||
#endif /* __SDRANGEL_EXPORT_H */ |
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 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 //
|
||||
// //
|
||||
// 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 __SDRANGEL_EXPORT_H |
||||
#define __SDRANGEL_EXPORT_H |
||||
|
||||
#if defined __GNUC__ |
||||
# if __GNUC__ >= 4 |
||||
# define __SDR_EXPORT __attribute__((visibility("default"))) |
||||
# define __SDR_IMPORT __attribute__((visibility("default"))) |
||||
# else |
||||
# define __SDR_EXPORT |
||||
# define __SDR_IMPORT |
||||
# endif |
||||
#elif _MSC_VER |
||||
# define __SDR_EXPORT __declspec(dllexport) |
||||
# define __SDR_IMPORT __declspec(dllimport) |
||||
#else |
||||
# define __SDR_EXPORT |
||||
# define __SDR_IMPORT |
||||
#endif |
||||
|
||||
#ifndef sdrangel_STATIC |
||||
# ifdef sdrangel_EXPORTS |
||||
# define SDRANGEL_API __SDR_EXPORT |
||||
# else |
||||
# define SDRANGEL_API __SDR_IMPORT |
||||
# endif |
||||
#else |
||||
#define SDRANGEL_API |
||||
#endif |
||||
#endif /* __SDRANGEL_EXPORT_H */ |
||||
|
||||
Loading…
Reference in new issue