From 71be528bc1449e26f2c467e53eb6cb4374ab0824 Mon Sep 17 00:00:00 2001 From: Jari Nippula Date: Mon, 6 May 2024 13:01:35 +0300 Subject: [PATCH] Fix user side hw_subtype string fetch --- platforms/nuttx/src/px4/common/usr_mcu_version.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/src/px4/common/usr_mcu_version.cpp b/platforms/nuttx/src/px4/common/usr_mcu_version.cpp index a641ceb7a3d7..e5b2d2066293 100644 --- a/platforms/nuttx/src/px4/common/usr_mcu_version.cpp +++ b/platforms/nuttx/src/px4/common/usr_mcu_version.cpp @@ -190,7 +190,7 @@ int board_determine_hw_info(void) orb_copy(ORB_ID(hw_info), hwinfo_sub, &hwinfo); orb_unsubscribe(hwinfo_sub); - memcpy(hw_info, &hwinfo, min(sizeof(hwinfo), sizeof(hw_info))); + memcpy(hw_info, hwinfo.hw_info, min(sizeof(hwinfo.hw_info), sizeof(hw_info))); /* Drone guid */ guid_sub = orb_subscribe(ORB_ID(guid));