diff --git a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PositionController.hpp b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PositionController.hpp index 30b8e0a0df..cf4e3b92a2 100644 --- a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PositionController.hpp +++ b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PositionController.hpp @@ -25,7 +25,7 @@ class PositionController : virtual void initialize(unsigned int axis, const IGoal* goal, const IStateEstimator* state_estimator) override { - if (axis_ == 2) + if (axis == 2) throw std::invalid_argument("PositionController does not support yaw axis i.e. " + std::to_string(axis)); axis_ = axis;