| 2394 | } |
| 2395 | |
| 2396 | void AppFrame::handleModeSelector() { |
| 2397 | DemodulatorMgr *mgr = &wxGetApp().getDemodMgr(); |
| 2398 | |
| 2399 | string dSelection = demodModeSelector->getSelectionLabel(); |
| 2400 | #ifdef ENABLE_DIGITAL_LAB |
| 2401 | string dSelectionadv = demodModeSelectorAdv->getSelectionLabel(); |
| 2402 | |
| 2403 | // basic demodulators |
| 2404 | if (!dSelection.empty() && dSelection != mgr->getLastDemodulatorType()) { |
| 2405 | mgr->setLastDemodulatorType(dSelection); |
| 2406 | mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelection)); |
| 2407 | demodTuner->setHalfBand(dSelection == "USB" || dSelection == "LSB"); |
| 2408 | demodModeSelectorAdv->setSelection(-1); |
| 2409 | } |
| 2410 | // advanced demodulators |
| 2411 | else if (!dSelectionadv.empty() && dSelectionadv != mgr->getLastDemodulatorType()) { |
| 2412 | mgr->setLastDemodulatorType(dSelectionadv); |
| 2413 | mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelectionadv)); |
| 2414 | demodTuner->setHalfBand(false); |
| 2415 | demodModeSelector->setSelection(-1); |
| 2416 | } |
| 2417 | #else |
| 2418 | // basic demodulators |
| 2419 | if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) { |
| 2420 | mgr->setLastDemodulatorType(dSelection); |
| 2421 | mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelection)); |
| 2422 | demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB"); |
| 2423 | } |
| 2424 | #endif |
| 2425 | } |
| 2426 | |
| 2427 | void AppFrame::handleCurrentModem() { |
| 2428 |
nothing calls this directly
no test coverage detected