mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
close:#13 feat: add electrical delay to show
This commit is contained in:
parent
4a9dee96a4
commit
bc99459972
17
plot.c
17
plot.c
|
|
@ -1415,6 +1415,23 @@ cell_draw_marker_info(int m, int n, int w, int h)
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (electrical_delay != 0) {
|
||||||
|
// draw electrical delay
|
||||||
|
int xpos = 21;
|
||||||
|
int ypos = 1 + (j/2)*7;
|
||||||
|
xpos -= m * CELLWIDTH -CELLOFFSETX;
|
||||||
|
ypos -= n * CELLHEIGHT;
|
||||||
|
chsnprintf(buf, sizeof buf, "Edelay");
|
||||||
|
cell_drawstring_5x7(w, h, buf, xpos, ypos, 0xffff);
|
||||||
|
xpos += 7 * 5;
|
||||||
|
int n = string_value_with_prefix(buf, sizeof buf, electrical_delay * 1e-12, 's');
|
||||||
|
cell_drawstring_5x7(w, h, buf, xpos, ypos, 0xffff);
|
||||||
|
xpos += n * 5 + 5;
|
||||||
|
float light_speed_ps = 299792458e-12; //(m/ps)
|
||||||
|
string_value_with_prefix(buf, sizeof buf, electrical_delay * light_speed_ps * velocity_factor / 100.0, 'm');
|
||||||
|
cell_drawstring_5x7(w, h, buf, xpos, ypos, 0xffff);
|
||||||
|
}
|
||||||
|
|
||||||
// draw marker frequency
|
// draw marker frequency
|
||||||
int xpos = 192;
|
int xpos = 192;
|
||||||
int ypos = 1 + (j/2)*7;
|
int ypos = 1 + (j/2)*7;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue