MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / probeDevices

Method probeDevices

src/gui2/datastore.cc:312–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void Datastore::probeDevices()
313{
314 Datastore::runOnWorkerThread(
315 []
316 {
317 hex::log::debug("probing USB");
318 auto usbDevices = findUsbDevices();
319
320 hex::TaskManager::doLater(
321 [usbDevices]
322 {
323 devices.clear();
324 devices[DEVICE_FLUXFILE] = {
325 nullptr, "fluxengine.view.config.fluxfile"_lang};
326 devices[DEVICE_MANUAL] = {
327 nullptr, "fluxengine.view.config.manual"_lang};
328 for (auto it : usbDevices)
329 devices["#" + it->serial] = {it,
330 fmt::format(
331 "{} {}", getDeviceName(it->type), it->serial)};
332 });
333 });
334}
335
336static void wtClearDiskData()
337{

Callers

nothing calls this directly

Calls 4

runOnWorkerThreadFunction · 0.85
findUsbDevicesFunction · 0.85
getDeviceNameFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected