SI4432_Write_Byte(SI4432_FREQ_OFFSET1,0);// Back to nominal offset
SI4432_Write_Byte(SI4432_FREQ_OFFSET2,0);
switch(m){
caseM_LOW:// Mixed into 0
#ifdef __ULTRA__
@ -1085,9 +1093,6 @@ case M_GENHIGH: // Direct output from 1
break;
}
SI4432_Sel=SI4432_LO;
SI4432_Write_Byte(SI4432_FREQ_OFFSET1,0);// Back to nominal offset
SI4432_Write_Byte(SI4432_FREQ_OFFSET2,0);
}
@ -1306,9 +1311,8 @@ static const int wfm_modulation[5] = { 0, 190, 118, -118, -190 }; // 5 step wi
deviceRSSI_tage[POINTS_COUNT];
staticfloatold_a=-150;
staticfloatold_a=-150;// cached value to reduce writes to level registers
staticfloatcorrect_RSSI;
systime_tstart_of_sweep_timestamp;
floatperform(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
@ -1428,6 +1432,15 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
// chThdSleepMicroseconds(200);
}
}
// Calculate the RSSI correction for later use
if(MODE_INPUT(setting.mode)&&(i==0||setting.frequency_step!=0)){// only cases where the value can change on 0 point of sweep
correct_RSSI=getSI4432_RSSI_correction()
+get_level_offset()
+get_attenuation()
-get_signal_path_loss()
-setting.offset
+get_frequency_correction(f);
}
// -------------------------------- Acquisition loop for one requested frequency covering spur avoidance and vbwsteps ------------------------
pureRSSI_tRSSI=float_TO_PURE_RSSI(-150.0);
@ -1448,16 +1461,6 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
offs=(int)(offs*actual_rbw_x10/10.0);
lf=(uint32_t)(f+offs);
}
// Calculate the RSSI correction for later use
if(i==0){// only cases where the value can change on 0 point of sweep
correct_RSSI=getSI4432_RSSI_correction();
if(setting.frequency_step!=0)
correct_RSSI+=get_level_offset()
+get_attenuation()
-get_signal_path_loss()
-setting.offset
+get_frequency_correction(f);
}
// --------------- Set all the LO's ------------------------
if(/* MODE_INPUT(setting.mode) && */i>0&&FREQ_IS_CW())// In input mode in zero span mode after first setting of the LO's
@ -1650,7 +1653,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
if(break_on_operation&&operation_requested)// break subscanning if requested