Fix issues from #9 -- increase select time, replace invalid firmware string #19
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.
The
select
call has been increased to0.2
0.5
seconds, which stops the issue originally mentioned in #9 - "Cannot read firmware from device".A second issue is brought up in #9 - Sometimes the returned firmware string is
V3.3
instead ofTEMPerX_V3.3
. This workaround simplyreplacesretries when theV3.3
with the fullTEMPerX_V3.3
stringV3.3
string is encountered.When the replacement is used, a warning is issued. This goes to stderr, and doesn't interfere with piping the output of the script.Reproduction
If you haven't applied the fix yet and are attempting to verify the bug's existence:
413d:2107
vendor/product idsTEMPerX_V3.3
temper.py
once a second causes the issue to be much more frequentExample
Using xonsh: