diff --git a/sa_core.c b/sa_core.c index c9d7ad9..090d55a 100644 --- a/sa_core.c +++ b/sa_core.c @@ -1578,7 +1578,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M t_mode = T_UP_MASK; else t_mode = T_DOWN_MASK; - + uint32_t count = 32; uint32_t additional_delay = 0;// reduce noise if (setting.sweep_time_us >= 100*ONE_MS_TIME) additional_delay = 20; do{ // wait for trigger to happen @@ -1591,6 +1591,11 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M data_level = ((data_level<<1) | (pureRSSI < trigger_lvl ? T_LEVEL_BELOW : T_LEVEL_ABOVE))&(T_LEVEL_CLEAN); if (data_level == t_mode) // wait trigger break; + // DIRTY HACK!!! FIX ME HERE + // not get data after dirty = true apply in code at first run!!!! + if (pureRSSI == 0 && --count == 0) + break; + if (additional_delay) my_microsecond_delay(additional_delay); }while(1);