mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
fix failure to initiate position hold from error in ifdef
This commit is contained in:
parent
bf7cff3c4c
commit
8641fcd291
4 changed files with 16 additions and 13 deletions
|
@ -201,10 +201,11 @@ bool positionControl(bool useStickAdjustment, float deadband) {
|
|||
posHold.previousDistanceCm = posHold.distanceCm;
|
||||
}
|
||||
}
|
||||
|
||||
const uint8_t startLogger = posHold.justStarted ? 2 : 1;
|
||||
DEBUG_SET(DEBUG_AUTOPILOT_POSITION, 3, startLogger);
|
||||
|
||||
// simple (very simple) sanity check
|
||||
|
||||
// ** simple (too simple) sanity check **
|
||||
// primarily to detect flyaway from no Mag or badly oriented Mag
|
||||
// TODO - maybe figure how to make a better check by giving more leeway at the start?
|
||||
if (posHold.distanceCm > 1000) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue