| 15 | #define HEARTBEAT_CHECK_PERIOD_MICROS (50 * 1000) |
| 16 | |
| 17 | DemodulatorPreThread::DemodulatorPreThread(DemodulatorInstance* parent) : IOThread(), iqResampler(nullptr), iqResampleRatio(1), cModem(nullptr), cModemKit(nullptr) |
| 18 | { |
| 19 | initialized.store(false); |
| 20 | this->parent = parent; |
| 21 | |
| 22 | freqShifter = nco_crcf_create(LIQUID_VCO); |
| 23 | shiftFrequency = 0; |
| 24 | |
| 25 | workerQueue = std::make_shared<DemodulatorThreadWorkerCommandQueue>(); |
| 26 | workerQueue->set_max_num_items(2); |
| 27 | |
| 28 | workerResults = std::make_shared<DemodulatorThreadWorkerResultQueue>(); |
| 29 | workerResults->set_max_num_items(100); |
| 30 | |
| 31 | workerThread = new DemodulatorWorkerThread(); |
| 32 | workerThread->setInputQueue("WorkerCommandQueue",workerQueue); |
| 33 | workerThread->setOutputQueue("WorkerResultQueue",workerResults); |
| 34 | |
| 35 | newSampleRate = currentSampleRate = 0; |
| 36 | newBandwidth = currentBandwidth = 0; |
| 37 | newAudioSampleRate = currentAudioSampleRate = 0; |
| 38 | newFrequency = currentFrequency = 0; |
| 39 | |
| 40 | sampleRateChanged.store(false); |
| 41 | frequencyChanged.store(false); |
| 42 | bandwidthChanged.store(false); |
| 43 | audioSampleRateChanged.store(false); |
| 44 | modemSettingsChanged.store(false); |
| 45 | demodTypeChanged.store(false); |
| 46 | } |
| 47 | |
| 48 | bool DemodulatorPreThread::isInitialized() { |
| 49 | return initialized.load(); |
nothing calls this directly
no test coverage detected