offer some advice if we fail to open the requested probe #504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
earlier this evening i was somewhat perplexed by
but the probe i wanted definitely was connected to the system.
eventually i realized that
probe_rs
tries to read the serial number, fails (because i was not root), believes the device must simply not be the one i wanted (but it was!!), and reportsProbeCreationError::NotFound
.so, in the specific case that you're opening a probe by
vid:pid:serial
and the error isNotFound
, hint that we might not have been able to look quite as fully as the user might have hoped.i'd typically check if
libc::getuid() == 0
before suggesting "try as root", but i saw some#[cfg]
that suggest Humility is expected to work on Windows (neat!) and i'm not sure if that applies so generally. and on some systems users could be in theusb
group so you might not need root to get a serial number anyway. so i decided to leave it at "if not root already..." in the hopes that whoever reads it understands the right meaning in their context.with this change, the same command errors somewhat more helpfully: