Search for rebooted device after update

This commit is contained in:
Jan Käberich 2020-09-01 21:33:10 +02:00
parent 8c33ae523a
commit 37511fa404
6 changed files with 48 additions and 18 deletions

View file

@ -181,15 +181,15 @@ bool Device::SendCommandWithoutPayload(Protocol::PacketType type)
}
}
std::vector<QString> Device::GetDevices()
std::set<QString> Device::GetDevices()
{
std::vector<QString> serials;
std::set<QString> serials;
libusb_context *ctx;
libusb_init(&ctx);
SearchDevices([&serials](libusb_device_handle *, QString serial) -> bool {
serials.push_back(serial);
serials.insert(serial);
return true;
}, ctx);