From 9fad7306645e2d9d0ca35a10a454b558cd2449dc Mon Sep 17 00:00:00 2001 From: DiSlord Date: Fri, 3 Jul 2020 00:28:25 +0300 Subject: [PATCH] More correct detect start time (for vbw) --- sa_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa_core.c b/sa_core.c index 4713e3b..d806ee6 100644 --- a/sa_core.c +++ b/sa_core.c @@ -1526,7 +1526,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M correct_RSSI = get_level_offset()+ get_attenuation() - signal_path_loss - setting.offset + get_frequency_correction(f); // calcuate the RSSI correction for later use wait: - if (i == 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) start_of_sweep_timestamp = chVTGetSystemTimeX(); // initialize start sweep time subRSSI = SI4432_RSSI(lf, MODE_SELECT(setting.mode)) + correct_RSSI ; // Get RSSI, either from pre-filled buffer or by reading SI4432 RSSI