{2*HND,(int)(3.5*HND),4*HND,(int)(3.5*HND),2*HND,(int)(0.5*HND),0,(int)(0.5*HND)},// High range, MO_NFM
{0*HWD,(int)(1.5*HWD),2*HWD,(int)(1.5*HWD),0*HWD,(int)(-1.5*HWD),(int)-2*HWD,(int)(-1.5*HWD)},// HIgh range, MO_WFM
#endif
};// narrow FM modulation avoid sign changes
#undef S1
#ifdef TINYSA3
staticconstintfm_modulation_offset[4]=
{
#ifdef TINYSA4
5000,//85000,
0,//80000,
-2700,//165000,
0,//160000
#else
85000,
80000,
165000,
160000
#endif
};
#endif
deviceRSSI_tage[POINTS_COUNT];// Array used for 1: calculating the age of any max and 2: buffer for fast sweep RSSI values;
@ -3256,7 +3266,7 @@ static float old_temp = 0.0;
pureRSSI_tperform(boolbreak_on_operation,inti,freq_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;
intmodulation_index;
intmodulation_count_iter=0;
#ifdef __NEW_SWITCHES__
// int direct = ((setting.mode == M_LOW && config.direct && f > DIRECT_START && f<DIRECT_STOP) || (setting.mode == M_GENLOW && f >= MINIMUM_DIRECT_FREQ && f < ultra_start) );
@ -3545,9 +3555,25 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
#endif
modulation_delay=((1000000-MO_FREQ_COR)/MODULATION_STEPS)/setting.modulation_frequency;// 8 steps so 1MHz/8
modulation_counter=0;
modulation_index=0;
if(setting.modulation==MO_AM)// -14 default
modulation_delay+=config.cor_am;
else{// must be FM
else{
#ifdef TINYSA4
switch(setting.modulation){
caseMO_NFM:
modulation_delay+=config.cor_nfm;
break;
modulation_delay+=config.cor_nfm2;
break;
modulation_delay+=config.cor_nfm3;
break;
modulation_delay+=config.cor_wfm;
break;
}
modulation_index=setting.modulation-MO_NFM;
#else
// must be FM
if(setting.modulation==MO_WFM){// -17 default
modulation_delay+=config.cor_wfm;
modulation_index=1;
@ -3555,16 +3581,18 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /