From 89c99ce1455db2434e2d58da6b7a27faf2ccda3f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Jan 2014 12:57:59 +1100 Subject: [PATCH] Rover: enable AP_BoardConfig --- APMrover2/APMrover2.pde | 4 ++++ APMrover2/Parameters.h | 1 + APMrover2/Parameters.pde | 4 ++++ APMrover2/system.pde | 2 ++ 4 files changed, 11 insertions(+) diff --git a/APMrover2/APMrover2.pde b/APMrover2/APMrover2.pde index f091215690..62364fcd2d 100644 --- a/APMrover2/APMrover2.pde +++ b/APMrover2/APMrover2.pde @@ -92,6 +92,7 @@ #include #include #include +#include #include #include @@ -143,6 +144,9 @@ static AP_Scheduler scheduler; // mapping between input channels static RCMapper rcmap; +// board specific config +static AP_BoardConfig BoardConfig; + // primary control channels static RC_Channel *channel_steer; static RC_Channel *channel_throttle; diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index e8f4fad4cd..f88a0aa256 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/Parameters.h @@ -34,6 +34,7 @@ public: k_param_initial_mode, k_param_scheduler, k_param_relay, + k_param_BoardConfig, // IO pins k_param_rssi_pin = 20, diff --git a/APMrover2/Parameters.pde b/APMrover2/Parameters.pde index 0b14af889a..988cf6cd05 100644 --- a/APMrover2/Parameters.pde +++ b/APMrover2/Parameters.pde @@ -482,6 +482,10 @@ const AP_Param::Info var_info[] PROGMEM = { // @Path: ../libraries/AP_BattMonitor/AP_BattMonitor.cpp GOBJECT(battery, "BATT_", AP_BattMonitor), + // @Group: BRD_ + // @Path: ../libraries/AP_BoardConfig/AP_BoardConfig.cpp + GOBJECT(BoardConfig, "BRD_", AP_BoardConfig), + AP_VAREND }; diff --git a/APMrover2/system.pde b/APMrover2/system.pde index 93ad2a0f12..d1710a3367 100644 --- a/APMrover2/system.pde +++ b/APMrover2/system.pde @@ -104,6 +104,8 @@ static void init_ardupilot() load_parameters(); + BoardConfig.init(); + set_control_channels(); // after parameter load setup correct baud rate on uartA