mavlink: handle cellular_status messages for logging

This commit is contained in:
JaeyoungLim
2019-11-13 09:19:02 -05:00
committed by Daniel Agar
parent 675af4f5f9
commit 6bd4273b9c
6 changed files with 40 additions and 0 deletions
+24
View File
@@ -190,6 +190,10 @@ MavlinkReceiver::handle_message(mavlink_message_t *msg)
handle_message_landing_target(msg);
break;
case MAVLINK_MSG_ID_CELLULAR_STATUS:
handle_message_cellular_status(msg);
break;
case MAVLINK_MSG_ID_ADSB_VEHICLE:
handle_message_adsb_vehicle(msg);
break;
@@ -2194,6 +2198,26 @@ MavlinkReceiver::handle_message_landing_target(mavlink_message_t *msg)
}
}
void
MavlinkReceiver::handle_message_cellular_status(mavlink_message_t *msg)
{
mavlink_cellular_status_t status;
mavlink_msg_cellular_status_decode(msg, &status);
cellular_status_s cellular_status{};
cellular_status.timestamp = hrt_absolute_time();
cellular_status.status = status.status;
cellular_status.type = status.type;
cellular_status.quality = status.quality;
cellular_status.mcc = status.mcc;
cellular_status.mnc = status.mnc;
cellular_status.lac = status.lac;
cellular_status.cid = status.cid;
_cellular_status_pub.publish(cellular_status);
}
void
MavlinkReceiver::handle_message_adsb_vehicle(mavlink_message_t *msg)
{