|
|
|
@ -2272,15 +2272,24 @@ int invoke_quick_menu(int y)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#define YSTEP 8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int add_quick_menu(char *buf, int x, int y, menuitem_t *menu)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
if (max_quick_menu<MAX_QUICK_MENU-1) {
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = menu;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return y;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void draw_cal_status(void)
|
|
|
|
void draw_cal_status(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#define BLEN 7
|
|
|
|
#define BLEN 7
|
|
|
|
char buf[BLEN+1];
|
|
|
|
char buf[BLEN+1];
|
|
|
|
buf[6]=0;
|
|
|
|
buf[6]=0;
|
|
|
|
#define YSTEP 8
|
|
|
|
|
|
|
|
int x = 0;
|
|
|
|
int x = 0;
|
|
|
|
int y = OFFSETY;
|
|
|
|
int y = OFFSETY;
|
|
|
|
unsigned int color;
|
|
|
|
unsigned int color;
|
|
|
|
@ -2312,10 +2321,7 @@ void draw_cal_status(void)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_reflevel);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_reflevel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Unit
|
|
|
|
// Unit
|
|
|
|
#if 0
|
|
|
|
#if 0
|
|
|
|
@ -2327,11 +2333,7 @@ void draw_cal_status(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
plot_printf(buf, BLEN, "%s%s",unit_scale_text[setting.unit_scale_index], unit);
|
|
|
|
plot_printf(buf, BLEN, "%s%s",unit_scale_text[setting.unit_scale_index], unit);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_unit);
|
|
|
|
|
|
|
|
|
|
|
|
y += YSTEP + YSTEP/2;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_unit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Scale
|
|
|
|
// Scale
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
@ -2349,10 +2351,7 @@ void draw_cal_status(void)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
plot_printf(buf, BLEN, "%.2F/",setting.scale);
|
|
|
|
plot_printf(buf, BLEN, "%.2F/",setting.scale);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)KM_SCALE);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)KM_SCALE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Trigger status
|
|
|
|
// Trigger status
|
|
|
|
if (is_paused()) {
|
|
|
|
if (is_paused()) {
|
|
|
|
@ -2387,10 +2386,7 @@ void draw_cal_status(void)
|
|
|
|
ili9341_drawstring("Atten:", x, y);
|
|
|
|
ili9341_drawstring("Atten:", x, y);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%.2FdB", get_attenuation());
|
|
|
|
plot_printf(buf, BLEN, "%.2FdB", get_attenuation());
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_atten);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_atten;
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// Calc
|
|
|
|
// Calc
|
|
|
|
@ -2399,10 +2395,7 @@ void draw_cal_status(void)
|
|
|
|
ili9341_drawstring("Calc:", x, y);
|
|
|
|
ili9341_drawstring("Calc:", x, y);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%s",averageText[setting.average]);
|
|
|
|
plot_printf(buf, BLEN, "%s",averageText[setting.average]);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_average);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_average;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Spur
|
|
|
|
// Spur
|
|
|
|
#ifdef __SPUR__
|
|
|
|
#ifdef __SPUR__
|
|
|
|
@ -2410,31 +2403,20 @@ void draw_cal_status(void)
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Spur:", x, y);
|
|
|
|
ili9341_drawstring("Spur:", x, y);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "ON");
|
|
|
|
y = add_quick_menu("ON", x, y, (menuitem_t *)menu_stimulus);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_stimulus;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (setting.mirror_masking) {
|
|
|
|
if (setting.mirror_masking) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Mask:", x, y);
|
|
|
|
ili9341_drawstring("Mask:", x, y);
|
|
|
|
|
|
|
|
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "ON");
|
|
|
|
y = add_quick_menu("ON", x, y, (menuitem_t *)menu_stimulus);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_stimulus;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if (setting.subtract_stored) {
|
|
|
|
if (setting.subtract_stored) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Norm.", x, y);
|
|
|
|
y = add_quick_menu("Norm.", x, y, (menuitem_t *)menu_storage);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_storage;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// RBW
|
|
|
|
// RBW
|
|
|
|
@ -2447,10 +2429,7 @@ void draw_cal_status(void)
|
|
|
|
ili9341_drawstring("RBW:", x, y);
|
|
|
|
ili9341_drawstring("RBW:", x, y);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%.1FkHz", actual_rbw_x10/10.0);
|
|
|
|
plot_printf(buf, BLEN, "%.1FkHz", actual_rbw_x10/10.0);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_rbw);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_rbw;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if 0
|
|
|
|
// VBW
|
|
|
|
// VBW
|
|
|
|
@ -2488,10 +2467,7 @@ void draw_cal_status(void)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.actual_sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.actual_sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_sweep_speed);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_sweep_speed;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
@ -2514,10 +2490,7 @@ void draw_cal_status(void)
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%dMHz",reffer_freq[setting.refer]/1000000);
|
|
|
|
plot_printf(buf, BLEN, "%dMHz",reffer_freq[setting.refer]/1000000);
|
|
|
|
buf[6]=0;
|
|
|
|
buf[6]=0;
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_reffer);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_reffer;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Offset
|
|
|
|
// Offset
|
|
|
|
@ -2526,10 +2499,7 @@ void draw_cal_status(void)
|
|
|
|
ili9341_drawstring("Amp:", x, y);
|
|
|
|
ili9341_drawstring("Amp:", x, y);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%.1fdB",setting.offset);
|
|
|
|
plot_printf(buf, BLEN, "%.1fdB",setting.offset);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)KM_OFFSET);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)KM_OFFSET;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Repeat
|
|
|
|
// Repeat
|
|
|
|
@ -2539,10 +2509,7 @@ void draw_cal_status(void)
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%d",setting.repeat);
|
|
|
|
plot_printf(buf, BLEN, "%d",setting.repeat);
|
|
|
|
buf[6]=0;
|
|
|
|
buf[6]=0;
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)KM_REPEAT);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)KM_REPEAT;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Trigger
|
|
|
|
// Trigger
|
|
|
|
@ -2560,10 +2527,7 @@ void draw_cal_status(void)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
plot_printf(buf, BLEN, "%.4F", value(setting.trigger_level));
|
|
|
|
plot_printf(buf, BLEN, "%.4F", value(setting.trigger_level));
|
|
|
|
// plot_printf(buf, BLEN, "%4f", value(setting.trigger_level)/setting.unit_scale);
|
|
|
|
// plot_printf(buf, BLEN, "%4f", value(setting.trigger_level)/setting.unit_scale);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_trigger);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
|
|
|
|
quick_menu[max_quick_menu++] = (menuitem_t *)menu_trigger;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Mode
|
|
|
|
// Mode
|
|
|
|
|