projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a62f495
)
VFO display: attempt to account for the dot
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 2 Jan 2022 14:10:51 +0000
(19:40 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 2 Jan 2022 14:10:51 +0000
(19:40 +0530)
vfo.c
patch
|
blob
|
history
diff --git
a/vfo.c
b/vfo.c
index f2ebe5273012611c43a0bcb60782b0f5bf3f48fe..bad81d3f07e61b2a162b2f60dab8fdea400b7de9 100644
(file)
--- a/
vfo.c
+++ b/
vfo.c
@@
-918,14
+918,18
@@
char **draw_vfo_val(char *vfo_str, int step) {
memset(s2, '\0', 20);
memset(s3, '\0', 20);
- for (int i = 0; i < l - step - 1; i++) {
+ int step_index = step;
+ if (step == 6) {
+ step_index = step - 1; // to account for the dot
+ }
+ for (int i = 0; i < l - step_index - 1; i++) {
s1[i] = vfo_str[i];
}
- s2[0] = vfo_str[l - step - 1];
+ s2[0] = vfo_str[l - step
_index
- 1];
for (int i = 0; i < step; i++) {
- s3[i] = vfo_str[l - step + i];
+ s3[i] = vfo_str[l - step
_index
+ i];
}
s[0] = s1;