AP_BoardConfig: support MindPX-v2
This commit is contained in:
parent
51f9f087ab
commit
5458377e67
@ -4,7 +4,7 @@
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3) || defined(HAL_CHIBIOS_ARCH_FMUV4)
|
||||
#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)
|
||||
#define AP_FEATURE_BOARD_DETECT 1
|
||||
#define AP_FEATURE_SAFETY_BUTTON 1
|
||||
#else
|
||||
@ -72,6 +72,7 @@ public:
|
||||
PX4_BOARD_PIXHAWK_PRO = 14,
|
||||
PX4_BOARD_AUAV21 = 20,
|
||||
PX4_BOARD_PCNC1 = 21,
|
||||
PX4_BOARD_MINDPXV2 = 22,
|
||||
PX4_BOARD_OLDDRIVERS = 100,
|
||||
#endif
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
|
@ -94,6 +94,7 @@ void AP_BoardConfig::board_setup_drivers(void)
|
||||
case PX4_BOARD_AEROFC:
|
||||
case PX4_BOARD_PIXHAWK_PRO:
|
||||
case PX4_BOARD_PCNC1:
|
||||
case PX4_BOARD_MINDPXV2:
|
||||
break;
|
||||
default:
|
||||
sensor_config_error("Unknown board type");
|
||||
@ -213,6 +214,10 @@ void AP_BoardConfig::board_autodetect(void)
|
||||
// only one choice
|
||||
state.board_type.set_and_notify(PX4_BOARD_PIXRACER);
|
||||
hal.console->printf("Detected Pixracer\n");
|
||||
#elif defined(HAL_CHIBIOS_ARCH_MINDPXV2)
|
||||
// only one choice
|
||||
state.board_type.set_and_notify(PX4_BOARD_MINDPXV2);
|
||||
hal.console->printf("Detected MindPX-V2\n");
|
||||
#elif defined(CONFIG_ARCH_BOARD_PX4FMU_V4PRO)
|
||||
// only one choice
|
||||
state.board_type.set_and_notify(PX4_BOARD_PIXHAWK_PRO);
|
||||
|
Loading…
Reference in New Issue
Block a user