perform() now also sets up the first point when the frequency step changed,
not only when dirty: the part that depends on the step (RBW and its
sub-steps, step delay, RSSI correction of the RBW, sweep time estimate) for
a new step, the hardware (radios, switches, MCU clock, correction tables)
only when dirty. scanraw no longer sets dirty itself, so it skips the
hardware setup (the basic power cycles and re-initializes both SI4432,
about 80 ms) and the redraw that its dirty caused after it. Zero span keeps
dirty: its series of RSSI samples needs the full setup at its frequency. A
single zero span point is measured as in a sweep, with a step of half the
RBW, instead of filling the RSSI buffer of a whole zero span sweep (40 ms
on the Ultra).
staticfreq_tsetup_frequency_step;// frequency step the first point of perform() was set up for
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
{
@ -3735,7 +3736,11 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
}
#endif
TRACE(10);
if(i==0&&dirty){// if first point in scan and dirty
// First point after a change of settings (dirty) or of the frequency step (scanraw, the sweep
// after it): only dirty sets up the hardware, which takes about 80 ms on the tinySA basic
// Change actual sweep time as user input if it greater minimum
@ -3782,15 +3789,17 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
if(MODE_INPUT(setting.mode)){
calculate_static_correction();
#ifdef __MCU_CLOCK_SHIFT__
if(!in_selftest)clock_above_48MHz();
is_below=false;
if(hw){
if(!in_selftest)clock_above_48MHz();
is_below=false;
}
#endif
correct_RSSI_freq=get_frequency_correction(f);// for i == 0 and freq_step == 0;
#ifdef TINYSA4
// correct_RSSI_freq += float_TO_PURE_RSSI(direct ? +6.0 : 0); // TODO add impact of direct
#endif
}else{
}elseif(hw){
#ifdef __MCU_CLOCK_SHIFT__
clock_at_48MHz();
#endif
@ -3847,7 +3856,7 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_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;
// Update grid and status after
if(break_on_operation &&MODE_INPUT(setting.mode)){// during normal operation
if(hw &&break_on_operation &&MODE_INPUT(setting.mode)){// during normal operation