1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Fix bug in FW althold w/o GPS

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2017-04-16 22:22:39 +10:00
parent 3f251830b3
commit 4a63f2268b

View file

@ -127,8 +127,7 @@ void applyFixedWingAltitudeController(timeUs_t currentTimeUs)
return; return;
} }
if (posControl.flags.hasValidPositionSensor) { if (posControl.flags.hasValidAltitudeSensor) {
// If we have an update on vertical position data - update velocity and accel targets
if (posControl.flags.verticalPositionDataNew) { if (posControl.flags.verticalPositionDataNew) {
const timeDelta_t deltaMicrosPositionUpdate = currentTimeUs - previousTimePositionUpdate; const timeDelta_t deltaMicrosPositionUpdate = currentTimeUs - previousTimePositionUpdate;
previousTimePositionUpdate = currentTimeUs; previousTimePositionUpdate = currentTimeUs;