Remove variable

pull/4/head
DiSlord 6 years ago
parent 324e543877
commit 27e77e45f8

@ -1533,7 +1533,6 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
register uint16_t t_mode; register uint16_t t_mode;
uint16_t trigger_lvl; uint16_t trigger_lvl;
uint16_t data_level = T_LEVEL_UNDEF; uint16_t data_level = T_LEVEL_UNDEF;
int old_SI4432_step_delay = SI4432_step_delay;
if (i == 0 && setting.frequency_step == 0 && setting.trigger != T_AUTO) { // if in zero span mode and wait for trigger to happen and NOT in trigger mode if (i == 0 && setting.frequency_step == 0 && setting.trigger != T_AUTO) { // if in zero span mode and wait for trigger to happen and NOT in trigger mode
wait_for_trigger = true; // signal the wait for trigger wait_for_trigger = true; // signal the wait for trigger
// Calculate trigger level // Calculate trigger level
@ -1543,7 +1542,6 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
t_mode = (T_LEVEL_BELOW<<1)|T_LEVEL_ABOVE; // from bottom to up t_mode = (T_LEVEL_BELOW<<1)|T_LEVEL_ABOVE; // from bottom to up
else else
t_mode = (T_LEVEL_ABOVE<<1)|T_LEVEL_BELOW; // from up to bottom t_mode = (T_LEVEL_ABOVE<<1)|T_LEVEL_BELOW; // from up to bottom
SI4432_step_delay = 0;
} }
if (i == 0 && t == 0) // if first point in scan (here is get 1 point data) if (i == 0 && t == 0) // if first point in scan (here is get 1 point data)
@ -1565,7 +1563,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
if (data_level != t_mode) // trigger level change if (data_level != t_mode) // trigger level change
continue; // get next rssi continue; // get next rssi
#ifdef __FAST_SWEEP__ #ifdef __FAST_SWEEP__
if (setting.spur == 0 && old_SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) { if (setting.spur == 0 && SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) {
SI4432_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer SI4432_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer
} }
#endif #endif
@ -1575,7 +1573,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
} }
else else
pureRSSI = SI4432_RSSI(lf, MODE_SELECT(setting.mode)); // Get RSSI, either from pre-filled buffer or by reading SI4432 RSSI need divide on 32!! pureRSSI = SI4432_RSSI(lf, MODE_SELECT(setting.mode)); // Get RSSI, either from pre-filled buffer or by reading SI4432 RSSI need divide on 32!!
SI4432_step_delay = old_SI4432_step_delay;
float subRSSI = pureRSSI / 32.0; float subRSSI = pureRSSI / 32.0;
// add correction // add correction
subRSSI+=correct_RSSI; subRSSI+=correct_RSSI;

Loading…
Cancel
Save

Powered by TurnKey Linux.