Fixed bug in M17 demodulator causing it to sometimes take more than 20ms to process a block of baseband samples when, in unlocked state, a valid syncword is searched.
This commit is contained in:
parent
c6a40a9625
commit
f24699f14e
|
|
@ -523,10 +523,15 @@ bool M17Demodulator::update()
|
||||||
|
|
||||||
if ((hammingSync > maxHamming) && (hammingLsf > maxHamming))
|
if ((hammingSync > maxHamming) && (hammingLsf > maxHamming))
|
||||||
{
|
{
|
||||||
// Lock lost
|
// Lock lost, reset demodulator alignment (phase) only
|
||||||
|
// if we were locked on a valid signal.
|
||||||
|
// This to avoid, in case of absence of carrier, to fall
|
||||||
|
// in a loop where the demodulator continues to search
|
||||||
|
// for the syncword in the same block of samples, causing
|
||||||
|
// the update function to take more than 20ms to complete.
|
||||||
|
if(locked) phase = 0;
|
||||||
syncDetected = false;
|
syncDetected = false;
|
||||||
locked = false;
|
locked = false;
|
||||||
phase = 0;
|
|
||||||
|
|
||||||
#ifdef ENABLE_DEMOD_LOG
|
#ifdef ENABLE_DEMOD_LOG
|
||||||
// Pre-arm the log trigger.
|
// Pre-arm the log trigger.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue