Rover: log to dataflash statustext messages from my_gcs

This commit is contained in:
Tom Pittenger 2016-09-26 00:13:39 -07:00
parent 748beb094d
commit 72da58960c

View File

@ -822,6 +822,20 @@ void GCS_MAVLINK_Rover::handleMessage(mavlink_message_t* msg)
break; break;
} }
case MAVLINK_MSG_ID_STATUSTEXT:
{
// ignore any statustext messages not from our GCS:
if (msg->sysid != rover.g.sysid_my_gcs) {
break;
}
mavlink_statustext_t packet;
mavlink_msg_statustext_decode(msg, &packet);
char text[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1+4] = { 'G','C','S',':'};
memcpy(&text[4], packet.text, MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN);
rover.DataFlash.Log_Write_Message(text);
break;
}
case MAVLINK_MSG_ID_COMMAND_INT: { case MAVLINK_MSG_ID_COMMAND_INT: {
// decode packet // decode packet
mavlink_command_int_t packet; mavlink_command_int_t packet;