aboutsummaryrefslogtreecommitdiff
path: root/apps/mavlink/waypoints.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-07 17:24:48 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-07 17:24:48 +0200
commit962a3464a624deef390fd42e179537cc0590b903 (patch)
tree0539f62f610b45bdfb4b87b456e86d385ab0ddf9 /apps/mavlink/waypoints.c
parent9536bfa3ca239e310be033e8d83a7cc293ebfff6 (diff)
downloadpx4-firmware-962a3464a624deef390fd42e179537cc0590b903.tar.gz
px4-firmware-962a3464a624deef390fd42e179537cc0590b903.tar.bz2
px4-firmware-962a3464a624deef390fd42e179537cc0590b903.zip
Minor cleanups in WP handling
Diffstat (limited to 'apps/mavlink/waypoints.c')
-rw-r--r--apps/mavlink/waypoints.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/mavlink/waypoints.c b/apps/mavlink/waypoints.c
index 977f7d47e..8ed80c817 100644
--- a/apps/mavlink/waypoints.c
+++ b/apps/mavlink/waypoints.c
@@ -353,9 +353,10 @@ void check_waypoints_reached(uint64_t now, const struct vehicle_global_position_
{
static uint16_t counter;
- if (wpm->size > 0 && counter % 10 == 0) {
- printf("Currect active waypoint id: %i\n", wpm->current_active_wp_id);
- }
+ // Do not flood the precious wireless link with debug data
+ // if (wpm->size > 0 && counter % 10 == 0) {
+ // printf("Currect active waypoint id: %i\n", wpm->current_active_wp_id);
+ // }
if (wpm->current_active_wp_id < wpm->size) {
@@ -465,9 +466,10 @@ int mavlink_waypoint_eventloop(uint64_t now, const struct vehicle_global_positio
}
}
- if (now - wpm->timestamp_last_send_setpoint > wpm->delay_setpoint && wpm->current_active_wp_id < wpm->size) {
- mavlink_wpm_send_setpoint(wpm->current_active_wp_id);
- }
+ // Do NOT continously send the current WP, since we're not loosing messages
+ // if (now - wpm->timestamp_last_send_setpoint > wpm->delay_setpoint && wpm->current_active_wp_id < wpm->size) {
+ // mavlink_wpm_send_setpoint(wpm->current_active_wp_id);
+ // }
check_waypoints_reached(now, global_position , local_position);