mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 13:17:35 +08:00
versioning: tag must contain patch, minor & major
This commit is contained in:
committed by
Beat Küng
parent
3dd4454a87
commit
6abe198226
@@ -119,11 +119,19 @@ uint32_t version_tag_to_number(const char *tag)
|
||||
if (buffer >= 0) {
|
||||
version[buffer_counter] = buffer;
|
||||
buffer_counter++;
|
||||
}
|
||||
|
||||
if (buffer_counter <= 0) {
|
||||
firmware_type = 0x00;
|
||||
}
|
||||
|
||||
version_number = ((uint8_t)version[0] << 8 * 3) |
|
||||
((uint8_t)version[1] << 8 * 2) |
|
||||
((uint8_t)version[2] << 8 * 1) | firmware_type;
|
||||
if (buffer_counter == 3 || buffer_counter == 6) {
|
||||
version_number = ((uint8_t)version[0] << 8 * 3) |
|
||||
((uint8_t)version[1] << 8 * 2) |
|
||||
((uint8_t)version[2] << 8 * 1) | firmware_type;
|
||||
} else {
|
||||
version_number = 0;
|
||||
}
|
||||
|
||||
return version_number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user