diff --git a/main.c b/main.c index d8b9ac3..d8baa66 100644 --- a/main.c +++ b/main.c @@ -993,9 +993,9 @@ config_t config = { .high_correction_frequency = { 240000000, 280000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000, 960000000 }, .high_correction_value = { 0, 0, 0, 0, 0.0, 0, 0, 0, 0, 0 }, .setting_frequency_10mhz = 10000000, - .cor_am = -8, - .cor_wfm = -15, - .cor_nfm = -15, + .cor_am = -10, + .cor_wfm = -18, + .cor_nfm = -18, .ext_zero_level = 128, #endif #ifdef TINYSA4 @@ -1012,7 +1012,7 @@ config_t config = { .high_correction_frequency = { 10000, 100000, 200000, 500000, 50000000, 140000000, 200000000, 300000000, 330000000, 350000000 }, .high_correction_value = { 0, 0, 0, 0, 0.0, 0, 0, 0, 0, 0 }, .setting_frequency_30mhz = 30000000, - .cor_am = -5, + .cor_am = -14, .cor_wfm = -55, .cor_nfm = -55, .ultra = false, diff --git a/sa_core.c b/sa_core.c index f5de274..612ab10 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2365,7 +2365,8 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) / a = -31.5; a = -a; #ifdef __PE4302__ - PE4302_Write_Byte((int)(a * 2) ); + setting.attenuate_x2 = (int)(a * 2); + PE4302_Write_Byte(setting.attenuate_x2); #endif } } diff --git a/ui_sa.c b/ui_sa.c index e8a15c9..c6dc22d 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -872,6 +872,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_measure_acb) switch(data) { case M_OFF: // Off // reset_settings(setting.mode); + no_measurement: set_measurement(M_OFF); break; case M_IMD: // IMD @@ -986,9 +987,9 @@ static UI_FUNCTION_ADV_CALLBACK(menu_measure_acb) // break; span = uistat.value; #ifdef TINYSA4 - set_RBW(span/300); +// set_RBW(span/300); #endif - set_sweep_frequency(ST_SPAN, span * 10); + set_sweep_frequency(ST_SPAN, span * 5); // update_frequencies(); // To ensure markers are positioned right!!!!!! set_measurement(M_AM); #ifndef TINYSA4 @@ -1008,13 +1009,17 @@ static UI_FUNCTION_ADV_CALLBACK(menu_measure_acb) kp_help_text = "Frequency of signal"; ui_mode_keypad(KM_CENTER); set_marker_frequency(0, uistat.value); +#ifdef TINYSA4 + kp_help_text = "Modulation frequency: 1 .. 10kHz"; + ui_mode_keypad(KM_SPAN); + if (uistat.value < 1000 || uistat.value > 10000) + goto no_measurement; + set_RBW(uistat.value/100); +#else kp_help_text = "Modulation frequency: 1 .. 2.5kHz"; ui_mode_keypad(KM_SPAN); if (uistat.value < 1000 || uistat.value > 2500) - break; -#ifdef TINYSA4 - set_RBW(uistat.value/300); -#else + goto no_measurement; set_RBW(uistat.value/100); #endif // actual_rbw_x10