Skip to content

Commit

Permalink
[fixedwing] nav function to downlink WP after computation
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter authored and flixr committed Oct 6, 2014
1 parent f6d922f commit 9e92c9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sw/airborne/firmwares/fixedwing/nav.c
Expand Up @@ -466,6 +466,13 @@ static void send_wp_moved(void) {
DownlinkSendWp(DefaultChannel, DefaultDevice, i);
}

bool_t DownlinkSendWpNr(int _wp)
{
DownlinkSendWp(DefaultChannel, DefaultDevice, _wp);
return FALSE;
}


static void send_circle(void) {
if (nav_in_circle) {
DOWNLINK_SEND_CIRCLE(DefaultChannel, DefaultDevice,
Expand Down
2 changes: 2 additions & 0 deletions sw/airborne/firmwares/fixedwing/nav.h
Expand Up @@ -209,6 +209,8 @@ bool_t nav_approaching_xy(float x, float y, float from_x, float from_y, float ap
DOWNLINK_SEND_NAVIGATION(_trans, _dev, &nav_block, &nav_stage, &(pos->x), &(pos->y), &dist_wp, &dist_home, &_circle_count, &nav_oval_count); \
}

extern bool_t DownlinkSendWpNr(int _wp);

#define DownlinkSendWp(_trans, _dev, i) { \
float x = nav_utm_east0 + waypoints[i].x; \
float y = nav_utm_north0 + waypoints[i].y; \
Expand Down

0 comments on commit 9e92c9b

Please sign in to comment.