8 releases

0.4.2 Apr 28, 2024
0.4.1 Dec 6, 2023
0.4.0 Oct 30, 2023
0.3.2 Jul 4, 2023
0.1.0 Dec 14, 2022

#156 in Robotics

MIT/Apache

255KB
6K SLoC

blackbox-log

CI codecov dependency status crates.io docs.rs MSRV license

This is a Rust port of Betaflight's & INAV's blackbox tools. Check the GitHub organization for related projects. Or, read the docs to get started.

Note: blackbox-log is not quite ready for production use yet -- consider it early-mid beta quality.

Why?

There are two official parser implementations, each with a copy maintained by Betaflight and one by INAV, so why another?

Neither is all that great for building other software with:

  • blackbox_decode (BF, INAV) has missed some of the changes in the format in the last few years, so its output is no longer entirely correct. Additionally, it decodes and writes everything to disk, so you pay for data your application may not need.
  • The log viewer's parser (BF, INAV) isn't meant to be used by anything else and is tightly coupled with its GUI. It's written in JavaScript, which limits the places it can reasonably be embedded.

This project aims to fill that niche. An ergonomic, up-to-date API usable anywhere that supports Rust or WebAssembly.

Contributing

All contributions are welcome. Testing and bug reports are greatly appreciated. If at all possible, please include a log file exhibiting the bug. If you've got any other questions or ideas, feel free to start a discussion.

If you're looking to contribute code or log files, see the help wanted and needs logs tags.

Most development tasks are run using just. Run just in the project root to get a list of available tasks. If modifying the yaml files in types/, make sure to commit the result of just codegen.

There are 2 devcontainers set up with all necessary development tools. Default will build the container from scratch, while Default (prebuilt) will download a prebuilt container and will likely be faster to start.

Open in DevPod Open in GitHub Codespaces

Note: At least 4 cores and 4GiB of RAM is recommended.

References/Prior Art

Many thanks to Nicholas Sherlock for his original logging implementation and to the Cleanflight project (which Betaflight & INAV are forked from) for integrating it (https://github.com/cleanflight/cleanflight/pull/227).

License

Licensed under either of

at your option.

Dependencies

~6MB
~111K SLoC