Skip to content

reset device if it hangs#12

Merged
petervojtek merged 2 commits intopetervojtek:masterfrom
TuxInvader:master
Jan 30, 2017
Merged

reset device if it hangs#12
petervojtek merged 2 commits intopetervojtek:masterfrom
TuxInvader:master

Conversation

@TuxInvader
Copy link
Copy Markdown
Contributor

Hi Peter,

Firstly, thanks for your work maintaining this project. I received a Temper1F v1.3 today and was keen to start recording some temps. However I ran into some issues with the current code.

I could only read one set of temps, and then the device would hang. So I tried out a python module called temper-python (https://github.com/padelt/temper-python), and found that to work fine.

I compared the two projects, and found this interesting comment in the python module

        # Magic: Our TEMPerV1.4 likes to be asked twice.  When
        # only asked once, it get's stuck on the next access and
        # requires a reset.

Sure enough if I ask my Temper1f twice, it works just as well as the python code.

So here are two commits which, modify the pcsensor.c to:

  1. Perform a usb_reset() when bad() is called.
  2. Perform an additional read from the device if we're not running in a loop.

Cheers!

@petervojtek petervojtek merged commit 85795db into petervojtek:master Jan 30, 2017
@petervojtek
Copy link
Copy Markdown
Owner

hi @TuxInvader , thanks for contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants