FlightTaskManualAltitude: yawspeed filter remove line with no effect, comments

FlightTaskManualAltitude: declaration order

Addressing @bkueng's review comments.
This commit is contained in:
Matthias Grob 2019-11-20 17:48:42 +01:00 committed by Mathieu Bresciani
parent cd2b5e7479
commit 4a28c8180b
2 changed files with 8 additions and 3 deletions

View File

@ -328,7 +328,6 @@ void FlightTaskManualAltitude::_lockYaw()
// hold the current heading when no more rotation commanded
if (!PX4_ISFINITE(_yaw_setpoint)) {
_yaw_setpoint = _yaw;
_yawspeed_setpoint = NAN;
}
}

View File

@ -89,6 +89,13 @@ private:
bool _isYawInput();
void _unlockYaw();
void _lockYaw();
/**
* Filter between stick input and yaw setpoint
*
* @param yawspeed_target yaw setpoint desired by the stick
* @return filtered value from independent filter state
*/
float _applyYawspeedFilter(float yawspeed_target);
/**
@ -118,6 +125,7 @@ private:
uORB::SubscriptionData<home_position_s> _sub_home_position{ORB_ID(home_position)};
float _yawspeed_filter_state{}; /**< state of low-pass filter in rad/s */
uint8_t _reset_counter = 0; /**< counter for estimator resets in z-direction */
float _max_speed_up = 10.0f;
float _min_speed_down = 1.0f;
@ -131,6 +139,4 @@ private:
* _dist_to_ground_lock.
*/
float _dist_to_ground_lock = NAN;
float _yawspeed_filter_state{};
};