diff --git a/main.c b/main.c index 2fe87af..c1d834b 100644 --- a/main.c +++ b/main.c @@ -1345,7 +1345,7 @@ static void set_frequencies(freq_t start, freq_t stop, uint16_t points) { #ifdef __BANDS__ - if (setting.multi_band) { + if (setting.multi_band && !setting.multi_trace) { freq_t span = 0; for (int i=0; i= POINTS_COUNT) idx = POINTS_COUNT-1; int b = _f_band_index[idx]; @@ -1402,7 +1402,7 @@ freq_t getFrequency(uint16_t idx) { #ifdef __BANDS__ int getBand(uint16_t idx) { - if (setting.multi_band) + if (setting.multi_band && !setting.multi_trace) return _f_band_index[idx]; return 0; } @@ -1495,12 +1495,21 @@ freq_t get_sweep_frequency(int type) { #ifdef __BANDS__ - if (setting.multi_band) { + if (setting.multi_band && !setting.multi_trace) { switch (type) { case ST_START: return getFrequency(0); case ST_STOP: return getFrequency(sweep_points); case ST_CENTER: return (getFrequency(sweep_points) + getFrequency(0))/2; - case ST_SPAN: return (getFrequency(sweep_points) - getFrequency(0))/2; + case ST_SPAN: + { + freq_t span = 0; + for (int i=0; i BANDS_MAX) @@ -4897,9 +4897,9 @@ static bool sweep(bool break_on_operation) last_band = current_band; set_sweep_frequency(ST_START, setting.bands[current_band].start); set_sweep_frequency(ST_STOP, setting.bands[current_band].end); - set_step_delay(SD_FAST); - set_rbw(8000); - set_sweep_points((setting.bands[current_band].end - setting.bands[current_band].start) / 800000); +// set_step_delay(SD_FAST); +// set_rbw(8000); +// set_sweep_points((setting.bands[current_band].end - setting.bands[current_band].start) / 800000); setting.trigger_level = setting.bands[current_band].level; setting.auto_attenuation = false; } diff --git a/ui.c b/ui.c index 5be9704..468b029 100644 --- a/ui.c +++ b/ui.c @@ -3199,6 +3199,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_band_select_acb) active_band = data; setting.bands[active_band].enabled = true; dirty = true; + update_grid(); // BANDs_update(); menu_push_submenu(menu_band_modify); } @@ -3217,6 +3218,19 @@ static UI_FUNCTION_ADV_CALLBACK(menu_multi_band_acb) if (setting.multi_band) menu_push_submenu(menu_band_select); } +static UI_FUNCTION_ADV_CALLBACK(menu_multi_trace_acb) +{ + (void)item; + (void)data; + if(b){ + b->icon = (setting.multi_trace?BUTTON_ICON_CHECK:BUTTON_ICON_NOCHECK) ; + return; + } + dirty = true; + setting.multi_trace = ! setting.multi_trace; + redraw_request|= REDRAW_AREA | REDRAW_FREQUENCY | REDRAW_CAL_STATUS; +} + # #endif @@ -3358,6 +3372,7 @@ static UI_FUNCTION_CALLBACK(menu_BAND_disable_cb) if (active_band