limesdr: add ability to select RX channel
Add ability to select an RX channel by number. By default channel 0 is
used.
Test: connect LimeSDR device and try to select the RX channel by number:
OK: $ ./dump1090 --device-type limesdr --limesdr-channel 0
OK: $ ./dump1090 --device-type limesdr --limesdr-channel 1
NG: $ ./dump1090 --device-type limesdr --limesdr-channel 2
$ limesdr: Invalid channel number.
Signed-off-by: Gluttton <gluttton@ukr.net>
This commit is contained in:
parent
7267d8aff9
commit
eb476d2e75
|
|
@ -110,6 +110,7 @@ void limesdrShowHelp()
|
|||
printf("\n");
|
||||
printf("--limesdr-verbosity set verbosity level for LimeSDR messages\n");
|
||||
printf("--limesdr-serial serial number of desired device\n");
|
||||
printf("--limesdr-channel set number of an RX channel\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
@ -122,6 +123,8 @@ bool limesdrHandleOption(int argc, char **argv, int *jptr)
|
|||
LimeSDR.verbosity = atoi(argv[++j]);
|
||||
} else if (!strcmp(argv[j], "--limesdr-serial") && more) {
|
||||
strcpy(LimeSDR.serial, argv[++j]);
|
||||
} else if (!strcmp(argv[j], "--limesdr-channel") && more) {
|
||||
LimeSDR.stream.channel = atoi(argv[++j]);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue