mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 14:34:57 -04:00
File record default file name fix (2)
This commit is contained in:
@@ -177,9 +177,18 @@ bool TestSourceInput::handleMessage(const Message& message)
|
||||
MsgFileRecord& conf = (MsgFileRecord&) message;
|
||||
qDebug() << "RTLSDRInput::handleMessage: MsgFileRecord: " << conf.getStartStop();
|
||||
|
||||
if (conf.getStartStop()) {
|
||||
if (conf.getStartStop())
|
||||
{
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThh:mm:ss")));
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fileSink->stopRecording();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
const PluginDescriptor TestSourcePlugin::m_pluginDescriptor = {
|
||||
QString("Test Source input"),
|
||||
QString("3.14.5"),
|
||||
QString("3.14.6"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
@@ -41,6 +41,7 @@ void TestSourceSettings::resetToDefaults()
|
||||
m_iFactor = 0.0f;
|
||||
m_qFactor = 0.0f;
|
||||
m_phaseImbalance = 0.0f;
|
||||
m_fileRecordName = "";
|
||||
}
|
||||
|
||||
QByteArray TestSourceSettings::serialize() const
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#ifndef _TESTSOURCE_TESTSOURCESETTINGS_H_
|
||||
#define _TESTSOURCE_TESTSOURCESETTINGS_H_
|
||||
|
||||
#include <QString>
|
||||
|
||||
struct TestSourceSettings {
|
||||
typedef enum {
|
||||
FC_POS_INFRA = 0,
|
||||
@@ -54,6 +56,7 @@ struct TestSourceSettings {
|
||||
float m_iFactor; //!< -1.0 < x < 1.0
|
||||
float m_qFactor; //!< -1.0 < x < 1.0
|
||||
float m_phaseImbalance; //!< -1.0 < x < 1.0
|
||||
QString m_fileRecordName;
|
||||
|
||||
TestSourceSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
Reference in New Issue
Block a user