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

Method work

Tasks/WaveSampler.cpp:294–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294bool
295WaveSampler::work(void)
296{
297 bool more = false;
298 bool decided = false;
299
300 switch (this->properties.sync) {
301 case MANUAL:
302 more = this->sampleManual();
303 break;
304
305 case GARDNER:
306 more = this->sampleGardner();
307 break;
308
309 case ZERO_CROSSING:
310 more = this->sampleZeroCrossing();
311 decided = true;
312 break;
313 }
314
315 // Perform decision, if necessary
316 if (!decided)
317 this->decider->decide(this->set.block, this->set.symbols, this->set.len);
318
319 this->setStatus("Demodulating ("
320 + QString::number(static_cast<int>(this->progress * 100))
321 + ")...");
322
323 this->setProgress(this->progress);
324
325 // Deliver data
326 if (this->set.len > 0)
327 emit data(this->set);
328
329 if (!more)
330 emit done();
331
332 return more;
333}
334
335void
336WaveSampler::cancel(void)

Callers

nothing calls this directly

Calls 5

sampleManualMethod · 0.95
sampleGardnerMethod · 0.95
sampleZeroCrossingMethod · 0.95
setStatusMethod · 0.80
setProgressMethod · 0.45

Tested by

no test coverage detected