mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
Added nav mode check
The override loiter radius will now only apply to POSHOLD. Tested on the ground. Will not get to test in flight for at least 5 days.
This commit is contained in:
parent
b66caae07a
commit
2fec7a0285
1 changed files with 1 additions and 1 deletions
|
@ -730,7 +730,7 @@ 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)) {
|
||||
if (LOGIC_CONDITION_GLOBAL_FLAG(LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_LOITER_RADIUS) && FLIGHT_MODE(NAV_POSHOLD_MODE)) {
|
||||
return constrain(logicConditionValuesByType[LOGIC_CONDITION_LOITER_OVERRIDE], loiterRadius, 100000);
|
||||
} else {
|
||||
return loiterRadius;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue