Lower CPU usage while finding devices on Linux

This commit is contained in:
Paul Hollinsky
2019-04-17 16:50:40 -04:00
parent 37b83e0506
commit 4588024ed0
+1 -1
View File
@@ -13,7 +13,7 @@ std::vector<std::tuple<int, std::string>> FTDI::handles;
std::vector<neodevice_t> FTDI::FindByProduct(int product) {
constexpr size_t deviceSerialBufferLength = sizeof(device.serial);
std::vector<neodevice_t> found;
FTDIContext context;
static FTDIContext context;
std::pair<int, std::vector<std::string>> result = context.findDevices(product);
if(result.first < 0)