actual_rbw_x10=2500;// if spur suppression reduce max rbw to fit within BPF
SI4432_Sel=MODE_SELECT(setting.mode);
#endif
@ -1729,12 +1757,12 @@ static void calculate_static_correction(void) // Calculate the
-setting.offset);
}
pureRSSI_tperform(boolbreak_on_operation,inti,uint32_tf,inttracking)// Measure the RSSI for one frequency, used from sweep and other measurement routines. Must do all HW setup
{
intmodulation_delay=0;
intmodulation_index=0;
if(i==0&&dirty){// if first point in scan and dirty
intspur_second_pass=false;
if(i==0&&dirty){// if first point in scan and dirty
#ifdef __ADF4351__
ADF4351_force_refresh();
#endif
@ -1743,7 +1771,6 @@ pureRSSI_t perform(bool break_on_operation, int i, uint32_t f, int tracking)
scandirty=true;// This is the first pass with new settings
dirty=false;
sweep_elapsed=chVTGetSystemTimeX();// for measuring accumulated time
if(setting.spur_removal==-1)setting.spur_removal=1;// ensure spur processing starts in right phase
// Set for actual time pre calculated value (update after sweep)
// Change actual sweep time as user input if it greater minimum
@ -1918,8 +1945,8 @@ modulation_again:
gotoskip_LO_setting;// No more LO changes required, save some time and jump over the code
uint32_tlocal_IF;
again:// Spur reduction jumps to here for second measurement
spur_second_pass=false;
again:// Spur reduction jumps to here for second measurement
local_IF=0;// to get rid of warning
if(MODE_HIGH(setting.mode)){
@ -1940,17 +1967,17 @@ modulation_again:
stored_t[i]=-60.0;// Display when to do spur shift in the stored trace
#endif
}
if(setting.spur_removal){// If in low input mode and spur reduction is on
if(false&&S_IS_AUTO(setting.below_IF)&&lf<local_IF/2)// if below 150MHz and auto_below_IF <-------------------TODO ---------------------
if(S_STATE(setting.spur_removal)){// If in low input mode and spur reduction is on
if(false&&S_IS_AUTO(setting.below_IF)&&(lf<local_IF/2||lf>local_IF))// if below 150MHz and auto_below_IF <-------------------TODO ---------------------
{// else low/above IF
if(setting.spur_removal==1)
setting.below_IF=S_AUTO_ON;// use below IF in first pass
if(spur_second_pass)
setting.below_IF=S_AUTO_ON;// use below IF in second pass
else
setting.below_IF=S_AUTO_OFF;// and above IF in second pass
setting.below_IF=S_AUTO_OFF;// and above IF in first pass
}
else
{
if(setting.spur_removal==-1)// If second spur pass
if(spur_second_pass)// If second spur pass
#ifdef __SI4432__
local_IF=local_IF+500000;// apply IF spur shift
#else
@ -1965,14 +1992,14 @@ modulation_again:
}
#ifdef __ULTRA__
}elseif(setting.mode==M_ULTRA){// No above/below IF mode in Ultra