Browse Source

AP_BoardConfig: initial FMUv4pro support

master
Kevin Lopez Alvarez 8 years ago committed by Andrew Tridgell
parent
commit
a51bf8c918
  1. 1
      libraries/AP_BoardConfig/AP_BoardConfig.h
  2. 9
      libraries/AP_BoardConfig/px4_drivers.cpp

1
libraries/AP_BoardConfig/AP_BoardConfig.h

@ -42,6 +42,7 @@ public: @@ -42,6 +42,7 @@ public:
PX4_BOARD_PIXRACER = 4,
PX4_BOARD_PHMINI = 5,
PX4_BOARD_PH2SLIM = 6,
PX4_BOARD_PIXHAWK_PRO = 7,
PX4_BOARD_AEROFC = 13,
PX4_BOARD_AUAV21 = 20,
PX4_BOARD_OLDDRIVERS = 100,

9
libraries/AP_BoardConfig/px4_drivers.cpp

@ -267,6 +267,7 @@ void AP_BoardConfig::px4_setup_drivers(void) @@ -267,6 +267,7 @@ void AP_BoardConfig::px4_setup_drivers(void)
case PX4_BOARD_AUAV21:
case PX4_BOARD_PH2SLIM:
case PX4_BOARD_AEROFC:
case PX4_BOARD_PIXHAWK_PRO:
break;
default:
sensor_config_error("Unknown board type");
@ -444,6 +445,10 @@ void AP_BoardConfig::validate_board_type(void) @@ -444,6 +445,10 @@ void AP_BoardConfig::validate_board_type(void)
hal.console->printf("Forced PIXHAWK2\n");
}
#endif
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V4PRO)
// Nothing to do for the moment
#endif
}
/*
@ -493,6 +498,10 @@ void AP_BoardConfig::px4_autodetect(void) @@ -493,6 +498,10 @@ void AP_BoardConfig::px4_autodetect(void)
// only one choice
px4.board_type.set_and_notify(PX4_BOARD_PIXRACER);
hal.console->printf("Detected Pixracer\n");
#elif defined(CONFIG_ARCH_BOARD_PX4FMU_V4PRO)
// only one choice
px4.board_type.set_and_notify(PX4_BOARD_PIXHAWK_PRO);
hal.console->printf("Detected Pixhawk Pro\n");
#elif defined(CONFIG_ARCH_BOARD_AEROFC_V1)
px4.board_type.set_and_notify(PX4_BOARD_AEROFC);
hal.console->printf("Detected Aero FC\n");

Loading…
Cancel
Save