mirror of https://github.com/ArduPilot/ardupilot
AP_BoardConfig: added detection of Holybro6X-45686
This commit is contained in:
parent
34188e892f
commit
a25f10a914
|
@ -68,6 +68,7 @@ public:
|
|||
FMUV6_BOARD_HOLYBRO_6X = 40,
|
||||
FMUV6_BOARD_CUAV_6X = 41,
|
||||
FMUV6_BOARD_HOLYBRO_6X_REV6 = 42,
|
||||
FMUV6_BOARD_HOLYBRO_6X_45686 = 43,
|
||||
PX4_BOARD_OLDDRIVERS = 100,
|
||||
};
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ void AP_BoardConfig::board_setup_drivers(void)
|
|||
case PX4_BOARD_MINDPXV2:
|
||||
case FMUV6_BOARD_HOLYBRO_6X:
|
||||
case FMUV6_BOARD_HOLYBRO_6X_REV6:
|
||||
case FMUV6_BOARD_HOLYBRO_6X_45686:
|
||||
case FMUV6_BOARD_CUAV_6X:
|
||||
break;
|
||||
default:
|
||||
|
@ -499,6 +500,11 @@ void AP_BoardConfig::detect_fmuv6_variant()
|
|||
state.board_type.set_and_notify(FMUV6_BOARD_CUAV_6X);
|
||||
DEV_PRINTF("Detected CUAV 6X\n");
|
||||
AP_Param::load_defaults_file("@ROMFS/param/CUAV_V6X_defaults.parm", false);
|
||||
} else if (spi_check_register("icm45686-1", INV3REG_456_WHOAMI, INV3_WHOAMI_ICM45686) &&
|
||||
spi_check_register("icm45686-2", INV3REG_456_WHOAMI, INV3_WHOAMI_ICM45686) &&
|
||||
spi_check_register("icm45686-3", INV3REG_456_WHOAMI, INV3_WHOAMI_ICM45686)) {
|
||||
state.board_type.set_and_notify(FMUV6_BOARD_HOLYBRO_6X_45686);
|
||||
DEV_PRINTF("Detected Holybro 6X_45686\n");
|
||||
} else if (spi_check_register("iim42652", INV3REG_WHOAMI, INV3_WHOAMI_IIM42652) &&
|
||||
spi_check_register("icm45686", INV3REG_456_WHOAMI, INV3_WHOAMI_ICM45686)) {
|
||||
state.board_type.set_and_notify(FMUV6_BOARD_HOLYBRO_6X_REV6);
|
||||
|
|
Loading…
Reference in New Issue