1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 23:43:43 -04:00

HackRF: suppression of Rx to Tx link frequency. Synchronization of Tx to Rx device center frequency.

This commit is contained in:
f4exb
2019-03-30 20:44:55 +01:00
parent 7fed61c3b9
commit 64b198e507
284 changed files with 441 additions and 416 deletions
+23
View File
@@ -68,6 +68,29 @@ qint64 DeviceSampleSource::calculateDeviceCenterFrequency(
return deviceCenterFrequency;
}
qint64 DeviceSampleSource::calculateCenterFrequency(
quint64 deviceCenterFrequency,
qint64 transverterDeltaFrequency,
int log2Decim,
fcPos_t fcPos,
quint32 devSampleRate,
bool transverterMode)
{
qint64 centerFrequency = deviceCenterFrequency;
centerFrequency += calculateFrequencyShift(log2Decim, fcPos, devSampleRate);
centerFrequency += transverterMode ? transverterDeltaFrequency : 0;
centerFrequency = centerFrequency < 0 ? 0 : centerFrequency;
qDebug() << "DeviceSampleSource::calculateCenterFrequency:"
<< " desired center freq: " << centerFrequency << " Hz"
<< " device center freq: " << deviceCenterFrequency << " Hz"
<< " device sample rate: " << devSampleRate << "S/s"
<< " Actual sample rate: " << devSampleRate/(1<<log2Decim) << "S/s"
<< " center freq position code: " << fcPos;
return centerFrequency;
}
/**
* log2Decim = 0: no shift
*