mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-11-10 00:00:42 -05:00
XTRX MIMO: removed IQ record feature
This commit is contained in:
parent
32dde97fbf
commit
c4a9f241a4
@ -47,7 +47,6 @@ MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgGetStreamInfo, Message)
|
|||||||
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgGetDeviceInfo, Message)
|
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgGetDeviceInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgReportClockGenChange, Message)
|
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgReportClockGenChange, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgReportStreamInfo, Message)
|
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgReportStreamInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgFileRecord, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgStartStop, Message)
|
MESSAGE_CLASS_DEFINITION(XTRXMIMO::MsgStartStop, Message)
|
||||||
|
|
||||||
XTRXMIMO::XTRXMIMO(DeviceAPI *deviceAPI) :
|
XTRXMIMO::XTRXMIMO(DeviceAPI *deviceAPI) :
|
||||||
@ -354,30 +353,6 @@ bool XTRXMIMO::handleMessage(const Message& message)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgFileRecord::match(message))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
// MsgFileRecord& conf = (MsgFileRecord&) message;
|
|
||||||
// qDebug() << "XTRXMIMO::handleMessage: MsgFileRecord: " << conf.getStartStop();
|
|
||||||
// int istream = conf.getStreamIndex();
|
|
||||||
|
|
||||||
// if (conf.getStartStop())
|
|
||||||
// {
|
|
||||||
// if (m_settings.m_fileRecordName.size() != 0) {
|
|
||||||
// m_fileSinks[istream]->setFileName(m_settings.m_fileRecordName + "_0.sdriq");
|
|
||||||
// } else {
|
|
||||||
// m_fileSinks[istream]->genUniqueFileName(m_deviceAPI->getDeviceUID(), istream);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// m_fileSinks[istream]->startRecording();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// m_fileSinks[istream]->stopRecording();
|
|
||||||
// }
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (MsgGetStreamInfo::match(message))
|
else if (MsgGetStreamInfo::match(message))
|
||||||
{
|
{
|
||||||
if (getMessageQueueToGUI() && m_deviceShared.m_dev && m_deviceShared.m_dev->getDevice())
|
if (getMessageQueueToGUI() && m_deviceShared.m_dev && m_deviceShared.m_dev->getDevice())
|
||||||
@ -1373,9 +1348,6 @@ void XTRXMIMO::webapiUpdateDeviceSettings(
|
|||||||
if (deviceSettingsKeys.contains("extClockFreq")) {
|
if (deviceSettingsKeys.contains("extClockFreq")) {
|
||||||
settings.m_extClockFreq = response.getXtrxMimoSettings()->getExtClockFreq();
|
settings.m_extClockFreq = response.getXtrxMimoSettings()->getExtClockFreq();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
|
||||||
settings.m_fileRecordName = *response.getXtrxMimoSettings()->getFileRecordName();
|
|
||||||
}
|
|
||||||
if (deviceSettingsKeys.contains("gpioDir")) {
|
if (deviceSettingsKeys.contains("gpioDir")) {
|
||||||
settings.m_gpioDir = response.getXtrxMimoSettings()->getGpioDir();
|
settings.m_gpioDir = response.getXtrxMimoSettings()->getGpioDir();
|
||||||
}
|
}
|
||||||
@ -1521,12 +1493,6 @@ void XTRXMIMO::webapiFormatDeviceSettings(
|
|||||||
response.getXtrxMimoSettings()->setExtClock(settings.m_extClock ? 1 : 0);
|
response.getXtrxMimoSettings()->setExtClock(settings.m_extClock ? 1 : 0);
|
||||||
response.getXtrxMimoSettings()->setExtClockFreq(settings.m_extClockFreq);
|
response.getXtrxMimoSettings()->setExtClockFreq(settings.m_extClockFreq);
|
||||||
|
|
||||||
if (response.getXtrxMimoSettings()->getFileRecordName()) {
|
|
||||||
*response.getXtrxMimoSettings()->getFileRecordName() = settings.m_fileRecordName;
|
|
||||||
} else {
|
|
||||||
response.getXtrxMimoSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
|
||||||
}
|
|
||||||
|
|
||||||
response.getXtrxMimoSettings()->setGpioDir(settings.m_gpioDir & 0xFF);
|
response.getXtrxMimoSettings()->setGpioDir(settings.m_gpioDir & 0xFF);
|
||||||
response.getXtrxMimoSettings()->setGpioPins(settings.m_gpioPins & 0xFF);
|
response.getXtrxMimoSettings()->setGpioPins(settings.m_gpioPins & 0xFF);
|
||||||
response.getXtrxMimoSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
response.getXtrxMimoSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||||
@ -1690,9 +1656,6 @@ void XTRXMIMO::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, con
|
|||||||
if (deviceSettingsKeys.contains("extClock") || force) {
|
if (deviceSettingsKeys.contains("extClock") || force) {
|
||||||
swgXTRXMIMOSettings->setExtClockFreq(settings.m_extClockFreq);
|
swgXTRXMIMOSettings->setExtClockFreq(settings.m_extClockFreq);
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("extClock") || force) {
|
|
||||||
swgXTRXMIMOSettings->setFileRecordName(new QString(settings.m_fileRecordName));
|
|
||||||
}
|
|
||||||
if (deviceSettingsKeys.contains("gpioDir") || force) {
|
if (deviceSettingsKeys.contains("gpioDir") || force) {
|
||||||
swgXTRXMIMOSettings->setGpioDir(settings.m_gpioDir & 0xFF);
|
swgXTRXMIMOSettings->setGpioDir(settings.m_gpioDir & 0xFF);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,28 +182,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgFileRecord : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
bool getStartStop() const { return m_startStop; }
|
|
||||||
int getStreamIndex() const { return m_streamIndex; }
|
|
||||||
|
|
||||||
static MsgFileRecord* create(bool startStop, int streamIndex) {
|
|
||||||
return new MsgFileRecord(startStop, streamIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool m_startStop;
|
|
||||||
int m_streamIndex;
|
|
||||||
|
|
||||||
MsgFileRecord(bool startStop, int streamIndex) :
|
|
||||||
Message(),
|
|
||||||
m_startStop(startStop),
|
|
||||||
m_streamIndex(streamIndex)
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
|
|
||||||
XTRXMIMO(DeviceAPI *deviceAPI);
|
XTRXMIMO(DeviceAPI *deviceAPI);
|
||||||
virtual ~XTRXMIMO();
|
virtual ~XTRXMIMO();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
@ -278,8 +256,6 @@ public:
|
|||||||
|
|
||||||
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
|
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
|
||||||
|
|
||||||
bool isRecording(unsigned int istream) const { (void) istream; return false; }
|
|
||||||
|
|
||||||
bool getRxRunning() const { return m_runningRx; }
|
bool getRxRunning() const { return m_runningRx; }
|
||||||
bool getTxRunning() const { return m_runningTx; }
|
bool getTxRunning() const { return m_runningTx; }
|
||||||
|
|
||||||
|
|||||||
@ -96,9 +96,6 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
|||||||
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx);
|
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx);
|
||||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||||
|
|
||||||
CRightClickEnabler *fileRecordRightClickEnabler = new CRightClickEnabler(ui->record);
|
|
||||||
connect(fileRecordRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openFileRecordDialog(const QPoint &)));
|
|
||||||
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -710,18 +707,6 @@ void XTRXMIMOGUI::on_startStopTx_toggled(bool checked)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTRXMIMOGUI::on_record_toggled(bool checked)
|
|
||||||
{
|
|
||||||
if (checked) {
|
|
||||||
ui->record->setStyleSheet("QToolButton { background-color : red; }");
|
|
||||||
} else {
|
|
||||||
ui->record->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
|
||||||
}
|
|
||||||
|
|
||||||
XTRXMIMO::MsgFileRecord* message = XTRXMIMO::MsgFileRecord::create(checked, m_streamIndex);
|
|
||||||
m_xtrxMIMO->getInputMessageQueue()->push(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void XTRXMIMOGUI::on_centerFrequency_changed(quint64 value)
|
void XTRXMIMOGUI::on_centerFrequency_changed(quint64 value)
|
||||||
{
|
{
|
||||||
if (m_rxElseTx) {
|
if (m_rxElseTx) {
|
||||||
@ -1050,29 +1035,3 @@ void XTRXMIMOGUI::openDeviceSettingsDialog(const QPoint& p)
|
|||||||
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTRXMIMOGUI::openFileRecordDialog(const QPoint& p)
|
|
||||||
{
|
|
||||||
QFileDialog fileDialog(
|
|
||||||
this,
|
|
||||||
tr("Save I/Q record file"),
|
|
||||||
m_settings.m_fileRecordName,
|
|
||||||
tr("SDR I/Q Files (*.sdriq)")
|
|
||||||
);
|
|
||||||
|
|
||||||
fileDialog.setOptions(QFileDialog::DontUseNativeDialog);
|
|
||||||
fileDialog.setFileMode(QFileDialog::AnyFile);
|
|
||||||
fileDialog.move(p);
|
|
||||||
QStringList fileNames;
|
|
||||||
|
|
||||||
if (fileDialog.exec())
|
|
||||||
{
|
|
||||||
fileNames = fileDialog.selectedFiles();
|
|
||||||
|
|
||||||
if (fileNames.size() > 0)
|
|
||||||
{
|
|
||||||
m_settings.m_fileRecordName = fileNames.at(0);
|
|
||||||
sendSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -101,7 +101,6 @@ private slots:
|
|||||||
void on_spectrumIndex_currentIndexChanged(int index);
|
void on_spectrumIndex_currentIndexChanged(int index);
|
||||||
void on_startStopRx_toggled(bool checked);
|
void on_startStopRx_toggled(bool checked);
|
||||||
void on_startStopTx_toggled(bool checked);
|
void on_startStopTx_toggled(bool checked);
|
||||||
void on_record_toggled(bool checked);
|
|
||||||
void on_centerFrequency_changed(quint64 value);
|
void on_centerFrequency_changed(quint64 value);
|
||||||
void on_ncoEnable_toggled(bool checked);
|
void on_ncoEnable_toggled(bool checked);
|
||||||
void on_ncoFrequency_changed(qint64 value);
|
void on_ncoFrequency_changed(qint64 value);
|
||||||
@ -121,7 +120,6 @@ private slots:
|
|||||||
void on_pgaGain_valueChanged(int value);
|
void on_pgaGain_valueChanged(int value);
|
||||||
void on_antenna_currentIndexChanged(int index);
|
void on_antenna_currentIndexChanged(int index);
|
||||||
void openDeviceSettingsDialog(const QPoint& p);
|
void openDeviceSettingsDialog(const QPoint& p);
|
||||||
void openFileRecordDialog(const QPoint& p);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PLUGINS_SAMPLEMIMO_XTRXMIMO_XTRXMIMOGUI_H_
|
#endif // PLUGINS_SAMPLEMIMO_XTRXMIMO_XTRXMIMOGUI_H_
|
||||||
|
|||||||
@ -256,29 +256,6 @@
|
|||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="freqLeftLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="freqLeftTopLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="ButtonSwitch" name="record">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Left: toggle record I/Q samples from device - Right: select output file</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
|
||||||
<normaloff>:/record_off.png</normaloff>
|
|
||||||
<normalon>:/record_on.png</normalon>:/record_off.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="freqLeftBotLayout">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="adcRateLabel">
|
<widget class="QLabel" name="adcRateLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -298,10 +275,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="freqLeftSpacer">
|
<spacer name="freqLeftSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@ -28,7 +28,6 @@ void XTRXMIMOSettings::resetToDefaults()
|
|||||||
// common
|
// common
|
||||||
m_extClock = false;
|
m_extClock = false;
|
||||||
m_extClockFreq = 0; // Auto
|
m_extClockFreq = 0; // Auto
|
||||||
m_fileRecordName = "";
|
|
||||||
m_useReverseAPI = false;
|
m_useReverseAPI = false;
|
||||||
m_reverseAPIAddress = "127.0.0.1";
|
m_reverseAPIAddress = "127.0.0.1";
|
||||||
m_reverseAPIPort = 8888;
|
m_reverseAPIPort = 8888;
|
||||||
@ -85,7 +84,6 @@ QByteArray XTRXMIMOSettings::serialize() const
|
|||||||
// common
|
// common
|
||||||
s.writeBool(2, m_extClock);
|
s.writeBool(2, m_extClock);
|
||||||
s.writeU32(3, m_extClockFreq);
|
s.writeU32(3, m_extClockFreq);
|
||||||
s.writeString(4, m_fileRecordName);
|
|
||||||
s.writeBool(5, m_useReverseAPI);
|
s.writeBool(5, m_useReverseAPI);
|
||||||
s.writeString(6, m_reverseAPIAddress);
|
s.writeString(6, m_reverseAPIAddress);
|
||||||
s.writeU32(7, m_reverseAPIPort);
|
s.writeU32(7, m_reverseAPIPort);
|
||||||
@ -153,7 +151,6 @@ bool XTRXMIMOSettings::deserialize(const QByteArray& data)
|
|||||||
// common
|
// common
|
||||||
d.readBool(2, &m_extClock, false);
|
d.readBool(2, &m_extClock, false);
|
||||||
d.readU32(3, &m_extClockFreq, 0);
|
d.readU32(3, &m_extClockFreq, 0);
|
||||||
d.readString(4, &m_fileRecordName, "");
|
|
||||||
d.readBool(5, &m_useReverseAPI, false);
|
d.readBool(5, &m_useReverseAPI, false);
|
||||||
d.readString(6, &m_reverseAPIAddress, "127.0.0.1");
|
d.readString(6, &m_reverseAPIAddress, "127.0.0.1");
|
||||||
d.readU32(7, &uintval, 0);
|
d.readU32(7, &uintval, 0);
|
||||||
|
|||||||
@ -44,7 +44,6 @@ struct XTRXMIMOSettings
|
|||||||
// common
|
// common
|
||||||
bool m_extClock; //!< True if external clock source
|
bool m_extClock; //!< True if external clock source
|
||||||
uint32_t m_extClockFreq; //!< Frequency (Hz) of external clock source
|
uint32_t m_extClockFreq; //!< Frequency (Hz) of external clock source
|
||||||
QString m_fileRecordName;
|
|
||||||
uint8_t m_gpioDir; //!< GPIO pin direction LSB first; 0 input, 1 output
|
uint8_t m_gpioDir; //!< GPIO pin direction LSB first; 0 input, 1 output
|
||||||
uint8_t m_gpioPins; //!< GPIO pins to write; LSB first
|
uint8_t m_gpioPins; //!< GPIO pins to write; LSB first
|
||||||
bool m_useReverseAPI;
|
bool m_useReverseAPI;
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
TestMISettings:
|
TestMISettings:
|
||||||
description: TestMISettings
|
description: TestMISettings
|
||||||
properties:
|
properties:
|
||||||
fileRecordName:
|
|
||||||
type: string
|
|
||||||
useReverseAPI:
|
useReverseAPI:
|
||||||
description: Synchronize with reverse API (1 for yes, 0 for no)
|
description: Synchronize with reverse API (1 for yes, 0 for no)
|
||||||
type: integer
|
type: integer
|
||||||
|
|||||||
@ -58,8 +58,6 @@ XtrxInputSettings:
|
|||||||
IQ samples order
|
IQ samples order
|
||||||
* 0 - Q then I (swapped)
|
* 0 - Q then I (swapped)
|
||||||
* 1 - I then Q (straight)
|
* 1 - I then Q (straight)
|
||||||
fileRecordName:
|
|
||||||
type: string
|
|
||||||
useReverseAPI:
|
useReverseAPI:
|
||||||
description: Synchronize with reverse API (1 for yes, 0 for no)
|
description: Synchronize with reverse API (1 for yes, 0 for no)
|
||||||
type: integer
|
type: integer
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user