Small speed improvements in zero span mode

tinySA-v0.2
erikkaashoek 6 years ago
parent 58e2dd8dfb
commit 1eb94c4f9c

@ -1062,22 +1062,31 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking)
float RSSI = -150.0; float RSSI = -150.0;
int t = 0; int t = 0;
do { // ------------- Acquisition loop ---------- do { // ------------- Acquisition loop ----------
int offs,sm; int offs = 0,sm;
if (setting.step_delay == 1) uint32_t lf = (uint32_t)f;
sm = 250; // steps of a quarter rbw if (vbwSteps > 1) { // Calculate sub steps
else if (setting.step_delay == 1)
sm = 500; // steps of half the rbw sm = 250; // steps of a quarter rbw
if (vbwSteps & 1) { // Uneven steps, center else
offs = (t - (vbwSteps >> 1)) * sm; sm = 500; // steps of half the rbw
} else { // Even, shift half step if (vbwSteps & 1) { // Uneven steps, center
offs = (t - (vbwSteps >> 1)) * sm + sm/2; offs = (t - (vbwSteps >> 1)) * sm;
} else { // Even, shift half step
offs = (t - (vbwSteps >> 1)) * sm + sm/2;
}
offs = (int)(offs * actual_rbw);
lf = (uint32_t)(f + offs);
} }
offs = (int)(offs * actual_rbw);
uint32_t lf = (uint32_t)(f + offs); // --------------- Set all the LO's ------------------------
#ifdef __SPUR__ #ifdef __SPUR__
float spur_RSSI = 0; float spur_RSSI = 0;
again: again:
#endif #endif
if (i > 0 && FREQ_IS_CW())
goto skip_LO_setting;
if (setting.mode == M_LOW && tracking) { // Measure BPF if (setting.mode == M_LOW && tracking) { // Measure BPF
set_freq (0, setting.frequency_IF + lf - reffer_freq[setting.refer]); // Offset so fundamental of reffer is visible set_freq (0, setting.frequency_IF + lf - reffer_freq[setting.refer]); // Offset so fundamental of reffer is visible
local_IF = setting.frequency_IF ; local_IF = setting.frequency_IF ;
@ -1148,7 +1157,13 @@ again:
} }
if (MODE_OUTPUT(setting.mode)) // No substepping and no RSSI in output mode if (MODE_OUTPUT(setting.mode)) // No substepping and no RSSI in output mode
return(0); return(0);
// ---------------- Prepare RSSI ----------------------
float signal_path_loss; float signal_path_loss;
skip_LO_setting:
#ifdef __ULTRA__ #ifdef __ULTRA__
if (setting.mode == M_ULTRA) if (setting.mode == M_ULTRA)
signal_path_loss = -15; // Loss in dB, -9.5 for v0.1, -12.5 for v0.2 signal_path_loss = -15; // Loss in dB, -9.5 for v0.1, -12.5 for v0.2

Loading…
Cancel
Save

Powered by TurnKey Linux.