aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtl_tcp.c
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-05-06 19:39:39 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-05-06 19:39:39 +0200
commite5adc9a3ad893bba2bb0a60c99279bfd811aa5fa (patch)
tree60ea5ba5c0108f5b1cee01e68b06cb95394d7878 /src/rtl_tcp.c
parent9167a01248cdc28f5145cd1b2c5abfdc57a099bf (diff)
rtl_tcp: add handlers for sample rate and gain mode commands
Diffstat (limited to 'src/rtl_tcp.c')
-rw-r--r--src/rtl_tcp.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c
index 2fb1b34..80175e9 100644
--- a/src/rtl_tcp.c
+++ b/src/rtl_tcp.c
@@ -276,13 +276,21 @@ static void *command_worker(void *arg)
}
switch(cmd.cmd) {
case 0x01:
- printf("set freq %d\n", cmd.param);
- rtlsdr_set_center_freq(dev, cmd.param);
- break;
+ printf("set freq %d\n", cmd.param);
+ rtlsdr_set_center_freq(dev, cmd.param);
+ break;
+ case 0x02:
+ printf("set sample rate %d\n", cmd.param);
+ rtlsdr_set_sample_rate(dev, cmd.param);
+ break;
+ case 0x03:
+ printf("set gain mode %d\n", cmd.param);
+ rtlsdr_set_tuner_gain_mode(dev, cmd.param);
+ break;
case 0x04:
- printf("set gain %d\n", cmd.param);
- rtlsdr_set_tuner_gain(dev, cmd.param);
- break;
+ printf("set gain %d\n", cmd.param);
+ rtlsdr_set_tuner_gain(dev, cmd.param);
+ break;
default:
break;
}