projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bb5219
)
small fixes in audio gain
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 12 Jan 2022 07:07:03 +0000
(12:37 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 12 Jan 2022 07:07:03 +0000
(12:37 +0530)
rigctl.c
patch
|
blob
|
history
diff --git
a/rigctl.c
b/rigctl.c
index c2b78127daf87e93bcc228967cd4d2b30899b8ea..7c616229631a39eb2520ab34bfd1fe9c6f76534d 100644
(file)
--- a/
rigctl.c
+++ b/
rigctl.c
@@
-953,11
+953,12
@@
gboolean parse_extended_cmd(char *command, CLIENT *client) {
// read/set audio gain
if (command[4] == ';') {
// send reply back
+ memset(reply, '\0', 9);
sprintf(reply, "ZZAG%03d;", (int)(active_receiver->volume * 100.0));
send_resp(client->fd, reply);
} else if (command[7] == ';') {
command[7] = '\0';
- int gain =
atoi(&command[4]
);
+ int gain =
strtol(&command[4], NULL, 10
);
active_receiver->volume = (double)gain / 100.0;
update_af_gain();
}