Modulo setting has direct effect

Removed_REF_marker
erikkaashoek 5 years ago
parent 046ad46854
commit 82fc1cbd10

@ -1136,6 +1136,7 @@ enum {
extern void ADF4351_mux(int R);
extern void ADF4351_force_refresh(void);
extern void ADF4351_CP(int p);
extern void ADF4351_modulo(int m);
extern int SI4463_R;
extern volatile int64_t ADF4350_modulo;
extern void SI446x_set_AGC_LNA(uint8_t v);

@ -40,6 +40,8 @@ uint16_t actual_rbw_x10 = 0;
uint16_t vbwSteps = 1;
uint32_t minFreq = 0;
uint32_t maxFreq = 520000000;
static unsigned long old_freq[5] = { 0, 0, 0, 0,0};
static unsigned long real_old_freq[5] = { 0, 0, 0, 0,0};
//int setting.refer = -1; // Off by default
const int reffer_freq[] = {30000000, 15000000, 10000000, 4000000, 3000000, 2000000, 1000000};
@ -455,9 +457,9 @@ void set_R(int f)
void set_modulo(uint32_t f)
{
ADF4350_modulo = f;
//ADF4351_spur_mode(f);
dirty = true;
ADF4351_modulo(f);
ADF4351_force_refresh();
ADF4351_set_frequency(0, real_old_freq[ADF4351_LO]);
}
#endif
@ -1171,8 +1173,6 @@ uint32_t peakFreq;
int peakIndex;
float temppeakLevel;
int temppeakIndex;
static unsigned long old_freq[5] = { 0, 0, 0, 0,0};
static unsigned long real_old_freq[5] = { 0, 0, 0, 0,0};
// volatile int t;
//static uint32_t extra_vbw_step_time = 0;

@ -1097,6 +1097,12 @@ void ADF4351_force_refresh(void) {
prev_actual_freq = 0;
}
void ADF4351_modulo(int m)
{
ADF4350_modulo = m;
// ADF4351_set_frequency(0, (uint64_t)prev_actual_freq);
}
uint64_t ADF4351_set_frequency(int channel, uint64_t freq) // freq / 10Hz
{
// freq -= 71000;

Loading…
Cancel
Save

Powered by TurnKey Linux.