This is just a quick unedited log of my attempts to resolve some blackbox logging issues that recently appeared.
I tried formatting the sdcard (normally just delete logs and leave config.txt) and I’m still having the same problems. I also tried some different sdcards with no luck.
I had previously looked at the headers and everything seemed fine, but your mention of them made me look more closely. I see that random data was missing from the middle of the header in some logs, and simply cut off early by data in others.
I figured out that the specific problem was gyro scaling, but there was quite a bit of other info missing too.
my temporary fix: Get a log in angle mode with settings as close as possible to the log I want to fix and copy its header into the log with problems.
Did some more testing. Tried going back to old commits and using cleanflight master branch, and still had problems with them. Since it looks like this isn’t a betaflight problem like I had originally thought, I did some more looking and found the appropriate rcgroups thread.
Solution was found in this pull request.
Manually merged changes into latest betaflight.
There was a problem on one line because it references masterConfig.looptime.
I just set it to a static value based on the looptime of 1000 and compiled it.
<< blackboxMaxHeaderBytesPerIteration = constrain((masterConfig.looptime * 3) / 500, 1, BLACKBOX_TARGET_HEADER_BUDGET_PER_ITERATION); >> blackboxMaxHeaderBytesPerIteration = constrain(6, 1, BLACKBOX_TARGET_HEADER_BUDGET_PER_ITERATION);
Flashed the flight controller and logs are back to normal.
Leave a Reply
You must be logged in to post a comment.