From 4925e008a92f07ace34897a0db11b2937279b7af Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sun, 5 Jul 2020 20:49:59 +0300 Subject: [PATCH] More faster exit on user input --- sa_core.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sa_core.c b/sa_core.c index a65d555..b4c1ca9 100644 --- a/sa_core.c +++ b/sa_core.c @@ -1673,6 +1673,13 @@ sweep_again: // stay in sweep loop when output mo // --------------------- measure ------------------------- RSSI = perform(break_on_operation, i, frequencies[i], setting.tracking); // Measure RSSI for one of the frequencies + // if break back to top level to handle ui operation + if (break_on_operation && operation_requested) { // break loop if needed + if (setting.actual_sweep_time_us > ONE_SECOND_TIME && MODE_INPUT(setting.mode)) { + ili9341_fill(OFFSETX, HEIGHT_NOSCROLL+1, WIDTH, 1, 0); // Erase progress bar + } + return false; + } // Delay between points if needed, (all delays can apply in SI4432 fill) if (setting.measure_sweep_time_us == 0){ // If not already in buffer @@ -1684,14 +1691,6 @@ sweep_again: // stay in sweep loop when output mo } } - // if break back to top level to handle ui operation - if (break_on_operation && operation_requested) { // break loop if needed - if (setting.actual_sweep_time_us > ONE_SECOND_TIME && MODE_INPUT(setting.mode)) { - ili9341_fill(OFFSETX, HEIGHT_NOSCROLL+1, WIDTH, 1, 0); // Erase progress bar - } - return false; - } - if (MODE_INPUT(setting.mode)) { if (setting.actual_sweep_time_us > ONE_SECOND_TIME && (i & 0x07) == 0) { // if required