mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-27 22:14:26 -04:00
Fix frequency related data types for >2Ghz
This commit is contained in:
@@ -62,17 +62,17 @@ void DemodulatorMgr::deleteThread(DemodulatorInstance *demod) {
|
||||
garbageCollect();
|
||||
}
|
||||
|
||||
std::vector<DemodulatorInstance *> *DemodulatorMgr::getDemodulatorsAt(int freq, int bandwidth) {
|
||||
std::vector<DemodulatorInstance *> *DemodulatorMgr::getDemodulatorsAt(long long freq, int bandwidth) {
|
||||
std::vector<DemodulatorInstance *> *foundDemods = new std::vector<DemodulatorInstance *>();
|
||||
|
||||
for (int i = 0, iMax = demods.size(); i < iMax; i++) {
|
||||
DemodulatorInstance *testDemod = demods[i];
|
||||
|
||||
int freqTest = testDemod->getParams().frequency;
|
||||
int bandwidthTest = testDemod->getParams().bandwidth;
|
||||
int halfBandwidthTest = bandwidthTest / 2;
|
||||
long long freqTest = testDemod->getParams().frequency;
|
||||
long long bandwidthTest = testDemod->getParams().bandwidth;
|
||||
long long halfBandwidthTest = bandwidthTest / 2;
|
||||
|
||||
int halfBuffer = bandwidth / 2;
|
||||
long long halfBuffer = bandwidth / 2;
|
||||
|
||||
if ((freq <= (freqTest + halfBandwidthTest + halfBuffer)) && (freq >= (freqTest - halfBandwidthTest - halfBuffer))) {
|
||||
foundDemods->push_back(testDemod);
|
||||
|
||||
Reference in New Issue
Block a user