FlightTaskManualStabilized make reset counter for heading static

This commit is contained in:
Dennis Mannhart
2018-05-03 19:14:23 +02:00
committed by Lorenz Meier
parent 68dd2d739a
commit a0c3c80b37
2 changed files with 2 additions and 2 deletions
@@ -40,6 +40,7 @@
#include <float.h>
using namespace matrix;
uint8_t FlightTaskManualStabilized::_heading_reset_counter = 0;
bool FlightTaskManualStabilized::initializeSubscriptions(SubscriptionArray &subscription_array)
{
@@ -92,7 +93,6 @@ void FlightTaskManualStabilized::_updateHeadingSetpoints()
_yaw_setpoint += matrix::Eulerf(matrix::Quatf(_sub_attitude->get().delta_q_reset)).psi();
_heading_reset_counter = _sub_attitude->get().quat_reset_counter;
}
}
}
}
@@ -60,7 +60,7 @@ protected:
void _rotateIntoHeadingFrame(matrix::Vector2f &vec); /**< rotates vector into local frame */
private:
uint8_t _heading_reset_counter = 0; /**< estimator heading reset */
static uint8_t _heading_reset_counter; /**< estimator heading reset */
uORB::Subscription<vehicle_attitude_s> *_sub_attitude{nullptr};