Skip to content

Supervisor: legacy CRTP fallback for pre-protocol-12 firmware#597

Merged
gemenerik merged 3 commits intomasterfrom
rik/supervisor-backward-compat
Apr 10, 2026
Merged

Supervisor: legacy CRTP fallback for pre-protocol-12 firmware#597
gemenerik merged 3 commits intomasterfrom
rik/supervisor-backward-compat

Conversation

@gemenerik
Copy link
Copy Markdown
Member

Supervisor methods now fall back to legacy CRTP ports when connected to firmware with protocol < 12 (arming/recovery → platform port, emergency stop → localization port), emitting a warning on fallback. This fixes commands being silently dropped against old firmware.

The deprecated platform.send_arming_request and
platform.send_crash_recovery_request delegated to the supervisor
module which version-gates on protocol >= 12, causing commands to be
silently dropped against old firmware. Add fallback to the old
platform port protocol, matching the pattern used in
localization.send_emergency_stop.
Supervisor methods now fall back to legacy CRTP ports when connected
to firmware with protocol < 12. Arming/recovery falls back to the
platform port, emergency stop to the localization port. A warning is
emitted in all fallback cases.

Reverts platformservice.py wrappers back to simple delegation since
supervisor.py now handles the fallback itself.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds backward-compatible behavior in Supervisor so critical commands (arming/recovery/emergency stop) still work when connected to older Crazyflie firmware that does not support the supervisor CRTP port (protocol < 12), while emitting a warning on fallback.

Changes:

  • Introduce legacy-firmware detection and centralized warning helper.
  • Route arming and crash recovery commands to the legacy PLATFORM port on older firmware.
  • Route emergency stop commands to the legacy LOCALIZATION port on older firmware (with packed payloads).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemenerik gemenerik merged commit c8bf364 into master Apr 10, 2026
1 check passed
@gemenerik gemenerik deleted the rik/supervisor-backward-compat branch April 10, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants