#87 39b: MAVLink bridge — ARM intercept + AUT enforcement - #89
Merged
Merged
Conversation
On COMMAND_LONG MAV_CMD_COMPONENT_ARM_DISARM (param1=1): - With --require-aut: calls GET /airspaceUsageToken/find with PUSHPAKA_TOKEN - If any AUT in CREATED or INUSE state → ARM passes through - Otherwise → sends immediate DISARM to SITL (reactive, same as QGC #76) - Fail-safe: ARM blocked if token missing or flight-auth unreachable - HEARTBEAT handler extended to log armed/disarmed state transitions README updated with --require-aut usage and enforcement behaviour table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .github/workflows/python-ci.yml: triggers on sitl-bridge/** changes; runs ruff check + ruff format --check on Python 3.11 - sitl-bridge/pyproject.toml: ruff config (target py311, line-length 100, E/F/W/I rules) - sitl-bridge/bridge.py: auto-formatted to pass ruff format --check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the MAVLink bridge with ARM enforcement: when
--require-autis set, ARM commands are checked against the flight-auth API and immediately reversed if no active AUT is found.Changes
bridge.py:_on_command_long()— interceptsMAV_CMD_COMPONENT_ARM_DISARM(arm only; disarm passes through)_has_active_aut()— callsGET /airspaceUsageToken/findwithPUSHPAKA_TOKEN; returns True if any AUT isCREATEDorINUSE_send_disarm()— sendsMAV_CMD_COMPONENT_ARM_DISARMparam1=0 + force-disarm magic number to SITL--require-autCLI flag;PUSHPAKA_TOKENenv varREADME.md: updated with--require-autusage and enforcement behaviour tableEnforcement table
CREATED/INUSE)Test plan
python3 bridge.py --helpshows--require-aut--require-aut: ARM commands pass through unaffected--require-aut+ valid token + active AUT: ARM passes--require-aut+ valid token + no AUT: DISARM sent, logged--require-aut+ no token: ARM blocked, warning logged🤖 Generated with Claude Code