mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2026-04-05 22:45:43 +00:00
add CW, mod freq from limits
This commit is contained in:
parent
52dce51f31
commit
aa91bc23fc
4 changed files with 57 additions and 3 deletions
11
plot.c
11
plot.c
|
|
@ -1251,7 +1251,7 @@ draw_frequencies(void)
|
|||
(int)((fstop / 1000) % 1000),
|
||||
(int)(fstop % 1000));
|
||||
ili9341_drawstring_5x7(buf, 205, 233, 0xffff, 0x0000);
|
||||
} else {
|
||||
} else if (fstop < 0) {
|
||||
int fcenter = fstart;
|
||||
int fspan = -fstop;
|
||||
chsnprintf(buf, 24, "CENTER %d.%03d %03d MHz ",
|
||||
|
|
@ -1264,6 +1264,15 @@ draw_frequencies(void)
|
|||
(int)((fspan / 1000) % 1000),
|
||||
(int)(fspan % 1000));
|
||||
ili9341_drawstring_5x7(buf, 205, 233, 0xffff, 0x0000);
|
||||
} else {
|
||||
int fcenter = fstart;
|
||||
chsnprintf(buf, 24, "CW %d.%03d %03d MHz ",
|
||||
(int)(fcenter / 1000000),
|
||||
(int)((fcenter / 1000) % 1000),
|
||||
(int)(fcenter % 1000));
|
||||
ili9341_drawstring_5x7(buf, OFFSETX, 233, 0xffff, 0x0000);
|
||||
chsnprintf(buf, 24, " ");
|
||||
ili9341_drawstring_5x7(buf, 205, 233, 0xffff, 0x0000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue