From 183ab8bbe7ae2c2b5af365f27f4e21e822c91ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 20 Sep 2021 10:42:17 +0200 Subject: [PATCH] control_allocator: avoid default argument for virtual method getEffectivenessMatrix clang tidy error: /__w/PX4-Autopilot/PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp:50:34: error: default arguments on virtual or override methods are prohibited [google-default-arguments,-warnings-as-errors] ActuatorEffectivenessMultirotor::getEffectivenessMatrix(matrix::Matrix &matrix, --- .../ActuatorEffectiveness/ActuatorEffectiveness.hpp | 2 +- .../ActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp | 2 +- .../ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp | 2 +- .../ActuatorEffectivenessTiltrotorVTOL.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.hpp index 12b3946efb..68fbc6dd9d 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.hpp @@ -77,7 +77,7 @@ public: * * @return true if updated and matrix is set */ - virtual bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force = false) = 0; + virtual bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force) = 0; /** * Get the actuator trims diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp index 378af51c61..0ff86f45e1 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp @@ -75,7 +75,7 @@ public: static int computeEffectivenessMatrix(const MultirotorGeometry &geometry, matrix::Matrix &effectiveness); - bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force = false) override; + bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force) override; int numActuators() const override { return _num_actuators; } private: diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp index 99523cac68..e3de20e583 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp @@ -49,7 +49,7 @@ public: ActuatorEffectivenessStandardVTOL(); virtual ~ActuatorEffectivenessStandardVTOL() = default; - bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force = false) override; + bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force) override; /** * Set the current flight phase diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp index 41efd83939..1204fc8e86 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp @@ -49,7 +49,7 @@ public: ActuatorEffectivenessTiltrotorVTOL(); virtual ~ActuatorEffectivenessTiltrotorVTOL() = default; - bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force = false) override; + bool getEffectivenessMatrix(matrix::Matrix &matrix, bool force) override; /** * Set the current flight phase