blackboxer 0.1.0

A Rust library for capturing, logging, and replaying MAVLink messages
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use blackboxer::{BlackBoxer, BlackBoxerConfig};
use std::env;

fn main() -> std::io::Result<()> {
    let args: Vec<String> = env::args().collect();
    let armed_only = args.contains(&"--armed-only".to_string());
    let addr = args.get(1).map_or("127.0.0.1:14552".to_string(), |s| s.clone());

    let config = BlackBoxerConfig {
        armed_only,
        addr,
    };

    let mut blackboxer = BlackBoxer::new(config)?;
    blackboxer.capture_messages()?;
    Ok(())
}