AP_Common: include integer version of hash in FWVersion struct

This commit is contained in:
Peter Barker 2022-02-02 11:45:39 +11:00 committed by Andrew Tridgell
parent 410507d54d
commit 8814486572
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,7 @@ public:
const uint32_t os_sw_version;
const char *fw_string;
const char *fw_hash_str;
const uint32_t fw_hash;
const char *fw_string_original;
const char *fw_short_string;
const char *middleware_name;

View File

@ -59,6 +59,11 @@ const AP_FWVersion AP_FWVersion::fwver{
#else
.fw_string = ACTIVE_FWSTR " (" GIT_VERSION ")",
.fw_hash_str = GIT_VERSION,
#endif
#ifndef GIT_VERSION_INT
.fw_hash = 0,
#else
.fw_hash = GIT_VERSION_INT,
#endif
.fw_string_original = ORIGINAL_FWSTR,
.fw_short_string = ACTIVE_FWSTR,