mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-14 20:31:53 -05:00
Perseus support final
This commit is contained in:
parent
7e940e3a43
commit
f4bf4d0b99
@ -29,7 +29,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>AirspyHF</string>
|
<string>Perseus</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
@ -220,6 +220,16 @@ bool PerseusInput::handleMessage(const Message& message)
|
|||||||
|
|
||||||
bool PerseusInput::openDevice()
|
bool PerseusInput::openDevice()
|
||||||
{
|
{
|
||||||
|
if (m_perseusDescriptor != 0) {
|
||||||
|
closeDevice();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_sampleFifo.setSize(PERSEUS_NBSAMPLES))
|
||||||
|
{
|
||||||
|
qCritical("PerseusInput::start: could not allocate SampleFifo");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_deviceAPI->getSampleSourceSerial();
|
m_deviceAPI->getSampleSourceSerial();
|
||||||
int deviceSequence = DevicePerseus::instance().getSequenceFromSerial(m_deviceAPI->getSampleSourceSerial().toStdString());
|
int deviceSequence = DevicePerseus::instance().getSequenceFromSerial(m_deviceAPI->getSampleSourceSerial().toStdString());
|
||||||
|
|
||||||
@ -264,7 +274,8 @@ void PerseusInput::setDeviceCenterFrequency(quint64 freq_hz, const PerseusSettin
|
|||||||
qint64 df = ((qint64)freq_hz * settings.m_LOppmTenths) / 10000000LL;
|
qint64 df = ((qint64)freq_hz * settings.m_LOppmTenths) / 10000000LL;
|
||||||
freq_hz += df;
|
freq_hz += df;
|
||||||
|
|
||||||
int rc = perseus_set_ddc_center_freq(m_perseusDescriptor, freq_hz, settings.m_wideBand ? 1 : 0);
|
// wideband flag is inverted since parameter is set to enable preselection filters
|
||||||
|
int rc = perseus_set_ddc_center_freq(m_perseusDescriptor, freq_hz, settings.m_wideBand ? 0 : 1);
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
qWarning("PerseusInput::setDeviceCenterFrequency: could not set frequency to %llu Hz: %s", freq_hz, perseus_errorstr());
|
qWarning("PerseusInput::setDeviceCenterFrequency: could not set frequency to %llu Hz: %s", freq_hz, perseus_errorstr());
|
||||||
@ -297,7 +308,7 @@ bool PerseusInput::applySettings(const PerseusSettings& settings, bool force)
|
|||||||
qCritical("PerseusInput::applySettings: could not set sample rate index %u (%d S/s): %s",
|
qCritical("PerseusInput::applySettings: could not set sample rate index %u (%d S/s): %s",
|
||||||
settings.m_devSampleRateIndex, rate, perseus_errorstr());
|
settings.m_devSampleRateIndex, rate, perseus_errorstr());
|
||||||
}
|
}
|
||||||
else if (m_perseusDescriptor != 0)
|
else if (m_perseusThread != 0)
|
||||||
{
|
{
|
||||||
qDebug("PerseusInput::applySettings: sample rate set to index: %u (%d S/s)", settings.m_devSampleRateIndex, rate);
|
qDebug("PerseusInput::applySettings: sample rate set to index: %u (%d S/s)", settings.m_devSampleRateIndex, rate);
|
||||||
m_perseusThread->setSamplerate(rate);
|
m_perseusThread->setSamplerate(rate);
|
||||||
|
@ -48,7 +48,7 @@ void PerseusThread::startWork()
|
|||||||
|
|
||||||
void PerseusThread::stopWork()
|
void PerseusThread::stopWork()
|
||||||
{
|
{
|
||||||
qDebug("AirspyThread::stopWork");
|
qDebug("PerseusThread::stopWork");
|
||||||
m_running = false;
|
m_running = false;
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
@ -75,6 +75,7 @@ void PerseusThread::run()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
qDebug("PerseusThread::run: start Perseus Rx");
|
||||||
while (m_running) {
|
while (m_running) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ private:
|
|||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
static PerseusThread *m_this;
|
static PerseusThread *m_this;
|
||||||
|
|
||||||
Decimators<qint64, TripleByteLE<qint32>, SDR_RX_SAMP_SZ, 16> m_decimators32;
|
Decimators<qint64, TripleByteLE<qint32>, SDR_RX_SAMP_SZ, 24> m_decimators32; // for no decimation (accumulator is int32)
|
||||||
Decimators<qint64, TripleByteLE<qint64>, SDR_RX_SAMP_SZ, 16> m_decimators64;
|
Decimators<qint64, TripleByteLE<qint64>, SDR_RX_SAMP_SZ, 24> m_decimators64; // for actual decimation (accumulator is int64)
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
void callback(const uint8_t* buf, qint32 len); // inner call back
|
void callback(const uint8_t* buf, qint32 len); // inner call back
|
||||||
|
1
udev-rules/95-perseus.rules
Normal file
1
udev-rules/95-perseus.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
ATTR{idVendor}=="04b4", ATTR{idProduct}=="325c", MODE="666", GROUP="plugdev"
|
@ -9,6 +9,7 @@ cp 64-limesuite.rules /etc/udev/rules.d/
|
|||||||
cp 53-adi-plutosdr-usb.rules /etc/udev/rules.d/
|
cp 53-adi-plutosdr-usb.rules /etc/udev/rules.d/
|
||||||
cp rtl-sdr.rules /etc/udev/rules.d/
|
cp rtl-sdr.rules /etc/udev/rules.d/
|
||||||
cp mirisdr.rules /etc/udev/rules.d/
|
cp mirisdr.rules /etc/udev/rules.d/
|
||||||
|
cp 95-perseus.rules /etc/udev/rules.d/
|
||||||
|
|
||||||
udevadm control --reload-rules
|
udevadm control --reload-rules
|
||||||
udevadm trigger
|
udevadm trigger
|
||||||
|
Loading…
Reference in New Issue
Block a user