mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
Now showing the serial number on the RTL-SDR
This commit is contained in:
parent
ad36ede26b
commit
14e37b41d4
@ -121,9 +121,14 @@ public:
|
||||
#ifndef __ANDROID__
|
||||
devCount = rtlsdr_get_device_count();
|
||||
char buf[1024];
|
||||
char snBuf[1024];
|
||||
for (int i = 0; i < devCount; i++) {
|
||||
// Gather device info
|
||||
const char* devName = rtlsdr_get_device_name(i);
|
||||
sprintf(buf, "%s [%d]", devName, i);
|
||||
int snErr = rtlsdr_get_device_usb_strings(i, NULL, NULL, snBuf);
|
||||
|
||||
// Build name
|
||||
sprintf(buf, "[%s] %s##%d", (!snErr && snBuf[0]) ? snBuf : "No Serial", devName, i);
|
||||
devNames.push_back(buf);
|
||||
devListTxt += buf;
|
||||
devListTxt += '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user