From db611e074c37360ba8ba372f1591d70b19f6295f Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 8 Aug 2018 12:48:30 +0900 Subject: [PATCH] Rover: include wheel-rate-control --- APMrover2/Parameters.cpp | 5 +++++ APMrover2/Parameters.h | 1 + APMrover2/Rover.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 3cf40bce09..4aa8e8bf5b 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -575,6 +575,10 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @Path: ../libraries/AC_Sprayer/AC_Sprayer.cpp AP_SUBGROUPINFO(sprayer, "SPRAY_", 26, ParametersG2, AC_Sprayer), + // @Group: WRC + // @Path: ../libraries/AP_WheelEncoder/AP_WheelRateControl.cpp + AP_SUBGROUPINFO(wheel_rate_control, "WRC", 27, ParametersG2, AP_WheelRateControl), + AP_GROUPEND }; @@ -599,6 +603,7 @@ ParametersG2::ParametersG2(void) #endif beacon(rover.serial_manager), motors(rover.ServoRelayEvents), + wheel_rate_control(wheel_encoder), attitude_control(rover.ahrs), smart_rtl(), fence(rover.ahrs), diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index bb42072d94..55e5d89d69 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/Parameters.h @@ -312,6 +312,7 @@ public: // wheel encoders AP_WheelEncoder wheel_encoder; + AP_WheelRateControl wheel_rate_control; // steering and throttle controller AR_AttitudeControl attitude_control; diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index b4b02ddc9f..d7fe194102 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -65,6 +65,7 @@ #include // needed for AHRS build #include #include +#include #include #include #include @@ -565,6 +566,7 @@ public: // frame type uint8_t get_frame_type() { return g2.frame_type.get(); } + AP_WheelRateControl& get_wheel_rate_control() { return g2.wheel_rate_control; } }; extern const AP_HAL::HAL& hal;