fix(StickYaw): Fixes potential bug if unaided yaw becomes nan during execution in StickYaw.cpp (#25710)

* Fixes potential bug if unaided yaw becomes nan during execution:
if unaided yaw becomes nan during execution the yaw correction would jumpt to 0 causing a large jump in yaw
the change removes this jump by holding the current yaw correction instead

* Remove Python extra paths from settings.json

Removed Python extra paths from VS Code settings.
This commit is contained in:
Baardrw 2026-03-02 20:27:29 +01:00 committed by GitHub
parent 12babb33cb
commit c2ea4e6121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,8 @@ void StickYaw::generateYawSetpoint(float &yawspeed_setpoint, float &yaw_setpoint
bool StickYaw::updateYawCorrection(const float yaw, const float unaided_yaw, const float deltatime)
{
if (!PX4_ISFINITE(unaided_yaw)) {
_yaw_correction = 0.f;
// If unaided yaw is not available we leave yaw_correction_ unchanged
// Meaning yaw_setpoint - yaw_correction_prev + _yaw_correction = yaw_setpoint
return false;
}