diff --git a/.github/instructions/rust-project.instructions.md b/.github/instructions/rust-project.instructions.md deleted file mode 100644 index ae1ef15..0000000 --- a/.github/instructions/rust-project.instructions.md +++ /dev/null @@ -1,48 +0,0 @@ -# Copilot Instructions for RUST Project - -## General -- **Entry Point:** Maintain source as `src/main.rs`. -- **Comments:** - - Do not remove or modify comments unless the related code is changed. - - Only add comments that explain code functionality; no AI instructional comments. -- **No External Binaries:** Never embed or call external binaries from RUST code. -- **Temporary Files:** Use `_temp.rs` extension for any temporary `.rs` files. -- **Build Quality:** Ensure `cargo build --release` has no errors or warnings. -- **File Editing:** Always edit files inline; do not use `cat` to write to files. - -## Algorithms -- **Method Selection:** - - When choosing math or scientific methods, compare alternatives for accuracy and efficiency. - - Fact-check method decisions. - -## Documentation -- **Readme:** Maintain a proper `README.md` file. -- **Overview** Maintain a proper `OVERVIEW.md` file -- **Summaries:** - - Output final summaries to `./INFORMATION/*.md` (not in git). - - Use date-prefixed, uppercase filenames (e.g., `2025-06-25_SUMMARY.md`). - - List new files when created. - -## Goals & Resources -- **Goals:** Reference project goals in `GOALS.md` and request clarification if needed. -- **Source Code Resources:** - - Primary: [blackbox_decode (blackbox-tools)](https://github.com/betaflight/blackbox-tools/blob/master/src/blackbox_decode.c) - - Fallback: [blackbox-log-viewer (BBE)](https://github.com/betaflight/blackbox-log-viewer/blob/master/src/flightlog.js) - -## Data Validation -- **REQUIRED:** The CSV output must precisely match the format and header order of blackbox_decode CSV files. - -## Committing Rules -- **Commit Conditions:** Only commit if: - - `cargo clippy -- -D warnings` passes. - - `cargo fmt --all -- --check` passes. - - `cargo test --verbose` passes. - - `cargo test --features=cli --verbose` passes. -- **Files to Commit:** - - Only `src/**/*.rs`, `Cargo.*`, `README.md`, `OVERVIEW.md` and `.gitignore` — never `git add .` or `git add -A`. - - Follow `.gitignore`. -- **User Confirmation:** Ask user before committing. -- **Commit Message:** - - Check `git diff --cached` before committing. - - Use concise commit messages and descriptions. - - Use `feat:`, `fix:`, `docs:` where applicable. diff --git a/src/main.rs b/src/main.rs index af70ca0..47367c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -261,7 +261,7 @@ impl CsvFieldMap { fn build_command() -> Command { Command::new("BBL Parser") .version(env!("CARGO_PKG_VERSION")) - .about("Read and parse BBL blackbox log files. Output to various formats.") + .about("Read and parse BBL blackbox log files. Exports to CSV by default (optionally GPX/JSON).") .arg( Arg::new("files") .help("BBL files to parse (.BBL, .BFL, .TXT extensions supported, case-insensitive, supports globbing)") @@ -275,16 +275,10 @@ fn build_command() -> Command { .help("Enable debug output and detailed parsing information") .action(clap::ArgAction::SetTrue), ) - .arg( - Arg::new("csv") - .long("csv") - .help("Export decoded frame data to CSV files (creates .XX.csv for flight data and .XX.headers.csv for plaintext headers)") - .action(clap::ArgAction::SetTrue), - ) .arg( Arg::new("output-dir") .long("output-dir") - .help("Directory for CSV output files (default: same as input file)") + .help("Directory for output files (default: same as input file)") .value_name("DIR"), ) .arg( @@ -317,7 +311,6 @@ fn main() -> Result<()> { let matches = build_command().get_matches(); let debug = matches.get_flag("debug"); - let export_csv = matches.get_flag("csv"); let export_gpx = matches.get_flag("gpx") || matches.get_flag("gps"); let export_event = matches.get_flag("event"); let force_export = matches.get_flag("force-export"); @@ -335,7 +328,7 @@ fn main() -> Result<()> { }; let export_options = ExportOptions { - csv: export_csv, + csv: true, // CSV export is always enabled for the CLI binary gpx: export_gpx, event: export_event, output_dir: output_dir.clone(), @@ -468,11 +461,6 @@ fn main() -> Result<()> { std::process::exit(1); } - // Inform user when no output files were created due to missing --csv flag - if processed_files > 0 && !export_csv && !export_gpx && !export_event { - println!("\nNote: No output files were created. Use --csv to export data to CSV files."); - } - Ok(()) }