1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-12 11:26:11 -05:00

Perseus support final

This commit is contained in:
f4exb 2018-02-08 23:26:10 +01:00
parent 7e940e3a43
commit f4bf4d0b99
7 changed files with 21 additions and 7 deletions

View File

@ -29,7 +29,7 @@
</font>
</property>
<property name="windowTitle">
<string>AirspyHF</string>
<string>Perseus</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">

View File

@ -220,6 +220,16 @@ bool PerseusInput::handleMessage(const Message& message)
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();
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;
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) {
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",
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);
m_perseusThread->setSamplerate(rate);

View File

@ -48,7 +48,7 @@ void PerseusThread::startWork()
void PerseusThread::stopWork()
{
qDebug("AirspyThread::stopWork");
qDebug("PerseusThread::stopWork");
m_running = false;
wait();
}
@ -75,6 +75,7 @@ void PerseusThread::run()
}
else
{
qDebug("PerseusThread::run: start Perseus Rx");
while (m_running) {
sleep(1);
}

View File

@ -54,8 +54,8 @@ private:
unsigned int m_log2Decim;
static PerseusThread *m_this;
Decimators<qint64, TripleByteLE<qint32>, SDR_RX_SAMP_SZ, 16> m_decimators32;
Decimators<qint64, TripleByteLE<qint64>, SDR_RX_SAMP_SZ, 16> m_decimators64;
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, 24> m_decimators64; // for actual decimation (accumulator is int64)
void run();
void callback(const uint8_t* buf, qint32 len); // inner call back

View File

@ -0,0 +1 @@
ATTR{idVendor}=="04b4", ATTR{idProduct}=="325c", MODE="666", GROUP="plugdev"

View File

@ -9,6 +9,7 @@ cp 64-limesuite.rules /etc/udev/rules.d/
cp 53-adi-plutosdr-usb.rules /etc/udev/rules.d/
cp rtl-sdr.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 trigger