assign_switch
Map a multi-position switch's detents to flight modes in one call. Computes µs ranges and writes AUX assignments, with dry-run and safety checks.
Instructions
Map a multi-position switch's detents to flight modes in one call.
Computes the µs range for each detent and writes one 'aux' assignment per mode. Dry-run by default. Gates: connected, not armed, auto-backup before write.
Args: switch_channel: 1-based AUX number the switch is on (1 = AUX1 = RC channel 5). switch_positions: Number of detents on the switch: 2, 3, or 6. mode_per_position: Map of position → mode name. Position keys may be "low"/"mid"/"high" (for 2/3-pos) or "1".."N" / "pos1".., e.g. {"low": "ANGLE", "mid": "HORIZON", "high": "MANUAL"}. confirm: True to apply. Default False = dry-run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| switch_channel | Yes | ||
| switch_positions | Yes | ||
| mode_per_position | Yes |