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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user