Browse Source

AP_BoardConfig: added board type 103

for PH2 in-tree drivers
master
Andrew Tridgell 8 years ago
parent
commit
88e24dd8bd
  1. 1
      libraries/AP_BoardConfig/AP_BoardConfig.h
  2. 23
      libraries/AP_BoardConfig/px4_drivers.cpp

1
libraries/AP_BoardConfig/AP_BoardConfig.h

@ -57,6 +57,7 @@ public: @@ -57,6 +57,7 @@ public:
#endif
PX4_BOARD_TEST_V1 = 101,
PX4_BOARD_TEST_V2 = 102,
PX4_BOARD_TEST_V3 = 103,
PX4_BOARD_TEST_V4 = 104,
};
#endif

23
libraries/AP_BoardConfig/px4_drivers.cpp

@ -492,17 +492,6 @@ void AP_BoardConfig::px4_start_fmuv4_sensors(void) @@ -492,17 +492,6 @@ void AP_BoardConfig::px4_start_fmuv4_sensors(void)
*/
void AP_BoardConfig::px4_start_common_sensors(void)
{
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V4)
/*
this works around an issue with some FMUv4 hardware (eg. copies
of the Pixracer) which have incorrect components leading to
sensor brownout on boot
*/
if (px4_start_driver(fmu_main, "fmu", "sensor_reset 20")) {
printf("FMUv4 sensor reset complete\n");
}
#endif
if (px4_start_driver(ms5611_main, "ms5611", "start")) {
printf("ms5611 started OK\n");
} else {
@ -673,8 +662,20 @@ void AP_BoardConfig::vrx_start_optional_sensors(void) @@ -673,8 +662,20 @@ void AP_BoardConfig::vrx_start_optional_sensors(void)
void AP_BoardConfig::px4_setup_drivers(void)
{
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V4)
/*
this works around an issue with some FMUv4 hardware (eg. copies
of the Pixracer) which have incorrect components leading to
sensor brownout on boot
*/
if (px4_start_driver(fmu_main, "fmu", "sensor_reset 20")) {
printf("FMUv4 sensor reset complete\n");
}
#endif
if (px4.board_type == PX4_BOARD_TEST_V1 ||
px4.board_type == PX4_BOARD_TEST_V2 ||
px4.board_type == PX4_BOARD_TEST_V3 ||
px4.board_type == PX4_BOARD_TEST_V4) {
// use in-tree drivers
printf("Using in-tree drivers\n");

Loading…
Cancel
Save