mapping
Shared gamepad bindings for flight and ground manual control.
Classes:
| Name | Description |
|---|---|
AxisBinding |
Map one normalized gamepad axis to a controller target channel. |
Functions:
| Name | Description |
|---|---|
flight_axis_bindings |
Return PX4-style gamepad bindings for a flight control mode. |
ground_axis_bindings |
Return shared differential-drive gamepad bindings. |
apply_axis_binding |
Apply a normalized axis sample to a mutable batched target dict. |
clear_motion_targets |
Clear rate-like targets when switching between flight and ground. |
AxisBinding
dataclass
AxisBinding(target_key: str, axis: int | None, scale: float, incremental: bool = False, wrap_angle: bool = False)
Map one normalized gamepad axis to a controller target channel.
flight_axis_bindings
flight_axis_bindings(control_mode: str, params: VehicleParams, position_step: tuple[float, float, float] = (1.0, 1.0, 0.5)) -> dict[str, AxisBinding]
Return PX4-style gamepad bindings for a flight control mode.
ground_axis_bindings
ground_axis_bindings(params: VehicleParams) -> dict[str, AxisBinding]
Return shared differential-drive gamepad bindings.
apply_axis_binding
apply_axis_binding(target: ControllerTarget, binding: AxisBinding, value: float) -> None
Apply a normalized axis sample to a mutable batched target dict.
clear_motion_targets
clear_motion_targets(target: ControllerTarget) -> None
Clear rate-like targets when switching between flight and ground.