mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: log to dataflash statustext messages from my_gcs
This commit is contained in:
parent
748beb094d
commit
72da58960c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user