-
Notifications
You must be signed in to change notification settings - Fork 0
docs: major README.md and CONTRIBUTING.md simplification and compliance #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
72442cf
docs: major README.md and CONTRIBUTING.md simplification and compliance
nerdCopter 3c197e6
docs: update OVERVIEW.md to reflect current project structure
nerdCopter 29d9554
docs: add CRATE_USAGE.md, fix CONTRIBUTING.md code fence, update .git…
nerdCopter f122316
duh
nerdCopter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # Crate Usage: bbl_parser | ||
|
|
||
| Focused guidance for using the bbl_parser Rust crate. | ||
|
|
||
| ## Table of Contents | ||
| - [Installation](#installation) | ||
| - [Cargo features](#cargo-features) | ||
| - [Basic usage](#basic-usage) | ||
| - [Multi-log processing](#multi-log-processing) | ||
| - [Parsing from memory](#parsing-from-memory) | ||
| - [Examples](#examples) | ||
| - [Notes](#notes) | ||
|
|
||
| ## Installation | ||
|
|
||
| Add the dependency to your Cargo.toml: | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| # Local path while developing; use a version when published | ||
| bbl_parser = { path = "path/to/bbl_parser" } | ||
| ``` | ||
|
|
||
| ## Cargo features | ||
|
|
||
| - `csv` (default): CSV export helpers | ||
| - `cli` (default): Command-line entry points | ||
| - `json`: JSON-related helpers (requires `serde`) | ||
| - `serde`: Enable serialization for data structures | ||
|
|
||
| If you only need the parser types and functions, the defaults are fine. | ||
|
|
||
| ## Basic usage | ||
|
|
||
| ```rust | ||
| use bbl_parser::{parse_bbl_file, ExportOptions}; | ||
| use std::path::Path; | ||
|
|
||
| fn main() -> anyhow::Result<()> { | ||
| let log = parse_bbl_file(Path::new("flight.BBL"), ExportOptions::default(), false)?; | ||
| println!("firmware: {}", log.header.firmware_revision); | ||
| println!("frames: {}", log.sample_frames.len()); | ||
| Ok(()) | ||
| } | ||
| ``` | ||
|
|
||
| Key outputs on the BBLLog: | ||
| - `header`: configuration and metadata | ||
| - `sample_frames`: decoded I/P/S/G/H/E frames | ||
| - `event_frames`: flight events (when present) | ||
| - `gps_track`: GPS coordinates (when present) | ||
|
|
||
| ## Multi-log processing | ||
|
|
||
| ```rust | ||
| use bbl_parser::{parse_bbl_file_all_logs, ExportOptions}; | ||
| use std::path::Path; | ||
|
|
||
| fn main() -> anyhow::Result<()> { | ||
| let logs = parse_bbl_file_all_logs(Path::new("multi_flight.BBL"), ExportOptions::default(), false)?; | ||
| for log in logs { | ||
| println!("log {} of {} -> frames {}", log.log_number, log.total_logs, log.sample_frames.len()); | ||
| } | ||
| Ok(()) | ||
| } | ||
| ``` | ||
|
|
||
| ## Parsing from memory | ||
|
|
||
| ```rust | ||
| use bbl_parser::{parse_bbl_bytes, ExportOptions}; | ||
|
|
||
| fn main() -> anyhow::Result<()> { | ||
| let bytes = std::fs::read("flight.BBL")?; | ||
| let log = parse_bbl_bytes(&bytes, ExportOptions::default(), false)?; | ||
| println!("frames: {}", log.sample_frames.len()); | ||
| Ok(()) | ||
| } | ||
| ``` | ||
|
|
||
| ## Examples | ||
|
|
||
| Run the crate example that demonstrates multi-firmware support and PID extraction: | ||
|
|
||
| ```bash | ||
| cargo build --example bbl_crate_test | ||
| cargo run --example bbl_crate_test -- flight.BBL | ||
| ``` | ||
|
|
||
| More details: [examples/README.md](./examples/README.md) | ||
|
|
||
| ## Notes | ||
|
|
||
| - API is evolving while the project is WIP; names and structures may change. | ||
| - CSV field order and naming follow blackbox-tools to maximize compatibility. | ||
| - For CLI usage and high-level overview, see the main [README](./README.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.