mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
proof-of-concept spectrum analyzer mode
This commit is contained in:
parent
76875c2316
commit
38e73365df
33 changed files with 942 additions and 82 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "delay.hpp"
|
||||
#include <cmath>
|
||||
#define LOG_LEVEL LOG_LEVEL_WARN
|
||||
#define LOG_LEVEL LOG_LEVEL_ERR
|
||||
#define LOG_MODULE "MAX2871"
|
||||
#include "Log.h"
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ bool MAX2871::SetFrequency(uint64_t f) {
|
|||
approx.num, approx.denom, abs(rem_f - rem_approx));
|
||||
}
|
||||
|
||||
uint64_t f_set = (uint64_t) N * f_PFD + (f_PFD * approx.num) / approx.denom;
|
||||
uint64_t f_set = (uint64_t) N * f_PFD + rem_approx;
|
||||
f_set /= (1UL << div);
|
||||
|
||||
// write values to registers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue