mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
FlightTaskManualStabilized make reset counter for heading static
This commit is contained in:
committed by
Lorenz Meier
parent
68dd2d739a
commit
a0c3c80b37
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user