Skip to content

Pymavlink mavftp#1684

Merged
amilcarlucas merged 2 commits into
masterfrom
pymavlink_mavftp
Jun 8, 2026
Merged

Pymavlink mavftp#1684
amilcarlucas merged 2 commits into
masterfrom
pymavlink_mavftp

Conversation

@amilcarlucas
Copy link
Copy Markdown
Collaborator

Description

Describe what this PR is trying to achieve. Please read our Contributing Guide for detailed guidelines.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Copilot AI review requested due to automatic review settings June 7, 2026 23:13
Copy link
Copy Markdown
Contributor

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

This PR tightens up the MAVLink FTP backend implementation by adding type annotations, improving None-safety around FTP payload handling, and removing the Ruff per-file ignore for backend_mavftp.py so the file is linted consistently with the rest of the project.

Changes:

  • Added/expanded type annotations across MAVFTP-related classes and methods (callbacks, args, internal helpers).
  • Hardened several code paths against None payloads and ensured numeric settings are coerced to int where required.
  • Removed the Ruff per-file ignore for ardupilot_methodic_configurator/backend_mavftp.py and added targeted # noqa annotations in-code instead.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Removes Ruff per-file ignores for backend_mavftp.py, making it subject to standard linting rules.
ardupilot_methodic_configurator/backend_mavftp.py Adds typing and None-safety improvements throughout the MAVFTP implementation and CLI helpers.
Comments suppressed due to low confidence (1)

ardupilot_methodic_configurator/backend_mavftp.py:1682

  • The heartbeat log message prints the system ID twice; the second placeholder is labeled "component" but uses m.target_system again. This makes the log misleading and can complicate debugging multi-component systems.
def wait_heartbeat(m: "MavlinkConnection") -> None:
    """Wait for a heartbeat so we know the target system IDs."""
    logging.info("Waiting for flight controller heartbeat")
    m.wait_heartbeat(timeout=5)
    logging.info("Heartbeat from system %u, component %u", m.target_system, m.target_system)

Comment on lines 1418 to 1421
"""Save Ardupilot parameter information to a local file."""
if not pdict:
if not pdict or not filename:
return
with open(filename, "w", encoding="utf-8") as f:
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
13151 12410 94% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: be0f919 by action🐍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

Test Results

     4 files  ±0       4 suites  ±0   44m 4s ⏱️ +8s
 4 047 tests ±0   4 039 ✅  - 1   7 💤 ±0  0 ❌ ±0  1 🔥 +1 
15 980 runs  ±0  15 934 ✅ ±0  45 💤  - 1  0 ❌ ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit be0f919. ± Comparison against base commit c893c4a.

♻️ This comment has been updated with latest results.

@amilcarlucas amilcarlucas force-pushed the pymavlink_mavftp branch 2 times, most recently from 21f0568 to fa5da81 Compare June 8, 2026 00:50
@amilcarlucas amilcarlucas requested a review from Copilot June 8, 2026 00:51
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

ardupilot_methodic_configurator/backend_mavftp.py:1682

  • The heartbeat log message prints m.target_system for both the system and component fields, so the component ID is never shown correctly.
def wait_heartbeat(m: "MavlinkConnection") -> None:
    """Wait for a heartbeat so we know the target system IDs."""
    logging.info("Waiting for flight controller heartbeat")
    m.wait_heartbeat(timeout=5)
    logging.info("Heartbeat from system %u, component %u", m.target_system, m.target_system)

@amilcarlucas amilcarlucas merged commit 6f01482 into master Jun 8, 2026
28 of 32 checks passed
@amilcarlucas amilcarlucas deleted the pymavlink_mavftp branch June 8, 2026 01:49
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