mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 15:30:08 +08:00
only declare var dist_to_waypoint if GUIDANCE_H_USE_REF is defined
This commit is contained in:
@@ -111,10 +111,10 @@ void nav_run(void) {
|
|||||||
/* saturate it */
|
/* saturate it */
|
||||||
VECT2_STRIM(path_to_waypoint, -(1<<15), (1<<15));
|
VECT2_STRIM(path_to_waypoint, -(1<<15), (1<<15));
|
||||||
|
|
||||||
|
#if GUIDANCE_H_USE_REF
|
||||||
int32_t dist_to_waypoint;
|
int32_t dist_to_waypoint;
|
||||||
INT32_VECT2_NORM(dist_to_waypoint, path_to_waypoint);
|
INT32_VECT2_NORM(dist_to_waypoint, path_to_waypoint);
|
||||||
|
|
||||||
#if GUIDANCE_H_USE_REF
|
|
||||||
if (dist_to_waypoint < CLOSE_TO_WAYPOINT) {
|
if (dist_to_waypoint < CLOSE_TO_WAYPOINT) {
|
||||||
VECT2_COPY(navigation_carrot, navigation_target);
|
VECT2_COPY(navigation_carrot, navigation_target);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user