mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 14:03:39 +08:00
version: add support for vendor version
This adds support for parsing git tags which include a vendor version. E.g. vX.Y.Z-A.B.Crc1, whereas X.Y.Z are numbers defining the upstream version and A.B.C is the vendor version.
This commit is contained in:
committed by
Beat Küng
parent
0d7d6e59f5
commit
28ca3b8d4c
@@ -98,12 +98,41 @@ static inline const char *px4_build_uri(void)
|
||||
return STRINGIFY(BUILD_URI);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a version tag string to a number
|
||||
* @param tag version tag in one of the following forms:
|
||||
* - dev: v1.4.0rc3-7-g7e282f57
|
||||
* - rc: v1.4.0rc4
|
||||
* - release: v1.4.0
|
||||
* - linux: 7.9.3
|
||||
* @return version in the form 0xAABBCCTT (AA: Major, BB: Minor, CC: Patch, TT Type @see FIRMWARE_TYPE)
|
||||
*/
|
||||
__EXPORT uint32_t version_tag_to_number(const char *tag);
|
||||
|
||||
/**
|
||||
* get the PX4 Firmware version
|
||||
* @return version in the form 0xAABBCCTT (AA: Major, BB: Minor, CC: Patch, TT Type @see FIRMWARE_TYPE)
|
||||
*/
|
||||
__EXPORT uint32_t px4_firmware_version(void);
|
||||
|
||||
/**
|
||||
* Convert a version tag string to a vendor version number
|
||||
* @param tag version tag in one of the following forms:
|
||||
* - vendor: v1.4.0-0.2.0
|
||||
* - dev: v1.4.0rc3-7-g7e282f57
|
||||
* - rc: v1.4.0rc4
|
||||
* - release: v1.4.0
|
||||
* - linux: 7.9.3
|
||||
* @return version in the form 0xAABBCC (AA: Major, BB: Minor, CC: Patch)
|
||||
*/
|
||||
__EXPORT uint32_t version_tag_to_vendor_version_number(const char *tag);
|
||||
|
||||
/**
|
||||
* get the PX4 Firmware vendor version
|
||||
* @return version in the form 0xAABBCC (AA: Major, BB: Minor, CC: Patch)
|
||||
*/
|
||||
__EXPORT uint32_t px4_firmware_vendor_version(void);
|
||||
|
||||
/**
|
||||
* get the board version (last 8 bytes should be silicon ID, if any)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user