1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Merge pull request #5299 from etracer65/runaway_takeoff_disable_stick_commands

Disable stick command processing while ARMING_DISABLED_RUNAWAY_TAKEOFF is set
This commit is contained in:
Michael Keller 2018-02-25 10:22:39 +13:00 committed by GitHub
commit a8d188ce1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -215,7 +215,7 @@ void processRcStickPositions()
return;
}
if (ARMING_FLAG(ARMED) || doNotRepeat || rcDelayMs <= STICK_DELAY_MS) {
if (ARMING_FLAG(ARMED) || doNotRepeat || rcDelayMs <= STICK_DELAY_MS || (getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
return;
}
doNotRepeat = true;

View file

@ -730,3 +730,6 @@ PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 2);
void resetArmingDisabled(void) {}
timeDelta_t getTaskDeltaTime(cfTaskId_e) { return 20000; }
}
armingDisableFlags_e getArmingDisableFlags(void) {
return (armingDisableFlags_e) 0;
}