Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRecvPCI fails after first received buffer; using CP 3.x #7

Open
mrmcwethy opened this issue Sep 28, 2018 · 0 comments
Open

IRecvPCI fails after first received buffer; using CP 3.x #7

mrmcwethy opened this issue Sep 28, 2018 · 0 comments

Comments

@mrmcwethy
Copy link

Cyborg5, thank for creating this library.

I using the GEMMA M0 using CircuitPython 3.0.2 Sep 14, 2018.

example/decode_single.py

The first IRRemote buffer is received, but all subsequent buffers are empty and getResults returns fail.

After making the following changes, i was able to receive subsequent buffer without failure.

I changed IRrecvPCI:

in init

    def __init__(self, pin):
        self.recvPin = pin
        self.markExcess= 50
        self.recvBuffer = None

in enableIRIn:

   def enableIRIn(self):
        if self.recvBuffer is None:
            self.recvBuffer = pulseio.PulseIn(self.recvPin, maxlen=150, idle_state=True)
        self.prevLength=0

in getResults: I replaced the self.recvBuffer.deinit() with:

            self.recvBuffer.clear()
            self.recvBuffer.resume()

Let me know if I can help.

s-light added a commit to s-light/IRLibCP that referenced this issue Dec 25, 2018
GeorgeIoak added a commit to GeorgeIoak/CP_IRremote that referenced this issue Jun 19, 2020
Made changes to fix buffer problem based on cyborg5/IRLibCP#7
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

No branches or pull requests

1 participant