1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

requested changes [ci skip]

This commit is contained in:
Nicola De Pasquale 2019-06-29 19:39:57 +02:00
parent bb5f59a94d
commit 716eea26ff

View file

@ -304,9 +304,7 @@ static void rescueAttainPosition()
setBearing(rescueState.sensor.directionToHome);
}
if (debugMode == DEBUG_RTH) {
DEBUG_SET(DEBUG_RTH, 3, rescueState.failure); //Failure can change with no new GPS Data
}
if (!newGPSData) {
return;
@ -370,18 +368,14 @@ static void rescueAttainPosition()
rescueThrottle = constrain(1000 + altitudeAdjustment + hoverAdjustment, gpsRescueConfig()->throttleMin, gpsRescueConfig()->throttleMax);
if (debugMode == DEBUG_RTH) {
DEBUG_SET(DEBUG_RTH, 0, rescueThrottle);
DEBUG_SET(DEBUG_RTH, 1, gpsRescueAngle[AI_PITCH]);
DEBUG_SET(DEBUG_RTH, 2, altitudeAdjustment);
}
if (debugMode == DEBUG_GPS_RESCUE_THROTTLE_PID) {
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 0, throttle.Kp * zVelocityError);
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 1, throttle.Ki * zVelocityIntegral);
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 2, throttle.Kd * zVelocityDerivative);
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 3, rescueState.sensor.zVelocity);
}
}
static void performSanityChecks()