// reset frame synchronizer object void gmskframesync_reset(gmskframesync _q) { // reset state and counters _q->state = STATE_DETECTFRAME; _q->preamble_counter = 0; _q->header_counter = 0; _q->payload_counter = 0; // clear pre-demod buffer windowcf_clear(_q->buffer); // reset internal objects detector_cccf_reset(_q->frame_detector); // reset carrier recovery objects nco_crcf_reset(_q->nco_coarse); // reset sample state _q->x_prime = 0.0f; _q->fi_hat = 0.0f; // reset symbol timing recovery state firpfb_rrrf_reset(_q->mf); firpfb_rrrf_reset(_q->dmf); _q->pfb_q = 0.0f; // filtered error signal }
// reset frame synchronizer object void flexframesync_reset(flexframesync _q) { // reset binary pre-demod synchronizer detector_cccf_reset(_q->frame_detector); // clear pre-demod buffer windowcf_clear(_q->buffer); // reset carrier recovery objects nco_crcf_reset(_q->nco_coarse); nco_crcf_reset(_q->nco_fine); // reset symbol timing recovery state firpfb_crcf_reset(_q->mf); firpfb_crcf_reset(_q->dmf); _q->pfb_q = 0.0f; // filtered error signal // reset state _q->state = STATE_DETECTFRAME; _q->pn_counter = 0; _q->header_counter = 0; _q->payload_counter = 0; // reset frame statistics _q->framestats.evm = 0.0f; }