mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 23:34:07 +08:00
ver:The recent changes to version.c return values in base10
This is part 2 of the fix. The tool that extracts the nuttx git tag was broken by a new tag added the did not match the form nuttx-M.mm. To the value was printed as OS: NuttX OS version: 0.0.0 c0 (192) Once that issue was fixed, it was apparent that recent changes to version.c return the values as base 10, before it was hex. This fixes the formatting.
This commit is contained in:
parent
de97ff163b
commit
b5275ecd52
@ -128,10 +128,10 @@ int ver_main(int argc, char *argv[])
|
||||
unsigned type = (fwver >> (8 * 0)) & 0xFF;
|
||||
|
||||
if (type == 255) {
|
||||
printf("FW version: Release %x.%x.%x (%u)\n", major, minor, patch, fwver);
|
||||
printf("FW version: Release %u.%u.%u (%u)\n", major, minor, patch, fwver);
|
||||
|
||||
} else {
|
||||
printf("FW version: %x.%x.%x %x (%u)\n", major, minor, patch, type, fwver);
|
||||
printf("FW version: %u.%u.%u %x (%u)\n", major, minor, patch, type, fwver);
|
||||
}
|
||||
|
||||
|
||||
@ -143,10 +143,10 @@ int ver_main(int argc, char *argv[])
|
||||
printf("OS: %s\n", px4_os_name());
|
||||
|
||||
if (type == 255) {
|
||||
printf("OS version: Release %x.%x.%x (%u)\n", major, minor, patch, fwver);
|
||||
printf("OS version: Release %u.%u.%u (%u)\n", major, minor, patch, fwver);
|
||||
|
||||
} else {
|
||||
printf("OS version: %x.%x.%x %x (%u)\n", major, minor, patch, type, fwver);
|
||||
printf("OS version: %u.%u.%u %u (%u)\n", major, minor, patch, type, fwver);
|
||||
}
|
||||
|
||||
const char *os_git_hash = px4_os_version_string();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user