Resetting M17 frame decoder when demodulator transitions from unlocked to locked state
This commit is contained in:
parent
9c2091c060
commit
5ebdb36ffb
|
|
@ -144,7 +144,6 @@ void OpMode_M17::rxState(rtxStatus_t *const status)
|
|||
{
|
||||
if(startRx)
|
||||
{
|
||||
decoder.reset();
|
||||
demodulator.startBasebandSampling();
|
||||
demodulator.invertPhase(status->invertRxPhase);
|
||||
|
||||
|
|
@ -157,7 +156,15 @@ void OpMode_M17::rxState(rtxStatus_t *const status)
|
|||
}
|
||||
|
||||
bool newData = demodulator.update();
|
||||
locked = demodulator.isLocked();
|
||||
bool lock = demodulator.isLocked();
|
||||
|
||||
// Reset frame decoder when transitioning from unlocked to locked state
|
||||
if((lock == true) && (locked == false))
|
||||
{
|
||||
decoder.reset();
|
||||
}
|
||||
|
||||
locked = lock;
|
||||
|
||||
if(locked && newData)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue