mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
requested changes [ci skip]
This commit is contained in:
parent
bb5f59a94d
commit
716eea26ff
1 changed files with 8 additions and 14 deletions
|
@ -304,9 +304,7 @@ static void rescueAttainPosition()
|
||||||
setBearing(rescueState.sensor.directionToHome);
|
setBearing(rescueState.sensor.directionToHome);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debugMode == DEBUG_RTH) {
|
DEBUG_SET(DEBUG_RTH, 3, rescueState.failure); //Failure can change with no new GPS Data
|
||||||
DEBUG_SET(DEBUG_RTH, 3, rescueState.failure); //Failure can change with no new GPS Data
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!newGPSData) {
|
if (!newGPSData) {
|
||||||
return;
|
return;
|
||||||
|
@ -370,18 +368,14 @@ static void rescueAttainPosition()
|
||||||
|
|
||||||
rescueThrottle = constrain(1000 + altitudeAdjustment + hoverAdjustment, gpsRescueConfig()->throttleMin, gpsRescueConfig()->throttleMax);
|
rescueThrottle = constrain(1000 + altitudeAdjustment + hoverAdjustment, gpsRescueConfig()->throttleMin, gpsRescueConfig()->throttleMax);
|
||||||
|
|
||||||
if (debugMode == DEBUG_RTH) {
|
DEBUG_SET(DEBUG_RTH, 0, rescueThrottle);
|
||||||
DEBUG_SET(DEBUG_RTH, 0, rescueThrottle);
|
DEBUG_SET(DEBUG_RTH, 1, gpsRescueAngle[AI_PITCH]);
|
||||||
DEBUG_SET(DEBUG_RTH, 1, gpsRescueAngle[AI_PITCH]);
|
DEBUG_SET(DEBUG_RTH, 2, altitudeAdjustment);
|
||||||
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, 0, throttle.Kp * zVelocityError);
|
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 1, throttle.Ki * zVelocityIntegral);
|
||||||
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, 2, throttle.Kd * zVelocityDerivative);
|
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 3, rescueState.sensor.zVelocity);
|
||||||
DEBUG_SET(DEBUG_GPS_RESCUE_THROTTLE_PID, 3, rescueState.sensor.zVelocity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void performSanityChecks()
|
static void performSanityChecks()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue