mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-20 05:43:40 +00:00
Windowing option added to sampling
This commit is contained in:
parent
de8761545d
commit
d9d00b8c71
23 changed files with 1267 additions and 493 deletions
|
|
@ -187,6 +187,11 @@ bool MAX2871::SetFrequency(uint64_t f) {
|
|||
|
||||
auto approx = Algorithm::BestRationalApproximation(fraction, 4095);
|
||||
|
||||
if(approx.denom == 1) {
|
||||
// M value must be at least 2
|
||||
approx.denom = 2;
|
||||
}
|
||||
|
||||
int32_t rem_approx = ((uint64_t) f_PFD * approx.num) / approx.denom;
|
||||
if(rem_approx != rem_f) {
|
||||
LOG_WARN("Best match is F=%u/M=%u, deviation of %luHz",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue