rtl_tcp: make more functions of librtlsdr accessible via tcp

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 12 years ago
parent b70c7d99f1
commit 4c58bf8b1a
  1. 23
      src/rtl_tcp.c

@ -248,6 +248,8 @@ static void *command_worker(void *arg)
struct command cmd={0, 0};
struct timeval tv= {1, 0};
int r = 0;
uint32_t tmp;
while(1) {
left=sizeof(cmd);
while(left >0) {
@ -294,6 +296,27 @@ static void *command_worker(void *arg)
printf("set freq correction %d\n", ntohl(cmd.param));
rtlsdr_set_freq_correction(dev, ntohl(cmd.param));
break;
case 0x06:
tmp = ntohl(cmd.param);
printf("set if stage %d, gain %d\n", tmp >> 16, tmp & 0xffff);
rtlsdr_set_tuner_if_gain(dev, tmp >> 16, tmp & 0xffff);
break;
case 0x07:
printf("set test mode %d\n", ntohl(cmd.param));
rtlsdr_set_testmode(dev, ntohl(cmd.param));
break;
case 0x08:
printf("set agc mode %d\n", ntohl(cmd.param));
rtlsdr_set_agc_mode(dev, ntohl(cmd.param));
break;
case 0x09:
printf("set direct sampling %d\n", ntohl(cmd.param));
rtlsdr_set_direct_sampling(dev, ntohl(cmd.param));
break;
case 0x0a:
printf("set offset tuning %d\n", ntohl(cmd.param));
rtlsdr_set_offset_tuning(dev, ntohl(cmd.param));
break;
default:
break;
}

Loading…
Cancel
Save