rtl_tcp: add handlers for sample rate and gain mode commands

This commit is contained in:
Dimitri Stolnikov 2012-05-06 19:39:39 +02:00
parent 9167a01248
commit e5adc9a3ad

View File

@ -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;
}