ArduPilot / ArduPilot/pymavlink

status parse_error count reset on each mavlink_frame_char_buffer

Open
#95 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
730
Forks
741
Avg merge
4d 10h
Merged PRs (30d)
7

Description

I came across a strange thing in the C helper functions:
file: pymavlink/generator/C/include_v2.0/mavlink_helpers.h
line: 821

status->parse_error = 0;

seems strange to reset this counter, it become kind of useless.
It seems that either this line shouldn't exist, moreover, the parse_error value is never copied to r_mavlink_status so this should be added:

r_mavlink_status->parse_error = status->parse_error;

Or the parse_error counter is always zero even if there are actually errors

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pymavlink/generator/C/include_v2.0/mavlink_helpers.h around line 821 and trace how status->parse_error and r_mavlink_status are handled by mavlink_frame_char_buffer. Confirm the counter's intended lifetime and whether the returned status preserves it; done means the parse_error value remains meaningful after parsing errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.