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

don't write to full buffers #34

Merged
merged 3 commits into from
Jan 8, 2016
Merged

don't write to full buffers #34

merged 3 commits into from
Jan 8, 2016

Conversation

jankolkmeier
Copy link
Owner

Does this help #33 ?

@emnik
Copy link

emnik commented Aug 3, 2015

Indeed It kind of solves the problem. I added a

console.log('S.buffer.length='+S.buffer.length, 'S.offset='+S.offset);

just before the new if...
You can see the result at http:https://pastebin.com/FMnddGcW
At first It doesn't emit a "frame_raw" signal until it logs "We would have a problem..."
Then it starts working right! without a RangeError!
The only downside is that it takes about 10 minutes to get it to work right. (I am sending data via RF about every minute)

@jankolkmeier
Copy link
Owner Author

Hmm, sorry it doesn't fix it better. Did it also take 10 minutes for the crash to appear previously?

@jankolkmeier
Copy link
Owner Author

Can you try with this last commit? I'm surprised it passed the checks, and I am hesitant to make this upstream before giving it a closer look... but that check I removed may have been needless, and may have been keeping the parser from missing actual data in your case...

@emnik
Copy link

emnik commented Aug 3, 2015

Ok, yes the error did take ~ 10 minutes for the crash at start.
Your last commit though, seems to solve the problem completely without any delay !!!

@jankolkmeier
Copy link
Owner Author

Glad it works! Please keep an eye on it, see if it breaks anything else!

@emnik
Copy link

emnik commented Aug 3, 2015

Of course, I'll keep you informed!
Thank you very much for your help and your time!

jankolkmeier added a commit that referenced this pull request Jan 8, 2016
@jankolkmeier jankolkmeier merged commit 5e6daf8 into master Jan 8, 2016
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.

None yet

2 participants