mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 06:53:34 +08:00
ver:Print vMM.mm.pp format
This commit is contained in:
committed by
Lorenz Meier
parent
bf570dee2f
commit
f66f024e3a
@@ -128,10 +128,10 @@ int ver_main(int argc, char *argv[])
|
||||
unsigned type = (fwver >> (8 * 0)) & 0xFF;
|
||||
|
||||
if (type == 255) {
|
||||
printf("FW version: Release %u.%u.%u (%u)\n", major, minor, patch, fwver);
|
||||
printf("FW version: Release %x.%x.%x (%u)\n", major, minor, patch, fwver);
|
||||
|
||||
} else {
|
||||
printf("FW version: %u.%u.%u %u (%u)\n", major, minor, patch, type, fwver);
|
||||
printf("FW version: %x.%x.%x %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 %u.%u.%u (%u)\n", major, minor, patch, fwver);
|
||||
printf("OS version: Release %x.%x.%x (%u)\n", major, minor, patch, fwver);
|
||||
|
||||
} else {
|
||||
printf("OS version: %u.%u.%u %u (%u)\n", major, minor, patch, type, fwver);
|
||||
printf("OS version: %x.%x.%x %x (%u)\n", major, minor, patch, type, fwver);
|
||||
}
|
||||
|
||||
const char *os_git_hash = px4_os_version_string();
|
||||
|
||||
Reference in New Issue
Block a user