-
Notifications
You must be signed in to change notification settings - Fork 61
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
Bad SOF RuntimeError #11
Comments
I think this is the same problem as before (#7), because no care is given to the state of the buffer at any time and because the author relies on precise indexing to unpack messages whenever you have data left in the buffer it will raise some kind of exception. |
Hello, |
clearing the buffer doesn't work.I too work with multiple spheros, what you need to do is make sure the packets are formed correctly by calculating a checksum and see if it matches, If it doesn't then read to the beginning of a packet (or what looks like the beginning) and try again. I have the changes on a private repo, but if you message me I can send you my updated driver file. |
What am I doing wrong if I get this line/error?
Line 837:
raise RuntimeError("Bad SOF : " + self.data2hexstr(data))
I'm assuming it's because the connections weren't shut down correctly during a previous run, however, I do not know what to do besides calling the disconnect method for each Sphero before exiting a script run.
Any ideas, @mmwise and others?
The text was updated successfully, but these errors were encountered: