From d6dbdd58d39fba569bb25968207af8a6b6aab135 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 10 Dec 2019 20:31:08 +1100 Subject: [PATCH] AC_AttitudeControl: adjust for some methods on AP_AHRS become non-const --- libraries/AC_AttitudeControl/AC_PosControl.cpp | 2 +- libraries/AC_AttitudeControl/AC_PosControl.h | 4 ++-- libraries/AC_AttitudeControl/AC_PosControl_Sub.cpp | 2 +- libraries/AC_AttitudeControl/AC_PosControl_Sub.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AC_AttitudeControl/AC_PosControl.cpp b/libraries/AC_AttitudeControl/AC_PosControl.cpp index 3c5ed5ec31..6b72d47bf7 100644 --- a/libraries/AC_AttitudeControl/AC_PosControl.cpp +++ b/libraries/AC_AttitudeControl/AC_PosControl.cpp @@ -189,7 +189,7 @@ const AP_Param::GroupInfo AC_PosControl::var_info[] = { // Note that the Vector/Matrix constructors already implicitly zero // their values. // -AC_PosControl::AC_PosControl(const AP_AHRS_View& ahrs, const AP_InertialNav& inav, +AC_PosControl::AC_PosControl(AP_AHRS_View& ahrs, const AP_InertialNav& inav, const AP_Motors& motors, AC_AttitudeControl& attitude_control) : _ahrs(ahrs), _inav(inav), diff --git a/libraries/AC_AttitudeControl/AC_PosControl.h b/libraries/AC_AttitudeControl/AC_PosControl.h index 6384a4dfb1..7637072186 100644 --- a/libraries/AC_AttitudeControl/AC_PosControl.h +++ b/libraries/AC_AttitudeControl/AC_PosControl.h @@ -45,7 +45,7 @@ class AC_PosControl public: /// Constructor - AC_PosControl(const AP_AHRS_View& ahrs, const AP_InertialNav& inav, + AC_PosControl(AP_AHRS_View& ahrs, const AP_InertialNav& inav, const AP_Motors& motors, AC_AttitudeControl& attitude_control); /// @@ -379,7 +379,7 @@ protected: void check_for_ekf_z_reset(); // references to inertial nav and ahrs libraries - const AP_AHRS_View & _ahrs; + AP_AHRS_View & _ahrs; const AP_InertialNav& _inav; const AP_Motors& _motors; AC_AttitudeControl& _attitude_control; diff --git a/libraries/AC_AttitudeControl/AC_PosControl_Sub.cpp b/libraries/AC_AttitudeControl/AC_PosControl_Sub.cpp index 06924fbd19..336c2d8f9b 100644 --- a/libraries/AC_AttitudeControl/AC_PosControl_Sub.cpp +++ b/libraries/AC_AttitudeControl/AC_PosControl_Sub.cpp @@ -1,6 +1,6 @@ #include "AC_PosControl_Sub.h" -AC_PosControl_Sub::AC_PosControl_Sub(const AP_AHRS_View& ahrs, const AP_InertialNav& inav, +AC_PosControl_Sub::AC_PosControl_Sub(AP_AHRS_View& ahrs, const AP_InertialNav& inav, const AP_Motors& motors, AC_AttitudeControl& attitude_control) : AC_PosControl(ahrs, inav, motors, attitude_control), _alt_max(0.0f), diff --git a/libraries/AC_AttitudeControl/AC_PosControl_Sub.h b/libraries/AC_AttitudeControl/AC_PosControl_Sub.h index 2fc2e0dad9..2978d32fa6 100644 --- a/libraries/AC_AttitudeControl/AC_PosControl_Sub.h +++ b/libraries/AC_AttitudeControl/AC_PosControl_Sub.h @@ -4,7 +4,7 @@ class AC_PosControl_Sub : public AC_PosControl { public: - AC_PosControl_Sub(const AP_AHRS_View & ahrs, const AP_InertialNav& inav, + AC_PosControl_Sub(AP_AHRS_View & ahrs, const AP_InertialNav& inav, const AP_Motors& motors, AC_AttitudeControl& attitude_control); /// set_alt_max - sets maximum altitude above the ekf origin in cm