projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
999d5a1
)
rigctl: ZZAR - take care of the sign of the agc threshold reply
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 22 Jan 2023 17:19:27 +0000
(22:49 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 22 Jan 2023 17:19:27 +0000
(22:49 +0530)
rigctl.c
patch
|
blob
|
history
diff --git
a/rigctl.c
b/rigctl.c
index df87081068e1551e9043c99de783ffbecdb72be9..6024661895999e160008b9f4eb802990bcd68c8d 100644
(file)
--- a/
rigctl.c
+++ b/
rigctl.c
@@
-973,7
+973,12
@@
gboolean parse_extended_cmd(char *command, CLIENT *client) {
// read/set RX0 AGC Threshold
if (command[4] == ';') {
// send reply back
- sprintf(reply, "ZZAR%+04d;", (int)(receiver[0]->agc_gain));
+ memset(reply, '\0', 10);
+ if (receiver[0]->agc_gain >= 0) {
+ sprintf(reply, "ZZAR+%+03d;", (int)(receiver[0]->agc_gain));
+ } else {
+ sprintf(reply, "ZZAR-%+03d;", (int)(receiver[0]->agc_gain));
+ }
send_resp(client->fd, reply);
} else {
int threshold = atoi(&command[4]);