diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-14 23:48:07 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-14 23:48:07 +0100 |
commit | 35f0f570a6c0434c77db50407a7510677c1fb889 (patch) | |
tree | f0a413cbebe7f50c2434e582a6f8c3afa4fc1e27 /apps | |
parent | 38f435e4cf2d68320462065ca7228371bb69b11f (diff) | |
download | px4-firmware-35f0f570a6c0434c77db50407a7510677c1fb889.tar.gz px4-firmware-35f0f570a6c0434c77db50407a7510677c1fb889.tar.bz2 px4-firmware-35f0f570a6c0434c77db50407a7510677c1fb889.zip |
Hotfix for current active waypoint ID
Diffstat (limited to 'apps')
-rw-r--r-- | apps/mavlink/waypoints.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/mavlink/waypoints.c b/apps/mavlink/waypoints.c index 3832ebe70..a131b143b 100644 --- a/apps/mavlink/waypoints.c +++ b/apps/mavlink/waypoints.c @@ -408,9 +408,10 @@ void check_waypoints_reached(uint64_t now, const struct vehicle_global_position_ cur_wp->current = 0; if (wpm->current_active_wp_id == wpm->size - 1 && wpm->size > 1) { - //the last waypoint was reached, if auto continue is - //activated restart the waypoint list from the beginning - wpm->current_active_wp_id = 1; + /* the last waypoint was reached, if auto continue is + * activated restart the waypoint list from the beginning + */ + wpm->current_active_wp_id = 0; } else { if ((uint16_t)(wpm->current_active_wp_id + 1) < wpm->size) |