|
|
|
@ -3201,9 +3201,8 @@ int invoke_quick_menu(int y)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#define YSTEP 8
|
|
|
|
#define YSTEP 8
|
|
|
|
|
|
|
|
|
|
|
|
int add_quick_menu(char *buf, int x, int y, menuitem_t *menu)
|
|
|
|
int add_quick_menu(int y, menuitem_t *menu)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP*item_space/2 + YSTEP;
|
|
|
|
y += YSTEP*item_space/2 + YSTEP;
|
|
|
|
if (max_quick_menu<MAX_QUICK_MENU-1) {
|
|
|
|
if (max_quick_menu<MAX_QUICK_MENU-1) {
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
quick_menu_y[max_quick_menu] = y;
|
|
|
|
@ -3232,10 +3231,8 @@ redraw_cal_status:
|
|
|
|
if (MODE_OUTPUT(setting.mode)) { // No cal status during output
|
|
|
|
if (MODE_OUTPUT(setting.mode)) { // No cal status during output
|
|
|
|
#ifdef TINYSA4
|
|
|
|
#ifdef TINYSA4
|
|
|
|
if (level_error) {
|
|
|
|
if (level_error) {
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_RED);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_drawstring("LEVEL\nERROR", 0 , 80);
|
|
|
|
ili9341_drawstring("LEVEL", 0 , 80);
|
|
|
|
|
|
|
|
ili9341_drawstring("ERROR", 0 , 90);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@ -3244,21 +3241,21 @@ redraw_cal_status:
|
|
|
|
// if (current_menu_is_form() && !in_selftest)
|
|
|
|
// if (current_menu_is_form() && !in_selftest)
|
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
|
|
ili9341_set_background(LCD_BG_COLOR);
|
|
|
|
//ili9341_set_background(LCD_BG_COLOR);
|
|
|
|
|
|
|
|
|
|
|
|
float yMax = setting.reflevel;
|
|
|
|
float yMax = setting.reflevel;
|
|
|
|
// Ref level
|
|
|
|
|
|
|
|
if (rounding)
|
|
|
|
|
|
|
|
plot_printf(buf, BLEN, "%+4d", (int)yMax);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
plot_printf(buf, BLEN, "%+4.3F", (yMax/setting.unit_scale));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (level_is_calibrated())
|
|
|
|
if (level_is_calibrated())
|
|
|
|
color = setting.auto_reflevel ? LCD_FG_COLOR : LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
color = setting.auto_reflevel ? LCD_FG_COLOR : LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_reflevel);
|
|
|
|
// Ref level
|
|
|
|
|
|
|
|
if (rounding)
|
|
|
|
|
|
|
|
lcd_printf(x, y, "%+4d", (int)yMax);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
lcd_printf(x, y, "%+4.3F", (yMax/setting.unit_scale));
|
|
|
|
|
|
|
|
y = add_quick_menu(y, (menuitem_t *)menu_reflevel);
|
|
|
|
|
|
|
|
|
|
|
|
// Unit
|
|
|
|
// Unit
|
|
|
|
#if 0
|
|
|
|
#if 0
|
|
|
|
@ -3269,44 +3266,40 @@ redraw_cal_status:
|
|
|
|
ili9341_drawstring("AUTO", x, y);
|
|
|
|
ili9341_drawstring("AUTO", x, y);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
plot_printf(buf, BLEN, "%c%s",unit_scale_text[setting.unit_scale_index], unit);
|
|
|
|
lcd_printf(x, y, "%c%s", unit_scale_text[setting.unit_scale_index], unit);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_unit);
|
|
|
|
y = add_quick_menu(y, (menuitem_t *)menu_unit);
|
|
|
|
|
|
|
|
|
|
|
|
// Scale
|
|
|
|
// Scale
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
ili9341_set_foreground(LCD_FG_COLOR);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
#if 1
|
|
|
|
unsigned int i = 0;
|
|
|
|
unsigned int i = 0;
|
|
|
|
while (i < ARRAY_COUNT(scale_value)) {
|
|
|
|
while (i < ARRAY_COUNT(scale_value)) {
|
|
|
|
float t = (setting.scale/setting.unit_scale) / scale_value[i];
|
|
|
|
float t = (setting.scale/setting.unit_scale) / scale_value[i];
|
|
|
|
if (t > 0.9 && t < 1.1){
|
|
|
|
if (t > 0.9 && t < 1.1){
|
|
|
|
plot_printf(buf, BLEN, "%s%c/",scale_vtext[i],unit_scale_text[setting.unit_scale_index]);
|
|
|
|
lcd_printf(x, y, "%s%c/",scale_vtext[i],unit_scale_text[setting.unit_scale_index]);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
plot_printf(buf, BLEN, "%.2F/",setting.scale);
|
|
|
|
lcd_printf(x, y, "%.2F/",setting.scale);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)KM_SCALE);
|
|
|
|
y = add_quick_menu(y, (menuitem_t *)KM_SCALE);
|
|
|
|
|
|
|
|
|
|
|
|
// Trigger status
|
|
|
|
// Trigger status
|
|
|
|
if (is_paused()) {
|
|
|
|
if (is_paused()) {
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
ili9341_drawstring("PAUSED", x, y);
|
|
|
|
ili9341_drawstring("PAUSED", x, y);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (setting.trigger == T_SINGLE || setting.trigger == T_NORMAL ) {
|
|
|
|
if (setting.trigger == T_SINGLE || setting.trigger == T_NORMAL ) {
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
ili9341_drawstring("ARMED", x, y);
|
|
|
|
ili9341_drawstring("ARMED", x, y);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// AM warning
|
|
|
|
// AM warning
|
|
|
|
if (signal_is_AM) {
|
|
|
|
if (signal_is_AM) {
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_RED);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
ili9341_drawstring("AM", x, y);
|
|
|
|
ili9341_drawstring("AM", x, y);
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -3315,66 +3308,42 @@ redraw_cal_status:
|
|
|
|
|
|
|
|
|
|
|
|
// if (setting.mode == M_LOW) {
|
|
|
|
// if (setting.mode == M_LOW) {
|
|
|
|
// Attenuation
|
|
|
|
// Attenuation
|
|
|
|
if (setting.auto_attenuation)
|
|
|
|
ili9341_set_foreground(setting.auto_attenuation ? LCD_BRIGHT_COLOR_GREEN : LCD_FG_COLOR);
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
lcd_printf(x, y, "Atten:\n%4.2FdB", get_attenuation());
|
|
|
|
else
|
|
|
|
y = add_quick_menu(y+= YSTEP, (menuitem_t *)menu_atten);
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
ili9341_drawstring("Atten:", x, y);
|
|
|
|
|
|
|
|
y += YSTEP;
|
|
|
|
|
|
|
|
plot_printf(buf, BLEN, "%.2FdB", get_attenuation());
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_atten);
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// Calc
|
|
|
|
// Calc
|
|
|
|
if (setting.average>0) {
|
|
|
|
if (setting.average>0) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Calc:", x, y);
|
|
|
|
lcd_printf(x, y, "Calc:\n%s", averageText[setting.average]);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+= YSTEP, (menuitem_t *)menu_average);
|
|
|
|
plot_printf(buf, BLEN, "%s",averageText[setting.average]);
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_average);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Spur
|
|
|
|
// Spur
|
|
|
|
#ifdef __SPUR__
|
|
|
|
#ifdef __SPUR__
|
|
|
|
if (setting.spur_removal != S_OFF) {
|
|
|
|
if (setting.spur_removal != S_OFF) {
|
|
|
|
if (setting.spur_removal == S_ON)
|
|
|
|
ili9341_set_foreground(setting.spur_removal == S_ON ? LCD_BRIGHT_COLOR_GREEN : LCD_FG_COLOR);
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
lcd_printf(x, y, "Spur:\n%s", S_IS_AUTO(setting.spur_removal) ? "AUTO" : "ON");
|
|
|
|
else
|
|
|
|
y = add_quick_menu(y += YSTEP, (menuitem_t *)menu_stimulus);
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ili9341_drawstring("Spur:", x, y);
|
|
|
|
|
|
|
|
y += YSTEP;
|
|
|
|
|
|
|
|
if (S_IS_AUTO(setting.spur_removal))
|
|
|
|
|
|
|
|
y = add_quick_menu("AUTO", x, y, (menuitem_t *)menu_stimulus);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
y = add_quick_menu("ON", x, y, (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:\nON", x, y);
|
|
|
|
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)menu_stimulus);
|
|
|
|
y += YSTEP;
|
|
|
|
|
|
|
|
y = add_quick_menu("ON", x, y, (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);
|
|
|
|
y = add_quick_menu("Norm.", x, y, (menuitem_t *)menu_storage);
|
|
|
|
ili9341_drawstring("Norm.", x, y);
|
|
|
|
|
|
|
|
y = add_quick_menu(y, (menuitem_t *)menu_storage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// RBW
|
|
|
|
// RBW
|
|
|
|
if (setting.rbw_x10)
|
|
|
|
ili9341_set_foreground(setting.rbw_x10 ? LCD_BRIGHT_COLOR_GREEN : LCD_FG_COLOR);
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
if (dirty) update_rbw();
|
|
|
|
if (dirty) update_rbw();
|
|
|
|
ili9341_drawstring("RBW:", x, y);
|
|
|
|
lcd_printf(x, y, "RBW:\n%.1FHz", actual_rbw_x10*100.0);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)menu_rbw);
|
|
|
|
plot_printf(buf, BLEN, "%.1FHz", actual_rbw_x10*100.0);
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_rbw);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __VBW__
|
|
|
|
#ifdef __VBW__
|
|
|
|
// VBW
|
|
|
|
// VBW
|
|
|
|
@ -3387,41 +3356,22 @@ redraw_cal_status:
|
|
|
|
vbw = 10;
|
|
|
|
vbw = 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_drawstring("VBW:", x, y);
|
|
|
|
lcd_printf(x, y, "VBW:\n%.1FHz", actual_rbw_x10*100.0 *vbw/10.0);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)menu_vbw);
|
|
|
|
plot_printf(buf, BLEN, "%.1FHz", actual_rbw_x10*100.0 *vbw/10.0);
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_vbw);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
// Sweep time
|
|
|
|
// Sweep time: SD_NORMAL, SD_PRECISE, SD_FAST, SD_MANUAL
|
|
|
|
if (setting.step_delay != 0)
|
|
|
|
static const char fscan[]={0, 'P', 'F', 'M'};
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
buf[0] = ' ';
|
|
|
|
|
|
|
|
strcpy(&buf[1],"Scan:");
|
|
|
|
|
|
|
|
if (setting.step_delay_mode == SD_PRECISE)
|
|
|
|
|
|
|
|
buf[0] = 'P';
|
|
|
|
|
|
|
|
else if (setting.step_delay_mode == SD_FAST)
|
|
|
|
|
|
|
|
buf[0] = 'F';
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
strcpy(&buf[0],"Scan:");
|
|
|
|
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dirty) {
|
|
|
|
if (dirty) {
|
|
|
|
calculate_step_delay();
|
|
|
|
calculate_step_delay();
|
|
|
|
setting.actual_sweep_time_us = calc_min_sweep_time_us();
|
|
|
|
setting.actual_sweep_time_us = calc_min_sweep_time_us();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ili9341_set_foreground(setting.step_delay ? LCD_BRIGHT_COLOR_GREEN : LCD_FG_COLOR);
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
y += YSTEP;
|
|
|
|
lcd_printf(x, y, "%cScan:\n%5.3Fs", fscan[setting.step_delay_mode&3], (float)setting.sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
y += YSTEP;
|
|
|
|
lcd_printf(x, y, "%cScan:\n%5.3Fs", fscan[setting.step_delay_mode&3], (float)setting.actual_sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.actual_sweep_time_us/ONE_SECOND_TIME);
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)menu_sweep_speed);
|
|
|
|
y = add_quick_menu(buf, x, y, (menuitem_t *)menu_sweep_speed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
#if 0 // Activate for sweep time debugging
|
|
|
|
@ -3429,47 +3379,38 @@ redraw_cal_status:
|
|
|
|
update_rbw(); // To ensure the calc_min_sweep time shown takes the latest delay into account
|
|
|
|
update_rbw(); // To ensure the calc_min_sweep time shown takes the latest delay into account
|
|
|
|
calculate_step_delay();
|
|
|
|
calculate_step_delay();
|
|
|
|
uint32_t t = calc_min_sweep_time_us();
|
|
|
|
uint32_t t = calc_min_sweep_time_us();
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)t/ONE_SECOND_TIME);
|
|
|
|
lcd_printf(x, y, "%5.3Fs", (float)t/ONE_SECOND_TIME);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.additional_step_delay_us/ONE_SECOND_TIME);
|
|
|
|
lcd_printf(x, y, "%5.3Fs", (float)setting.additional_step_delay_us/ONE_SECOND_TIME);
|
|
|
|
ili9341_drawstring(buf, x, y);
|
|
|
|
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
y += YSTEP + YSTEP/2 ;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef TINYSA4
|
|
|
|
#ifdef TINYSA4
|
|
|
|
if (setting.extra_lna){
|
|
|
|
if (setting.extra_lna){
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
y = add_quick_menu("LNA:ON", x, y, (menuitem_t *)menu_level);
|
|
|
|
lcd_printf(x, y, "LNA:ON");
|
|
|
|
|
|
|
|
y = add_quick_menu(y, (menuitem_t *)menu_level);
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
// Cal output
|
|
|
|
// Cal output
|
|
|
|
if (setting.refer >= 0) {
|
|
|
|
if (setting.refer >= 0) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Ref:", x, y);
|
|
|
|
lcd_printf(x, y, "Ref:\n%dMHz",reffer_freq[setting.refer]/1000000);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)menu_reffer);
|
|
|
|
plot_printf(buf, BLEN, "%dMHz",reffer_freq[setting.refer]/1000000);
|
|
|
|
|
|
|
|
buf[6]=0;
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_reffer);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Offset
|
|
|
|
// Offset
|
|
|
|
if (setting.external_gain != 0.0) {
|
|
|
|
if (setting.external_gain != 0.0) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Amp:", x, y);
|
|
|
|
lcd_printf(x, y, "Amp:\n%4.1fdB",setting.external_gain);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+=YSTEP, (menuitem_t *)KM_EXT_GAIN);
|
|
|
|
plot_printf(buf, BLEN, "%.1fdB",setting.external_gain);
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)KM_EXT_GAIN);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Repeat
|
|
|
|
// Repeat
|
|
|
|
if (setting.repeat != 1) {
|
|
|
|
if (setting.repeat != 1) {
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN);
|
|
|
|
ili9341_drawstring("Repeat:", x, y);
|
|
|
|
lcd_printf(x, y, "Repeat\n x%d", setting.repeat);
|
|
|
|
y += YSTEP;
|
|
|
|
y = add_quick_menu(y+=YSTEP,( menuitem_t *)KM_REPEAT);
|
|
|
|
plot_printf(buf, BLEN, "%d",setting.repeat);
|
|
|
|
|
|
|
|
buf[6]=0;
|
|
|
|
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)KM_REPEAT);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Trigger
|
|
|
|
// Trigger
|
|
|
|
@ -3483,19 +3424,15 @@ redraw_cal_status:
|
|
|
|
|
|
|
|
|
|
|
|
y += YSTEP;
|
|
|
|
y += YSTEP;
|
|
|
|
if (rounding)
|
|
|
|
if (rounding)
|
|
|
|
plot_printf(buf, BLEN, "%4f", value(setting.trigger_level));
|
|
|
|
lcd_printf(x, y, "%6.3f", value(setting.trigger_level));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
plot_printf(buf, BLEN, "%.4F", value(setting.trigger_level));
|
|
|
|
lcd_printf(x, y, "%6.4F", value(setting.trigger_level));
|
|
|
|
// plot_printf(buf, BLEN, "%4f", value(setting.trigger_level)/setting.unit_scale);
|
|
|
|
// lcd_printf(x, y, "%4f", value(setting.trigger_level)/setting.unit_scale);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_trigger);
|
|
|
|
y = add_quick_menu(y,(menuitem_t *)menu_trigger);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Mode
|
|
|
|
// Mode
|
|
|
|
if (level_is_calibrated())
|
|
|
|
ili9341_set_foreground(level_is_calibrated() ? LCD_BRIGHT_COLOR_GREEN : LCD_BRIGHT_COLOR_RED);
|
|
|
|
color = LCD_BRIGHT_COLOR_GREEN;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
|
|
|
|
ili9341_drawstring_7x13(MODE_LOW(setting.mode) ? "LOW" : "HIGH", x, y);
|
|
|
|
ili9341_drawstring_7x13(MODE_LOW(setting.mode) ? "LOW" : "HIGH", x, y);
|
|
|
|
|
|
|
|
|
|
|
|
// Compact status string
|
|
|
|
// Compact status string
|
|
|
|
@ -3557,11 +3494,6 @@ redraw_cal_status:
|
|
|
|
if (!setting.waterfall) { // Do not draw bottom level if in waterfall mode
|
|
|
|
if (!setting.waterfall) { // Do not draw bottom level if in waterfall mode
|
|
|
|
// Bottom level
|
|
|
|
// Bottom level
|
|
|
|
y = area_height + OFFSETY;
|
|
|
|
y = area_height + OFFSETY;
|
|
|
|
if (rounding)
|
|
|
|
|
|
|
|
plot_printf(buf, BLEN, "%4d", (int)(yMax - setting.scale * NGRIDY));
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
plot_printf(buf, BLEN, "%+4.3F", ((yMax - setting.scale * NGRIDY)/setting.unit_scale));
|
|
|
|
|
|
|
|
// buf[5]=0;
|
|
|
|
|
|
|
|
if (level_is_calibrated())
|
|
|
|
if (level_is_calibrated())
|
|
|
|
if (setting.auto_reflevel)
|
|
|
|
if (setting.auto_reflevel)
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
color = LCD_FG_COLOR;
|
|
|
|
@ -3570,8 +3502,11 @@ redraw_cal_status:
|
|
|
|
else
|
|
|
|
else
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
color = LCD_BRIGHT_COLOR_RED;
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
ili9341_set_foreground(color);
|
|
|
|
y = add_quick_menu(buf, x, y,(menuitem_t *)menu_average);
|
|
|
|
if (rounding)
|
|
|
|
// ili9341_drawstring(buf, x, y);
|
|
|
|
lcd_printf(x, y, "%4d", (int)(yMax - setting.scale * NGRIDY));
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
lcd_printf(x, y, "%+4.3F", ((yMax - setting.scale * NGRIDY)/setting.unit_scale));
|
|
|
|
|
|
|
|
y = add_quick_menu(y,(menuitem_t *)menu_average);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|