diff --git a/sa_core.c b/sa_core.c index 2ff7a07..051e59c 100644 --- a/sa_core.c +++ b/sa_core.c @@ -551,7 +551,7 @@ void set_harmonic(int h) void set_step_delay(int d) // override RSSI measurement delay or set to one of three auto modes { - if ((3 <= d && d < 300) || d > 30000) // values 0 (normal scan), 1 (precise scan) and 2(fast scan) have special meaning and are auto calculated + if ((3 <= d && d < 250) || d > 30000) // values 0 (normal scan), 1 (precise scan) and 2(fast scan) have special meaning and are auto calculated return; if (d <3) { setting.step_delay_mode = d; @@ -809,7 +809,7 @@ void calculate_step_delay(void) SI4432_step_delay = 0; } else { #if 1 // Table for double offset delay - if (actual_rbw_x10 >= 1910) { SI4432_step_delay = 280; SI4432_offset_delay = 100; } + if (actual_rbw_x10 >= 1910) { SI4432_step_delay = 300; SI4432_offset_delay = 100; } else if (actual_rbw_x10 >= 1420) { SI4432_step_delay = 350; SI4432_offset_delay = 100; } else if (actual_rbw_x10 >= 750) { SI4432_step_delay = 450; SI4432_offset_delay = 100; } else if (actual_rbw_x10 >= 560) { SI4432_step_delay = 650; SI4432_offset_delay = 100; } @@ -3215,12 +3215,14 @@ void calibrate(void) { #ifdef __CALIBRATE__ int local_test_status; + int old_sweep_points = setting._sweep_points; in_selftest = true; reset_calibration(); reset_settings(M_LOW); int i = 11; // calibrate low mode power on 30 MHz; for (int j= 0; j < CALIBRATE_RBWS; j++ ) { - set_RBW(power_rbw[j]); +// set_RBW(power_rbw[j]); +// set_sweep_points(21); test_prepare(i); setting.step_delay_mode = SD_PRECISE; setting.agc = S_OFF; @@ -3273,6 +3275,7 @@ quit: ili9341_drawstring_7x13("Touch screen to continue", 30, 140); wait_user(); ili9341_clear_screen(); + set_sweep_points(old_sweep_points); in_selftest = false; sweep_mode = SWEEP_ENABLE; diff --git a/ui_sa.c b/ui_sa.c index 0bf91e5..d089818 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -1176,7 +1176,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_outputmode_acb) draw_menu(); } -static const uint16_t points_setting[] = {145, 290, -1}; +static const uint16_t points_setting[] = {51, 101, 145, 290, -1}; static UI_FUNCTION_ADV_CALLBACK(menu_points_acb){ (void)item; if(b){ @@ -1496,15 +1496,17 @@ static const menuitem_t menu_scanning_speed[] = // { MT_ADV_CALLBACK, SD_PRECISE, PRECISE", menu_scanning_speed_acb}, // { MT_ADV_CALLBACK | MT_LOW,SD_FAST, "FAST", menu_scanning_speed_acb}, // { MT_KEYPAD | MT_LOW,KM_FAST_SPEEDUP, "FAST\nSPEEDUP", "2..20"}, - { MT_KEYPAD, KM_SAMPLETIME, "SAMPLE\nDELAY", "300..30000"}, // This must be item 4 to match highlighting - { MT_KEYPAD, KM_OFFSET_DELAY, "OFFSET\nDELAY", "300..30000"}, // This must be item 5 to match highlighting - { MT_CANCEL, 0, S_LARROW" BACK", NULL }, + { MT_KEYPAD, KM_SAMPLETIME, "SAMPLE\nDELAY", "250..10000, 0=auto"}, // This must be item 4 to match highlighting + { MT_KEYPAD, KM_OFFSET_DELAY, "OFFSET\nDELAY", "250..10000, 0=auto"}, // This must be item 5 to match highlighting + { MT_CANCEL, 0, "\032 BACK", NULL }, { MT_NONE, 0, NULL, NULL } // sentinel }; static const menuitem_t menu_sweep_points[] = { - { MT_ADV_CALLBACK, 0, "145 point", menu_points_acb }, - { MT_ADV_CALLBACK, 1, "290 point", menu_points_acb }, + { MT_ADV_CALLBACK, 0, " 51 point", menu_points_acb }, + { MT_ADV_CALLBACK, 1, "101 point", menu_points_acb }, + { MT_ADV_CALLBACK, 2, "145 point", menu_points_acb }, + { MT_ADV_CALLBACK, 3, "290 point", menu_points_acb }, { MT_CANCEL, 0, S_LARROW" BACK", NULL }, { MT_NONE, 0, NULL, NULL } // sentinel };