mirror of https://github.com/ArduPilot/ardupilot
Copter: log to dataflash statustext messages from my_gcs
This commit is contained in:
parent
31321b3b60
commit
748beb094d
|
@ -1094,6 +1094,20 @@ void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg)
|
|||
break;
|
||||
}
|
||||
|
||||
case MAVLINK_MSG_ID_STATUSTEXT:
|
||||
{
|
||||
// ignore any statustext messages not from our GCS:
|
||||
if (msg->sysid != copter.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);
|
||||
copter.DataFlash.Log_Write_Message(text);
|
||||
break;
|
||||
}
|
||||
|
||||
case MAVLINK_MSG_ID_GIMBAL_REPORT:
|
||||
{
|
||||
#if MOUNT == ENABLED
|
||||
|
|
Loading…
Reference in New Issue