mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Increase nav_wp_safe_distance
This PR increases the maximum safe distance for the first waypoint to 1500m. A lot of fixed wing LR pilots are frustrated with the 650m limit. This corrects that while not increasing the memory used by the variable. I didn't see any reason for this to be in cm. It's not divided anywhere. So metres is much more fitting.
This commit is contained in:
parent
94fc2531a1
commit
2b38a259c6
3 changed files with 7 additions and 7 deletions
|
@ -127,7 +127,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
|
|||
// General navigation parameters
|
||||
.pos_failure_timeout = SETTING_NAV_POSITION_TIMEOUT_DEFAULT, // 5 sec
|
||||
.waypoint_radius = SETTING_NAV_WP_RADIUS_DEFAULT, // 2m diameter
|
||||
.waypoint_safe_distance = SETTING_NAV_WP_SAFE_DISTANCE_DEFAULT, // centimeters - first waypoint should be closer than this
|
||||
.waypoint_safe_distance = SETTING_NAV_WP_SAFE_DISTANCE_DEFAULT, // Metres - first waypoint should be closer than this
|
||||
#ifdef USE_MULTI_MISSION
|
||||
.waypoint_multi_mission_index = SETTING_NAV_WP_MULTI_MISSION_INDEX_DEFAULT, // mission index selected from multi mission WP entry
|
||||
#endif
|
||||
|
@ -3869,7 +3869,7 @@ navArmingBlocker_e navigationIsBlockingArming(bool *usedBypass)
|
|||
|
||||
// Don't allow arming if first waypoint is farther than configured safe distance
|
||||
if ((posControl.waypointCount > 0) && (navConfig()->general.waypoint_safe_distance != 0)) {
|
||||
if (distanceToFirstWP() > navConfig()->general.waypoint_safe_distance && !checkStickPosition(YAW_HI)) {
|
||||
if (distanceToFirstWP() > METERS_TO_CENTIMETERS(navConfig()->general.waypoint_safe_distance) && !checkStickPosition(YAW_HI)) {
|
||||
return NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue