* passing const reference instead to avoid the copy
* remove unused using declaration
This commit is contained in:
Pernilla
2026-01-22 14:02:03 -09:00
committed by GitHub
parent 93ab802202
commit 522c15284f
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ void OutputBase::set_stabilize(bool roll_stabilize, bool pitch_stabilize, bool y
_stabilize[2] = yaw_stabilize;
}
void OutputBase::set_last_valid_setpoint(const bool compensate[3], const matrix::Eulerf euler_vehicle)
void OutputBase::set_last_valid_setpoint(const bool compensate[3], const matrix::Eulerf &euler_vehicle)
{
// No updates from angular velocity, hence no modification of last valid setpoint
if (!PX4_ISFINITE(_angle_velocity[0]) && !PX4_ISFINITE(_angle_velocity[1]) && !PX4_ISFINITE(_angle_velocity[2])) {
+2 -2
View File
@@ -106,9 +106,9 @@ protected:
* the received MAVLink command, the last valid setpoint is updated to account for the vehicle attitude.
*
* @param compensate Boolean per axis (roll, pitch, yaw). If true, the vehicle attitude is taken into account.
* @param euler_vehicle
* @param euler_vehicle Reference to Euler float
*/
void set_last_valid_setpoint(const bool compensate[3], const matrix::Eulerf euler_vehicle);
void set_last_valid_setpoint(const bool compensate[3], const matrix::Eulerf &euler_vehicle);
float _angle_outputs[3] = { 0.f, 0.f, 0.f }; ///< calculated output angles (roll, pitch, yaw) [rad]
-2
View File
@@ -38,8 +38,6 @@
#include <px4_platform_common/defines.h>
#include <matrix/matrix/math.hpp>
using math::constrain;
namespace gimbal
{