From 79a4efec3ae6d48fa6314611bd98dd7f2b534d6d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Oct 2023 09:50:49 +1100 Subject: [PATCH] AP_Logger: added build directory to VER message this allows log review tools to use right parameter and mode map when vendor has changed the vehicle type strings --- libraries/AP_Logger/AP_Logger_Backend.cpp | 5 +++++ libraries/AP_Logger/LogStructure.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Logger/AP_Logger_Backend.cpp b/libraries/AP_Logger/AP_Logger_Backend.cpp index 2a3e98ecee9543..db93e1af0cf334 100644 --- a/libraries/AP_Logger/AP_Logger_Backend.cpp +++ b/libraries/AP_Logger/AP_Logger_Backend.cpp @@ -573,6 +573,11 @@ bool AP_Logger_Backend::Write_VER() patch: fwver.patch, fw_type: fwver.fw_type, git_hash: fwver.fw_hash, +#ifdef APM_BUILD_DIRECTORY + build_type: APM_BUILD_DIRECTORY, +#else + build_type: 0, +#endif }; strncpy(pkt.fw_string, fwver.fw_string, ARRAY_SIZE(pkt.fw_string)-1); diff --git a/libraries/AP_Logger/LogStructure.h b/libraries/AP_Logger/LogStructure.h index c9226dae46f456..cfbfbbb1780314 100644 --- a/libraries/AP_Logger/LogStructure.h +++ b/libraries/AP_Logger/LogStructure.h @@ -670,6 +670,7 @@ struct PACKED log_VER { uint32_t git_hash; char fw_string[64]; uint16_t _APJ_BOARD_ID; + uint8_t build_type; }; @@ -1317,7 +1318,7 @@ LOG_STRUCTURE_FROM_AIS \ { LOG_SCRIPTING_MSG, sizeof(log_Scripting), \ "SCR", "QNIii", "TimeUS,Name,Runtime,Total_mem,Run_mem", "s#sbb", "F-F--", true }, \ { LOG_VER_MSG, sizeof(log_VER), \ - "VER", "QBHBBBBIZH", "TimeUS,BT,BST,Maj,Min,Pat,FWT,GH,FWS,APJ", "s---------", "F---------", false }, \ + "VER", "QBHBBBBIZHB", "TimeUS,BT,BST,Maj,Min,Pat,FWT,GH,FWS,APJ,BU", "s----------", "F----------", false }, \ { LOG_MOTBATT_MSG, sizeof(log_MotBatt), \ "MOTB", "QfffffB", "TimeUS,LiftMax,BatVolt,ThLimit,ThrAvMx,ThrOut,FailFlags", "s------", "F------" , true }