Spur check: program the planned LO also when the clearing move is zero

Inside a hysteresis stretch the LO sits up to 50 kHz off the target and a product can be inside D
only because of that error. The nearest clearing plan is then the target itself, which the check
recorded as a zero shift and skipped, leaving the line (ZS406, 1603.6 MHz family, RBW 30k, 15 kHz
step). Apply the plan whenever one was found; shift the IF only when the move is nonzero.
main
erikkaashoek 2 weeks ago
parent 3d11de1839
commit 5ba812054f

@ -4811,13 +4811,17 @@ again: // Spur redu
retune = LO_retune(target_f);
if (retune)
ADF4351_plan_frequency(target_f, &plan);
} else if (best_s != 0) {
} else if (best_cost != INT32_MAX || best_a > (o < 0 ? -o : o)) {
// A planned LO that clears D (or the budget edge that helps most). Program it even when the move is
// zero: the product was inside D only because the hysteresis holds the LO off the target.
if (debug_avoid) stored_t[i] = -60.0; // Display when to do spur shift in the stored trace
local_IF += best_s;
LO_spur_shifted = true;
if (best_s != 0) {
local_IF += best_s;
LO_spur_shifted = true;
}
target_f = best_f;
plan = best_plan;
retune = true; // a shifted point programs its planned LO: the hysteresis would keep the old one
retune = true;
}
}
if (retune) { // as set_freq(ADF4351_LO, target_f)

Loading…
Cancel
Save

Powered by TurnKey Linux.