mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-14 20:10:15 +03:00
Changed the logic
I've changed the logic so that it now explicitly ignores certain modes (RTH, WP, FS, and emergency landing). This way the override radius can be changed without being in POS HOLD, allowing it to be preselected.
This commit is contained in:
parent
2fec7a0285
commit
8d5a0b0b8c
1 changed files with 2 additions and 1 deletions
|
@ -730,7 +730,8 @@ int16_t getRcChannelOverride(uint8_t channel, int16_t originalValue) {
|
|||
}
|
||||
|
||||
uint32_t getLoiterRadius(uint32_t loiterRadius) {
|
||||
if (LOGIC_CONDITION_GLOBAL_FLAG(LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_LOITER_RADIUS) && FLIGHT_MODE(NAV_POSHOLD_MODE)) {
|
||||
if (LOGIC_CONDITION_GLOBAL_FLAG(LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_LOITER_RADIUS) &&
|
||||
!(FLIGHT_MODE(FAILSAFE_MODE) || FLIGHT_MODE(NAV_RTH_MODE) || FLIGHT_MODE(NAV_WP_MODE) || navigationIsExecutingAnEmergencyLanding())) {
|
||||
return constrain(logicConditionValuesByType[LOGIC_CONDITION_LOITER_OVERRIDE], loiterRadius, 100000);
|
||||
} else {
|
||||
return loiterRadius;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue