ArduCopter: move of CAN parameters into separate group

This commit is contained in:
Eugene Shamaev 2017-05-06 12:11:50 +03:00 committed by Francisco Ferreira
parent b6c397c85a
commit 24c390ade0
4 changed files with 16 additions and 0 deletions

View File

@ -83,6 +83,7 @@
#include <AP_Notify/AP_Notify.h> // Notify library
#include <AP_BattMonitor/AP_BattMonitor.h> // Battery monitor library
#include <AP_BoardConfig/AP_BoardConfig.h> // board configuration library
#include <AP_BoardConfig/AP_BoardConfig_CAN.h>
#include <AP_LandingGear/AP_LandingGear.h> // Landing Gear library
#include <AP_Terrain/AP_Terrain.h>
#include <AP_ADSB/AP_ADSB.h>
@ -317,6 +318,11 @@ private:
// board specific config
AP_BoardConfig BoardConfig;
#if HAL_WITH_UAVCAN
// board specific config for CAN bus
AP_BoardConfig_CAN BoardConfig_CAN;
#endif
// receiver RSSI
uint8_t receiver_rssi;

View File

@ -738,6 +738,12 @@ const AP_Param::Info Copter::var_info[] = {
// @Path: ../libraries/AP_BoardConfig/AP_BoardConfig.cpp
GOBJECT(BoardConfig, "BRD_", AP_BoardConfig),
#if HAL_WITH_UAVCAN
// @Group: CAN_
// @Path: ../libraries/AP_BoardConfig/AP_BoardConfig_CAN.cpp
GOBJECT(BoardConfig_CAN, "CAN_", AP_BoardConfig_CAN),
#endif
#if SPRAYER == ENABLED
// @Group: SPRAY_
// @Path: ../libraries/AC_Sprayer/AC_Sprayer.cpp

View File

@ -55,6 +55,7 @@ public:
k_param_NavEKF2,
k_param_g2, // 2nd block of parameters
k_param_NavEKF3,
k_param_BoardConfig_CAN,
// simulation
k_param_sitl = 10,

View File

@ -127,6 +127,9 @@ void Copter::init_ardupilot()
hal.scheduler->register_delay_callback(mavlink_delay_cb_static, 5);
BoardConfig.init();
#if HAL_WITH_UAVCAN
BoardConfig_CAN.init();
#endif
// init cargo gripper
#if GRIPPER_ENABLED == ENABLED