From b365a4ddf51b378accced3c828fd8be327be8565 Mon Sep 17 00:00:00 2001 From: Eugene Shamaev Date: Sat, 6 May 2017 12:11:29 +0300 Subject: [PATCH] AntennaTracker: move of CAN parameters into separate group --- AntennaTracker/Parameters.cpp | 6 ++++++ AntennaTracker/Parameters.h | 1 + AntennaTracker/Tracker.h | 6 ++++++ AntennaTracker/system.cpp | 3 +++ 4 files changed, 16 insertions(+) diff --git a/AntennaTracker/Parameters.cpp b/AntennaTracker/Parameters.cpp index dff1cc2bd3..b03f33a455 100644 --- a/AntennaTracker/Parameters.cpp +++ b/AntennaTracker/Parameters.cpp @@ -293,6 +293,12 @@ const AP_Param::Info Tracker::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 + // GPS driver // @Group: GPS_ // @Path: ../libraries/AP_GPS/AP_GPS.cpp diff --git a/AntennaTracker/Parameters.h b/AntennaTracker/Parameters.h index 5bc388ba67..d001cc3a66 100644 --- a/AntennaTracker/Parameters.h +++ b/AntennaTracker/Parameters.h @@ -92,6 +92,7 @@ public: k_param_gcs3, // stream rates for fourth MAVLink port k_param_log_bitmask, // 140 k_param_notify, + k_param_BoardConfig_CAN, // // 150: Telemetry control diff --git a/AntennaTracker/Tracker.h b/AntennaTracker/Tracker.h index 903a327be1..f6fcecc810 100644 --- a/AntennaTracker/Tracker.h +++ b/AntennaTracker/Tracker.h @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -142,6 +143,11 @@ private: AP_BoardConfig BoardConfig; +#if HAL_WITH_UAVCAN + // board specific config for CAN bus + AP_BoardConfig_CAN BoardConfig_CAN; +#endif + struct Location current_loc; enum ControlMode control_mode = INITIALISING; diff --git a/AntennaTracker/system.cpp b/AntennaTracker/system.cpp index fc74665bc2..93019020c2 100644 --- a/AntennaTracker/system.cpp +++ b/AntennaTracker/system.cpp @@ -41,6 +41,9 @@ void Tracker::init_tracker() hal.scheduler->register_delay_callback(mavlink_delay_cb_static, 5); BoardConfig.init(); +#if HAL_WITH_UAVCAN + BoardConfig_CAN.init(); +#endif // initialise notify notify.init(false);