Skip to main content

Module testing

Module testing 

Source
Expand description

Test doubles for the pipeline traits. Enabled by the testing feature (and in this crate’s own tests); off by default.

Use these in tests of anything built on the core — runners, backends, firmware glue — instead of writing per-crate mocks. They allocate nothing, so they also work in no_std tests.

Recover a double after running a FlightLoop with FlightLoop::into_parts.

[dev-dependencies]
stable-flight = { version = "0.1", features = ["testing"] }

Modules§

conformance
Frame-conformance kit for state sources: simulator backends and estimators.

Structs§

ConstantCommander
A commander that emits the same command every tick. The default is a disarmed, zero-throttle attitude command.
NullVehicle
A vehicle that reports a fixed state, ignores commands, and counts both.
RecordedTick
An owned copy of one TelemetryRecord; fields mean what they do there.
RecordingTelemetry
A telemetry sink that keeps the last N ticks (a fixed-size ring, no allocation) and counts all of them.

Functions§

settled_yaw_rate
The yaw rate in rad/s that a BodyRateController with config settles at while commanding zero rate against a constant yaw disturbance torque (normalized moment, nose right positive).