mavlink_receiver: Reject own autopilot messages for battery status.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
Claudio Micheli
2019-11-14 22:20:22 +01:00
committed by Lorenz Meier
parent 6369ae858a
commit 9364393e9d
+2 -2
View File
@@ -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;
}