Get rid of that hideous goto
I'm not overly keen on the continues either :-)
This commit is contained in:
parent
e59142b9dc
commit
f1935b280c
|
@ -1349,8 +1349,8 @@ void detectModeS(uint16_t *m, uint32_t mlen) {
|
|||
pPreamble = &m[j];
|
||||
pPayload = &m[j+MODES_PREAMBLE_SAMPLES];
|
||||
|
||||
if (use_correction) goto good_preamble; /* We already checked it. */
|
||||
|
||||
if (!use_correction) // This is not a re-try with phase correction
|
||||
{ // so try to find a new preamble
|
||||
/* First check of relations between the first 10 samples
|
||||
* representing a valid preamble. We don't even investigate further
|
||||
* if this simple test is not passed. */
|
||||
|
@ -1399,11 +1399,12 @@ void detectModeS(uint16_t *m, uint32_t mlen) {
|
|||
continue;
|
||||
}
|
||||
Modes.stat_valid_preamble++;
|
||||
}
|
||||
|
||||
good_preamble:
|
||||
else {
|
||||
/* If the previous attempt with this message failed, retry using
|
||||
* magnitude correction. */
|
||||
if (use_correction) {
|
||||
// Make a copy of the Payload, and phase correct the copy
|
||||
memcpy(aux, pPayload, sizeof(aux));
|
||||
applyPhaseCorrection(aux);
|
||||
Modes.stat_out_of_phase++;
|
||||
|
|
Loading…
Reference in a new issue