mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 07:53:35 +08:00
mavlink_receiver: Reject own autopilot messages for battery status.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Lorenz Meier
parent
6369ae858a
commit
9364393e9d
@@ -1597,8 +1597,8 @@ MavlinkReceiver::handle_message_ping(mavlink_message_t *msg)
|
||||
void
|
||||
MavlinkReceiver::handle_message_battery_status(mavlink_message_t *msg)
|
||||
{
|
||||
if (msg->sysid != mavlink_system.sysid) {
|
||||
// ignore battery status of other system
|
||||
if ((msg->sysid != mavlink_system.sysid) || (msg->compid == mavlink_system.compid)) {
|
||||
// ignore battery status coming from other systems or from the autopilot itself
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user