Browse Source

Merge pull request #6895 from jlecoeur/pr-debug_float_array

Add support for message DEBUG_FLOAT_ARRAY
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
80f8b3c343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libs/mavlink/include/mavlink/v2.0
  2. 11
      src/ui/MAVLinkDecoder.cc

2
libs/mavlink/include/mavlink/v2.0

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit d8fcf0a694dc11b3f83b89a0970e3d8c4e48d418
Subproject commit e5f6257dd005b6fb3bff23d45f2b3b417b52539b

11
src/ui/MAVLinkDecoder.cc

@ -36,6 +36,7 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol) : @@ -36,6 +36,7 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol) :
textMessageFilter.insert(MAVLINK_MSG_ID_DEBUG, false);
textMessageFilter.insert(MAVLINK_MSG_ID_DEBUG_VECT, false);
textMessageFilter.insert(MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY, false);
textMessageFilter.insert(MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, false);
textMessageFilter.insert(MAVLINK_MSG_ID_NAMED_VALUE_INT, false);
// textMessageFilter.insert(MAVLINK_MSG_ID_HIGHRES_IMU, false);
@ -238,6 +239,16 @@ void MAVLinkDecoder::emitFieldValue(mavlink_message_t* msg, int fieldid, quint64 @@ -238,6 +239,16 @@ void MAVLinkDecoder::emitFieldValue(mavlink_message_t* msg, int fieldid, quint64
name = QString("%1.%2").arg(buf).arg(fieldName);
time = getUnixTimeFromMs(msg->sysid, (debug.time_usec+500)/1000); // Scale to milliseconds, round up/down correctly
}
else if (msgid == MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY)
{
mavlink_debug_float_array_t debug;
mavlink_msg_debug_float_array_decode(msg, &debug);
char buf[11];
strncpy(buf, debug.name, 10);
buf[10] = '\0';
name = QString("%1.%2").arg(buf).arg(fieldName);
time = getUnixTimeFromMs(msg->sysid, (debug.time_usec+500)/1000); // Scale to milliseconds, round up/down correctly
}
else if (msgid == MAVLINK_MSG_ID_DEBUG)
{
mavlink_debug_t debug;

Loading…
Cancel
Save