[package]
name = "blackbox-logger"
version = "0.1.4"
edition = "2024"
authors = ["Martin Budden"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/martinbudden/crate-blackbox-logger"
description = "Betaflight compatible blackbox flight data recorder."
keywords = ["blackbox", "no-std", "betaflight"]
categories = [
    "embedded",
    "mathematics",
    "no-std",
    "science::robotics",
    "aerospace::drones",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--html-in-header", "katex-header.html"]

[build-dependencies]
rustc_version = "0.4.1"

[features]
#default =[]
default = ["libm", "dshot_telemetry", "gps"]
#default = ["libm", "dshot_telemetry", "gps", "serde"]
#default = ["dshot_telemetry", "eight_motors", "gps"]
#default = ["dshot_telemetry", "eight_motors", "gps", "servos"]
std = ["embassy-executor/platform-std", "vqm/std"]
libm = ["vqm/libm"]
serde = ["dep:serde", "postcard?/use-defmt", "vqm/serde"]
no_align = ["vqm/no_align"]
simd = ["vqm/simd"]

barometer=[]
eight_motors = []
servos = []
dshot_telemetry = []
rangefinder = []
magnetometer = []
gps = []

[dependencies]
serde = { version = "1.0.228", default-features = false, features = ["derive"], optional = true }
postcard = { version = "1.1.3", default-features = false, features = ["embedded-io"], optional = true }
vqm = { version = "0.1.8" }
#vqm = { git = "https://github.com/martinbudden/crate-vector-quaternion-matrix" }
#vqm = { path = "../vqm" }
simple-bitset = "0.1.0"

#embassy-executor = { version = "0.10.0", features = ["arch-std", "executor-thread"] }
embassy-executor = { version = "0.10.0", features = ["platform-std", "executor-thread"] }
embassy-futures = { version = "0.1.2" }

[dev-dependencies]
approx = { version = "0.5.1", default-features = false }
pollster = "0.4.0"

# see https://doc.rust-lang.org/cargo/reference/profiles.html
[profile.dev]
opt-level = 0
debug = "line-tables-only"
# split-debuginfo = '...'  # Platform-specific.
strip = "none"
debug-assertions = true
overflow-checks = true
lto = false
panic = 'unwind'
incremental = true
codegen-units = 256
rpath = false

[profile.dev.package."*"]
debug = false

[profile.debugging]
inherits = "dev"
debug = true

[profile.release]
opt-level = 3
debug = false
# split-debuginfo = '...'  # Platform-specific.
strip = "none"
debug-assertions = false
overflow-checks = false
lto = false
panic = 'abort'
incremental = false
codegen-units = 16
rpath = false

[profile.release-lto]
inherits = "release"
lto = true
