mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 23:53:33 +08:00
uavcan: remove assert() for git name check
This commit is contained in:
@@ -622,7 +622,6 @@ void UavcanNode::fill_node_info()
|
|||||||
// Extracting the first 8 hex digits of the git hash and converting them to int
|
// Extracting the first 8 hex digits of the git hash and converting them to int
|
||||||
char fw_git_short[9] = {};
|
char fw_git_short[9] = {};
|
||||||
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
||||||
assert(fw_git_short[8] == '\0');
|
|
||||||
char *end = nullptr;
|
char *end = nullptr;
|
||||||
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
||||||
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
||||||
|
|||||||
@@ -214,7 +214,6 @@ void UavcanEsc::fill_node_info()
|
|||||||
// Extracting the first 8 hex digits of the git hash and converting them to int
|
// Extracting the first 8 hex digits of the git hash and converting them to int
|
||||||
char fw_git_short[9] = {};
|
char fw_git_short[9] = {};
|
||||||
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
||||||
assert(fw_git_short[8] == '\0');
|
|
||||||
char *end = nullptr;
|
char *end = nullptr;
|
||||||
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
||||||
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ void UavcanNode::fill_node_info()
|
|||||||
// Extracting the first 8 hex digits of the git hash and converting them to int
|
// Extracting the first 8 hex digits of the git hash and converting them to int
|
||||||
char fw_git_short[9] = {};
|
char fw_git_short[9] = {};
|
||||||
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
std::memmove(fw_git_short, px4_firmware_version_string(), 8);
|
||||||
assert(fw_git_short[8] == '\0');
|
|
||||||
char *end = nullptr;
|
char *end = nullptr;
|
||||||
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);
|
||||||
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
swver.optional_field_flags |= swver.OPTIONAL_FIELD_FLAG_VCS_COMMIT;
|
||||||
|
|||||||
Reference in New Issue
Block a user