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

Already on GitHub? Sign in to your account

Prevent buffer overflows and improve comparison #1

merged 1 commit into from Feb 20, 2012


None yet
2 participants

osbock commented Feb 20, 2012

Changed sample buffer to be a constant NUMPULSES.
Insure that the listenforIR() doesn't overflow.
If you make the buffer small, there may be ir code transmitted that gets picked up the next time around the loop. I should probably eat them until the timeout.

Also only compare the smallest of the receive sample or the sample to be compared. This allows you to edit down the captured samples to minimum size.

@PaintYourDragon PaintYourDragon added a commit that referenced this pull request Feb 20, 2012

@PaintYourDragon PaintYourDragon Merge pull request #1 from osbock/master
Prevent buffer overflows and improve comparison

@PaintYourDragon PaintYourDragon merged commit dd0d52e into adafruit:master Feb 20, 2012

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