From 74f75dcd312b4d30344fd46233a03c55357a2b7d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 15 Oct 2020 13:08:11 +1100 Subject: [PATCH] GCS_MAVLink: fill AUTOPILOT_VERSION.uid2 from get_system_id_unformatted --- libraries/GCS_MAVLink/GCS_Common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 155b6e9f99..835e9a4f4f 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -2238,6 +2238,11 @@ void GCS_MAVLINK::send_autopilot_version() const uint16_t product_id = 0; uint64_t uid = 0; uint8_t uid2[MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_UID2_LEN] = {0}; + + uint8_t uid_len = sizeof(uid2); // taken as reference and modified + // by following call: + hal.util->get_system_id_unformatted(uid2, uid_len); + const AP_FWVersion &version = AP::fwversion(); flight_sw_version = version.major << (8 * 3) | \