RX State Machine HEADER_PROCESSING to BIT_FRAME_SYNC

The header processing stage always switched to the VOICE_FRAME stage. This caused garbage to be loaded into decode buffers. This fix changes the logic to only switche from HEADER_PROCESS stage to VOICE_FRAME stage if there is a P_FCS match, otherwise goes back to the BIT_FRAME_SYNC stage.
This commit is contained in:
Haylz 2019-06-11 16:47:24 -05:00 committed by Hayley
parent 05e8e83223
commit 2d66da14a4

View file

@ -951,15 +951,20 @@ BOOL dstar_rxStateMachine( DSTAR_MACHINE machine, BOOL in_bit, unsigned char * a
dstar_updateStatus( machine, machine->slice, STATUS_RX );
machine->rx_state = VOICE_FRAME;
machine->bit_count = 0;
machine->frame_count = 0;
} else {
output( ANSI_RED "P_FCS Does Not Match!\n" ANSI_WHITE );
machine->rx_state = BIT_FRAME_SYNC;
machine->bit_count = 0;
}
/* STATE CHANGE */
machine->rx_state = VOICE_FRAME;
machine->bit_count = 0;
machine->frame_count = 0;
}
break;