mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
NAV: Fixed logging of target position
This commit is contained in:
parent
f38ec40748
commit
a5628cc4a8
1 changed files with 9 additions and 0 deletions
|
@ -1575,6 +1575,10 @@ void updateAltitudeTargetFromClimbRate(float climbRate)
|
|||
}
|
||||
|
||||
posControl.desiredState.pos.V.Z = posControl.actualState.pos.V.Z + (climbRate / posControl.pids.pos[Z].param.kP);
|
||||
|
||||
#if defined(NAV_BLACKBOX)
|
||||
navTargetPosition[Z] = constrain(lrintf(posControl.desiredState.pos.V.Z), -32678, 32767);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void resetAltitudeController(void)
|
||||
|
@ -1651,6 +1655,11 @@ static bool adjustPositionFromRCInput(void)
|
|||
else {
|
||||
return adjustMulticopterPositionFromRCInput();
|
||||
}
|
||||
|
||||
#if defined(NAV_BLACKBOX)
|
||||
navTargetPosition[X] = constrain(lrintf(posControl.desiredState.pos.V.X), -32678, 32767);
|
||||
navTargetPosition[Y] = constrain(lrintf(posControl.desiredState.pos.V.Y), -32678, 32767);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue