Changed to LEVEL CHANGE and delta markers to dBc

pull/4/head
erikkaashoek 6 years ago
parent 428bd1bbfe
commit 6246eb3492

@ -2023,14 +2023,16 @@ static void cell_draw_marker_info(int x0, int y0)
j = 2; j = 2;
int xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0; int xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0;
int ypos = 1 + (j/2)*(16) - y0; int ypos = 1 + (j/2)*(16) - y0;
cell_drawstring_7x13(buf, xpos, ypos); // cell_drawstring_7x13(buf, xpos, ypos);
cell_drawstring(buf, xpos, ypos);
ip = sr+ (sl - ir)/2; ip = sr+ (sl - ir)/2;
plot_printf(buf, sizeof buf, "OIP3: %4.1fdB", ip); plot_printf(buf, sizeof buf, "OIP3: %4.1fdB", ip);
j = 3; j = 3;
xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0; xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0;
ypos = 1 + (j/2)*(16) - y0; ypos = 1 + (j/2)*(16) - y0;
cell_drawstring_7x13(buf, xpos, ypos); // cell_drawstring_7x13(buf, xpos, ypos);
cell_drawstring(buf, xpos, ypos);
break; break;
} }
#if 0 #if 0

@ -1869,7 +1869,7 @@ float my_round(float v)
return v; return v;
} }
const char * const unit_string[] = { "dBm", "dBmV", "dBuV", "V", "W", "dBc", "dBmVc", "dBuVc", "Vc", "Wc" }; // unit + 5 is delta unit const char * const unit_string[] = { "dBm", "dBmV", "dBuV", "V", "W", "dBc", "dBc", "dBc", "Vc", "Wc" }; // unit + 5 is delta unit
static const float scale_value[]={50000, 20000, 10000, 5000, 2000, 1000, 500, 200, 100, 50, 20,10,5,2,1,0.5,0.2,0.1,0.05,0.02,0.01,0.005,0.002, 0.001,0.0005,0.0002, 0.0001}; static const float scale_value[]={50000, 20000, 10000, 5000, 2000, 1000, 500, 200, 100, 50, 20,10,5,2,1,0.5,0.2,0.1,0.05,0.02,0.01,0.005,0.002, 0.001,0.0005,0.0002, 0.0001};
static const char * const scale_vtext[]= {"50000", "20000", "10000", "5000", "2000", "1000", "500", "200", "100", "50", "20","10","5","2","1","0.5","0.2","0.1","0.05","0.02","0.01", "0.005","0.002","0.001", "0.0005","0.0002","0.0001"}; static const char * const scale_vtext[]= {"50000", "20000", "10000", "5000", "2000", "1000", "500", "200", "100", "50", "20","10","5","2","1","0.5","0.2","0.1","0.05","0.02","0.01", "0.005","0.002","0.001", "0.0005","0.0002","0.0001"};

@ -1194,7 +1194,7 @@ const menuitem_t menu_lowoutputmode[] = {
{ MT_FORM | MT_KEYPAD, KM_LOWOUTLEVEL, "LEVEL: %s", "-76..-6"}, { MT_FORM | MT_KEYPAD, KM_LOWOUTLEVEL, "LEVEL: %s", "-76..-6"},
{ MT_FORM | MT_SUBMENU, 0, "MODULATION: %s", menu_modulation}, { MT_FORM | MT_SUBMENU, 0, "MODULATION: %s", menu_modulation},
{ MT_FORM | MT_KEYPAD, KM_SPAN, "SPAN: %s", "0..350MHz"}, { MT_FORM | MT_KEYPAD, KM_SPAN, "SPAN: %s", "0..350MHz"},
{ MT_FORM | MT_KEYPAD | MT_LOW, KM_LEVELSWEEP,"LEVELSWEEP: %s", "-70..70"}, { MT_FORM | MT_KEYPAD | MT_LOW, KM_LEVELSWEEP,"LEVEL CHANGE: %s", "-70..70"},
{ MT_FORM | MT_KEYPAD, KM_SWEEP_TIME, "SWEEP TIME: %s", "0..600S"}, { MT_FORM | MT_KEYPAD, KM_SWEEP_TIME, "SWEEP TIME: %s", "0..600S"},
// { MT_FORM | MT_KEYPAD, KM_10MHZ, "10MHz: %s", NULL}, // { MT_FORM | MT_KEYPAD, KM_10MHZ, "10MHz: %s", NULL},
{ MT_FORM | MT_CANCEL, 0, "MODE", NULL }, { MT_FORM | MT_CANCEL, 0, "MODE", NULL },
@ -1793,7 +1793,15 @@ static void fetch_numeric_target(void)
break; break;
case KM_LOWOUTLEVEL: case KM_LOWOUTLEVEL:
uistat.value = get_attenuation(); // compensation for dB offset during low output mode uistat.value = get_attenuation(); // compensation for dB offset during low output mode
plot_printf(uistat.text, sizeof uistat.text, "%ddB", ((int32_t)uistat.value)); int end_level = ((int32_t)uistat.value)+setting.level_sweep;
if (end_level < -76)
end_level = -76;
if (end_level > -6)
end_level = -6;
if (setting.level_sweep != 0)
plot_printf(uistat.text, sizeof uistat.text, "%ddBm to %ddBm", ((int32_t)uistat.value), end_level);
else
plot_printf(uistat.text, sizeof uistat.text, "%ddBm", ((int32_t)uistat.value));
break; break;
case KM_DECAY: case KM_DECAY:
uistat.value = setting.decay; uistat.value = setting.decay;

Loading…
Cancel
Save

Powered by TurnKey Linux.