| 231 | } |
| 232 | |
| 233 | void |
| 234 | MainSpectrum::updateLimits(void) |
| 235 | { |
| 236 | qint64 minFreq = this->noLimits ? 0 : this->minFreq; |
| 237 | qint64 maxFreq = this->noLimits ? 300000000000 : this->maxFreq; |
| 238 | |
| 239 | qint64 minLcd = minFreq + this->getLnbFreq(); |
| 240 | qint64 maxLcd = maxFreq + this->getLnbFreq(); |
| 241 | |
| 242 | |
| 243 | // Center frequency LCD limits |
| 244 | this->ui->fcLcd->setMinSilent(minLcd); |
| 245 | this->ui->fcLcd->setMaxSilent(maxLcd); |
| 246 | |
| 247 | // Demod frequency LCD limits |
| 248 | minLcd = this->ui->fcLcd->getValue() - this->cachedRate / 2; |
| 249 | maxLcd = this->ui->fcLcd->getValue() + this->cachedRate / 2; |
| 250 | |
| 251 | this->ui->loLcd->setMinSilent(minLcd); |
| 252 | this->ui->loLcd->setMaxSilent(maxLcd); |
| 253 | |
| 254 | WATERFALL_CALL(setFrequencyLimitsEnabled(!this->noLimits)); |
| 255 | WATERFALL_CALL(setFrequencyLimits(minLcd, maxLcd)); |
| 256 | } |
| 257 | |
| 258 | void |
| 259 | MainSpectrum::setFrequencyLimits(qint64 min, qint64 max) |
no test coverage detected