-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix bug when deleting from flash and add unit tests #99
Conversation
I think this is right. The firmware CDC parser code is not very clear about where null terminators are supposed to be, but other commands that have parameters don't have a null between the |
Not sure the null is even needed for the commands that don't send strings, but all of them are doing it 🤔 Also, looks like this has always been wrong, no idea how I didn't notice that. |
I thought I had used this successfully in the past, but it does look like that extra null was always sent. Maybe something changed on firmware side. |
Need to fix |
I already sent a PR for that too. |
Wrote some unit tests for this, and found a bug in the process. |
The terminating null should be sent after the offset. Sending it before causes the offset to be 256x too big, because it is little endian. Also adds a log message, not shown by default.
Rebased so the tests can run. |
Hmm okay well that clearly needs some work. |
Pull Request Test Coverage Report for Build 4365346862
💛 - Coveralls |
Hoorah! Tests! Thank you. |
The terminating null should be sent after the offset. Sending it before causes the offset to be 256x too big, because it is little endian.
Also adds a log message, not shown by default.