diff --git a/plot.c b/plot.c index c5888e0..7239f09 100644 --- a/plot.c +++ b/plot.c @@ -30,8 +30,7 @@ #ifdef __SCROLL__ uint16_t _grid_y = NOSCROLL_GRIDY; -int waterfall = false; -int fullscreen = true; +static int waterfall = false; #endif static void cell_draw_marker_info(int x0, int y0); static void cell_grid_line_info(int x0, int y0); @@ -2290,7 +2289,6 @@ toggle_waterfall(void) _grid_y = SCROLL_GRIDY; ili9341_fill(OFFSETX, HEIGHT_SCROLL, LCD_WIDTH - OFFSETX, HEIGHT_NOSCROLL - HEIGHT_SCROLL, 0); waterfall = true; - fullscreen = false; w_min = (int)min_level; w_max = (int)peakLevel; if (w_max < w_min + 20) @@ -2299,7 +2297,6 @@ toggle_waterfall(void) } else { _grid_y = NOSCROLL_GRIDY; waterfall = false; - fullscreen = true; } request_to_redraw_grid(); } diff --git a/sa_core.c b/sa_core.c index 86d51e6..96e2f6d 100644 --- a/sa_core.c +++ b/sa_core.c @@ -1496,20 +1496,15 @@ pureRSSI_t perform(bool break_on_operation, int i, uint32_t f, int tracking) pureRSSI_t RSSI = float_TO_PURE_RSSI(-150); int t = 0; do { - int offs = 0,sm; - uint32_t lf = (uint32_t)f; - if (vbwSteps > 1) { // Calculate sub steps + uint32_t lf = f; + if (vbwSteps > 1) { // Calculate sub steps + int offs_div10 = (t - (vbwSteps >> 1)) * 500 / 10; // steps of half the rbw + if ((vbwSteps & 1) == 0) // Uneven steps, center + offs_div10+= 250 / 10; // Even, shift half step + int offs = offs_div10 * actual_rbw_x10; if (setting.step_delay_mode == SD_PRECISE) - sm = 250; // steps of a quarter rbw - else - sm = 500; // steps of half the rbw - if (vbwSteps & 1) { // Uneven steps, center - offs = (t - (vbwSteps >> 1)) * sm; - } else { // Even, shift half step - offs = (t - (vbwSteps >> 1)) * sm + sm/2; - } - offs = (int)(offs * actual_rbw_x10/10.0); - lf = (uint32_t)(f + offs); + offs>>=1; // steps of a quarter rbw + lf += offs; } // --------------- Set all the LO's ------------------------ @@ -1523,12 +1518,8 @@ pureRSSI_t perform(bool break_on_operation, int i, uint32_t f, int tracking) if (MODE_HIGH(setting.mode)) local_IF = 0; else { - if (setting.auto_IF) { - if (setting.spur) - local_IF = 433900000; - else - local_IF = 433800000; - } + if (setting.auto_IF) + local_IF = setting.spur ? 433900000 : 433800000; else local_IF = setting.frequency_IF; } diff --git a/ui.c b/ui.c index 3f66690..d47d453 100644 --- a/ui.c +++ b/ui.c @@ -1771,6 +1771,9 @@ leave_ui_mode() // request_to_draw_cells_behind_numeric_input(); // erase_numeric_input(); // } + // Erase bottom area (not redraw on area update) + if (MENU_BUTTON_HEIGHT*MENU_BUTTON_MAX - area_height > 0) + ili9341_fill(LCD_WIDTH-MENU_BUTTON_WIDTH, area_height, MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT*MENU_BUTTON_MAX - area_height, DEFAULT_BG_COLOR); redraw_request|=REDRAW_AREA | REDRAW_FREQUENCY | REDRAW_CAL_STATUS | REDRAW_BATTERY; } @@ -1927,10 +1930,9 @@ ui_mode_normal(void) { if (ui_mode == UI_NORMAL) return; - + leave_ui_mode(); area_width = AREA_WIDTH_NORMAL; area_height = AREA_HEIGHT_NORMAL; - leave_ui_mode(); ui_mode = UI_NORMAL; }