Small UI improvements

tinySA-v0.2
erikkaashoek 6 years ago
parent e3b84785c9
commit e77359b6ac

@ -846,7 +846,7 @@ static void trace_get_value_string(
plot_printf(buf, len, "-INF");
else {
if (setting.unit)
plot_printf(buf, len, "%s %.5f%s%s", buf2, v - rlevel,unit_string[setting.unit],(mtype & M_NOISE?"/Hz":""));
plot_printf(buf, len, "%s %.2f%s%s", buf2, v - rlevel,unit_string[setting.unit],(mtype & M_NOISE?"/Hz":""));
else
plot_printf(buf, len, "%s %.1f%s%s", buf2, v - rlevel,unit_string[setting.unit],(mtype & M_NOISE?"/Hz":""));
}

@ -194,6 +194,9 @@ void set_IF(int f)
void set_unit(int u)
{
if (UNIT_IS_LINEAR(setting.unit) && !UNIT_IS_LINEAR(u)) {
set_scale(10);
}
setting.unit = u;
dirty = true;
}
@ -1175,7 +1178,7 @@ again:
if (setting.subtract_stored) {
RSSI = RSSI - stored_t[i] ;
}
// stored_t[i] = (SI4432_Read_Byte(0x69) & 0x0f) * 3.0 - 90.0; // Display the AGC value in thestored trace
stored_t[i] = (SI4432_Read_Byte(0x69) & 0x0f) * 3.0 - 90.0; // Display the AGC value in thestored trace
if (scandirty || setting.average == AV_OFF) { // Level calculations
actual_t[i] = RSSI;
age[i] = 0;
@ -1586,7 +1589,7 @@ void draw_cal_status(void)
if (rounding)
plot_printf(buf, BLEN, "%d", (int)yMax);
else
plot_printf(buf, BLEN, "%f", yMax);
plot_printf(buf, BLEN, "%.2f", yMax);
buf[5]=0;
if (level_is_calibrated()) {
if (setting.auto_reflevel)
@ -1611,7 +1614,7 @@ void draw_cal_status(void)
if (rounding)
plot_printf(buf, BLEN, "%d/",(int)setting.scale);
else
plot_printf(buf, BLEN, "%f/",setting.scale);
plot_printf(buf, BLEN, "%.2f/",setting.scale);
ili9341_drawstring(buf, x, y);
if (setting.auto_attenuation)
@ -1753,7 +1756,7 @@ void draw_cal_status(void)
if (rounding)
plot_printf(buf, BLEN, "%d", (int)(yMax - setting.scale * NGRIDY));
else
plot_printf(buf, BLEN, "%f", (yMax - setting.scale * NGRIDY));
plot_printf(buf, BLEN, "%.2f", (yMax - setting.scale * NGRIDY));
buf[5]=0;
if (level_is_calibrated())
if (setting.auto_reflevel)

@ -1384,7 +1384,7 @@ static const menuitem_t menu_levelhigh[] = {
{ MT_SUBMENU, 0, "\2REF\0LEVEL", menu_reflevel},
// { MT_SUBMENU, 0, "\2SCALE/\0DIV",menu_scale_per},
{ MT_KEYPAD, KM_SCALE, "\2SCALE/\0DIV", NULL},
{ MT_SUBMENU,0, "AVER", menu_average},
{ MT_SUBMENU,0, "CALC", menu_average},
{ MT_SUBMENU, 0, "UNIT", menu_unit},
{ MT_KEYPAD, KM_OFFSET, "\2EXTERN\0AMP", NULL},
{ MT_SUBMENU, 0, "TRIGGER", menu_trigger},
@ -1396,12 +1396,12 @@ static const menuitem_t menu_levelhigh[] = {
static const menuitem_t menu_level[] = {
{ MT_SUBMENU, 0, "\2REF\0LEVEL", menu_reflevel},
// { MT_SUBMENU, 0, "\2SCALE/\0DIV",menu_scale_per},
{ MT_KEYPAD, KM_SCALE, "\2SCALE/\0DIV", NULL},
{ MT_SUBMENU | MT_LOW, 0, "ATTEN", menu_atten},
{ MT_SUBMENU,0, "AVER", menu_average},
{ MT_KEYPAD, KM_SCALE, "\2SCALE/\0DIV",NULL},
{ MT_SUBMENU | MT_LOW, 0, "ATTEN", menu_atten},
{ MT_SUBMENU,0, "CALC", menu_average},
{ MT_SUBMENU, 0, "UNIT", menu_unit},
{ MT_KEYPAD, KM_OFFSET, "\2EXTERN\0AMP", NULL},
{ MT_SUBMENU, 0, "TRIGGER", menu_trigger},
{ MT_KEYPAD, KM_OFFSET, "\2EXTERN\0AMP",NULL},
{ MT_SUBMENU, 0, "TRIGGER", menu_trigger},
{ MT_CANCEL, 0, S_LARROW" BACK",NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel
};

Loading…
Cancel
Save

Powered by TurnKey Linux.