board_name.c: remove the file and HW_ARCH macro, use px4_board_name() instead

boards define BOARD_NAME, so board_name() is not necessary. HW_ARCH was
just a wrapper around board_name().

This patch simplifies to having only one common method px4_board_name().
This commit is contained in:
Beat Küng
2016-12-21 11:35:10 +01:00
committed by Lorenz Meier
parent 3d1f240351
commit c662113527
17 changed files with 39 additions and 118 deletions
+3 -3
View File
@@ -183,14 +183,14 @@ int UavcanNode::getHardwareVersion(uavcan::protocol::HardwareVersion &hwver)
int rv = -1;
if (UavcanNode::instance()) {
if (!std::strncmp(HW_ARCH, "PX4FMU_V1", 9)) {
if (!std::strncmp(px4_board_name(), "PX4FMU_V1", 9)) {
hwver.major = 1;
} else if (!std::strncmp(HW_ARCH, "PX4FMU_V2", 9)) {
} else if (!std::strncmp(px4_board_name(), "PX4FMU_V2", 9)) {
hwver.major = 2;
} else {
; // All other values of HW_ARCH resolve to zero
; // All other values of px4_board_name() resolve to zero
}
uint8_t udid[12] = {}; // Someone seems to love magic numbers