You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like mavros tries to report parse_error and packet_rx_drop_count under /diagnostics (mavlink_diag.cpp), but their values are never incremented.
The problem seem to be in the way MAVConnInterface::parse_buffer tries to count those. It increments the m_status.parse_error, but m_status.parse_error is set to 0 in every call to mavlink_frame_char_buffer, and therefore when mavlink_diag calls get_status(), it always sees these values as 0.
MAVROS version and platform
Mavros: ?0.31.0?
ROS: ?Melodic?
Ubuntu: ?18.04?
Autopilot type and version
[ ] ArduPilot
[ X ] PX4
The text was updated successfully, but these errors were encountered:
koby08
added a commit
to koby08/mavros
that referenced
this issue
Jul 31, 2019
…error counters
Currently the dropped_packets & parse_error counters are always published as 0 in mavros_diag.cpp.
This seems to be caused by using the wrong status struct.
Seems like mavros was editing m_status after mavlink_frame_char_buffer. This struct
seems to be the parsing state, and looks like it shouldn't be modified by the caller (for example
status->parse_error is zeroed out in the end of mavlink_frame_char_buffer).
Also, the crc & signature checks done in mavros seems redundant.
r_mavlink_status seems to be the struct that holds the mavlink connection information, therefore I
changed get_status to return it instead.
This fixesmavlink#1285.
…error counters
Currently the dropped_packets & parse_error counters are always published as 0 in mavros_diag.cpp.
This seems to be caused by using the wrong status struct.
Seems like mavros was editing m_status after mavlink_frame_char_buffer. This struct
seems to be the parsing state, and looks like it shouldn't be modified by the caller (for example
status->parse_error is zeroed out in the end of mavlink_frame_char_buffer).
Also, the crc & signature checks done in mavros seems redundant.
r_mavlink_status seems to be the struct that holds the mavlink connection information, therefore I
changed get_status to return it instead.
This fixes#1285.
Seems like mavros tries to report parse_error and packet_rx_drop_count under /diagnostics (mavlink_diag.cpp), but their values are never incremented.
The problem seem to be in the way MAVConnInterface::parse_buffer tries to count those. It increments the m_status.parse_error, but m_status.parse_error is set to 0 in every call to mavlink_frame_char_buffer, and therefore when mavlink_diag calls get_status(), it always sees these values as 0.
MAVROS version and platform
Mavros: ?0.31.0?
ROS: ?Melodic?
Ubuntu: ?18.04?
Autopilot type and version
[ ] ArduPilot
[ X ] PX4
The text was updated successfully, but these errors were encountered: