Improved timing and more sweep point options

pull/4/head
erikkaashoek 5 years ago
commit ad2f8d363a

@ -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 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; return;
if (d <3) { if (d <3) {
setting.step_delay_mode = d; setting.step_delay_mode = d;
@ -809,7 +809,7 @@ void calculate_step_delay(void)
SI4432_step_delay = 0; SI4432_step_delay = 0;
} else { } else {
#if 1 // Table for double offset delay #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 >= 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 >= 750) { SI4432_step_delay = 450; SI4432_offset_delay = 100; }
else if (actual_rbw_x10 >= 560) { SI4432_step_delay = 650; 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__ #ifdef __CALIBRATE__
int local_test_status; int local_test_status;
int old_sweep_points = setting._sweep_points;
in_selftest = true; in_selftest = true;
reset_calibration(); reset_calibration();
reset_settings(M_LOW); reset_settings(M_LOW);
int i = 11; // calibrate low mode power on 30 MHz; int i = 11; // calibrate low mode power on 30 MHz;
for (int j= 0; j < CALIBRATE_RBWS; j++ ) { 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); test_prepare(i);
setting.step_delay_mode = SD_PRECISE; setting.step_delay_mode = SD_PRECISE;
setting.agc = S_OFF; setting.agc = S_OFF;
@ -3273,6 +3275,7 @@ quit:
ili9341_drawstring_7x13("Touch screen to continue", 30, 140); ili9341_drawstring_7x13("Touch screen to continue", 30, 140);
wait_user(); wait_user();
ili9341_clear_screen(); ili9341_clear_screen();
set_sweep_points(old_sweep_points);
in_selftest = false; in_selftest = false;
sweep_mode = SWEEP_ENABLE; sweep_mode = SWEEP_ENABLE;

@ -1176,7 +1176,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_outputmode_acb)
draw_menu(); 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){ static UI_FUNCTION_ADV_CALLBACK(menu_points_acb){
(void)item; (void)item;
if(b){ 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, SD_PRECISE, PRECISE", menu_scanning_speed_acb},
// { MT_ADV_CALLBACK | MT_LOW,SD_FAST, "FAST", 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 | 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_SAMPLETIME, "SAMPLE\nDELAY", "250..10000, 0=auto"}, // 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_KEYPAD, KM_OFFSET_DELAY, "OFFSET\nDELAY", "250..10000, 0=auto"}, // This must be item 5 to match highlighting
{ MT_CANCEL, 0, S_LARROW" BACK", NULL }, { MT_CANCEL, 0, "\032 BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
static const menuitem_t menu_sweep_points[] = { static const menuitem_t menu_sweep_points[] = {
{ MT_ADV_CALLBACK, 0, "145 point", menu_points_acb }, { MT_ADV_CALLBACK, 0, " 51 point", menu_points_acb },
{ MT_ADV_CALLBACK, 1, "290 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_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.