mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-26 10:38:28 -04:00
AP_BoardConfig: setup FMUv5 for board detection
This commit is contained in:
parent
01f5d1a17c
commit
751f290be6
@ -8,13 +8,13 @@
|
||||
#include <AP_Param_Helper/AP_Param_Helper.h>
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3) || defined(HAL_CHIBIOS_ARCH_FMUV4) || defined(HAL_CHIBIOS_ARCH_MINDPXV2)
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3) || defined(HAL_CHIBIOS_ARCH_FMUV4) || defined(HAL_CHIBIOS_ARCH_FMUV5) || defined(HAL_CHIBIOS_ARCH_MINDPXV2)
|
||||
#define AP_FEATURE_BOARD_DETECT 1
|
||||
#else
|
||||
#define AP_FEATURE_BOARD_DETECT 0
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3) || defined(HAL_CHIBIOS_ARCH_FMUV4) || defined(HAL_CHIBIOS_ARCH_MINDPXV2) || defined(HAL_GPIO_PIN_SAFETY_IN)
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3) || defined(HAL_CHIBIOS_ARCH_FMUV4) || defined(HAL_CHIBIOS_ARCH_FMUV5) || defined(HAL_CHIBIOS_ARCH_MINDPXV2) || defined(HAL_GPIO_PIN_SAFETY_IN)
|
||||
#define AP_FEATURE_SAFETY_BUTTON 1
|
||||
#else
|
||||
#define AP_FEATURE_SAFETY_BUTTON 0
|
||||
@ -90,6 +90,7 @@ public:
|
||||
PX4_BOARD_PCNC1 = 21,
|
||||
PX4_BOARD_MINDPXV2 = 22,
|
||||
PX4_BOARD_SP01 = 23,
|
||||
PX4_BOARD_FMUV5 = 24,
|
||||
VRX_BOARD_BRAIN51 = 30,
|
||||
VRX_BOARD_BRAIN52 = 32,
|
||||
VRX_BOARD_BRAIN52E = 33,
|
||||
|
@ -88,6 +88,7 @@ void AP_BoardConfig::board_setup_drivers(void)
|
||||
case PX4_BOARD_PX4V1:
|
||||
case PX4_BOARD_PIXHAWK:
|
||||
case PX4_BOARD_PIXHAWK2:
|
||||
case PX4_BOARD_FMUV5:
|
||||
case PX4_BOARD_SP01:
|
||||
case PX4_BOARD_PIXRACER:
|
||||
case PX4_BOARD_PHMINI:
|
||||
@ -239,6 +240,9 @@ void AP_BoardConfig::board_autodetect(void)
|
||||
#elif defined(CONFIG_ARCH_BOARD_AEROFC_V1)
|
||||
state.board_type.set_and_notify(PX4_BOARD_AEROFC);
|
||||
hal.console->printf("Detected Aero FC\n");
|
||||
#elif defined(HAL_CHIBIOS_ARCH_FMUV5)
|
||||
state.board_type.set_and_notify(PX4_BOARD_FMUV5);
|
||||
hal.console->printf("Detected FMUv5\n");
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V51)
|
||||
state.board_type.set_and_notify(VRX_BOARD_BRAIN51);
|
||||
hal.console->printf("Detected VR Brain 5.1\n");
|
||||
|
Loading…
Reference in New Issue
Block a user