MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / adjustRanges

Method adjustRanges

Components/PanoramicDialog.cpp:557–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void
558PanoramicDialog::adjustRanges(void)
559{
560 SUFREQ minFreq, maxFreq;
561
562 minFreq = this->ui->rangeStartSpin->value();
563 maxFreq = this->ui->rangeEndSpin->value();
564
565 if (this->ui->rangeStartSpin->value() >
566 this->ui->rangeEndSpin->value()) {
567 auto val = this->ui->rangeStartSpin->value();
568 this->ui->rangeStartSpin->setValue(
569 this->ui->rangeEndSpin->value());
570 this->ui->rangeEndSpin->setValue(val);
571 }
572
573 this->ui->waterfall->setFreqUnits(
574 getFrequencyUnits(
575 static_cast<qint64>(maxFreq)));
576
577 this->ui->waterfall->setSpanFreq(static_cast<qint64>(maxFreq - minFreq));
578 this->ui->waterfall->setCenterFreq(static_cast<qint64>(maxFreq + minFreq) / 2);
579}
580
581bool
582PanoramicDialog::invalidRange(void) const

Callers 3

setRangesMethod · 0.95
onDeviceChangedMethod · 0.95
onFreqRangeChangedMethod · 0.95

Calls 3

valueMethod · 0.80
setValueMethod · 0.80
setCenterFreqMethod · 0.45

Tested by

no test coverage detected