@ -1547,6 +1547,20 @@ static systime_t sweep_elapsed = 0; // Time since fi
staticuint8_tsignal_is_AM=false;
staticuint8_tcheck_for_AM=false;
staticvoidcalculate_static_correction(void)// Calculate the static part of the RSSI correction
{
correct_RSSI=
#ifdef __SI4432__
getSI4432_RSSI_correction()
#endif
-get_signal_path_loss()
+float_TO_PURE_RSSI(
+get_level_offset()
+get_attenuation()
-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;
@ -1580,15 +1594,7 @@ pureRSSI_t perform(bool break_on_operation, int i, uint32_t f, int tracking)
// if (MODE_OUTPUT(setting.mode) && setting.additional_step_delay_us < 500) // Minimum wait time to prevent LO from lockup during output frequency sweep
// setting.additional_step_delay_us = 500;
@ -2284,20 +2290,24 @@ sweep_again: // stay in sweep loop when output mo
redraw_request|=REDRAW_CAL_STATUS;
#ifdef __SI4432__
SI4432_Sel=SI4432_RX;
#if 0 // this should never happen
if(setting.atten_step){
set_switch_transmit();// This should never happen
}else{
set_switch_receive();
}
#endif
dirty=true;// Needed to recalculate the correction factor