Skip to content

Commit

Permalink
[modules] dc: workaround to use waypoints in fixedwing and rotorcraft…
Browse files Browse the repository at this point in the history
… firmware
  • Loading branch information
flixr committed Dec 3, 2014
1 parent e5fa887 commit b7fe72d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sw/airborne/modules/digital_cam/dc.c
Expand Up @@ -34,8 +34,12 @@

#include "dc.h"

// for waypoints, but still only fixedwing
// for waypoints, include correct header until we have unified API
#ifdef AP
#include "subsystems/navigation/common_nav.h"
#else
#include "firmwares/rotorcraft/navigation.h"
#endif

/** default quartersec perioid = 0.5s */
#ifndef DC_AUTOSHOOT_QUARTERSEC_PERIOD
Expand Down Expand Up @@ -168,8 +172,9 @@ uint8_t dc_survey(float interval, float x, float y) {
dc_gps_x = stateGetPositionEnu_f()->x;
dc_gps_y = stateGetPositionEnu_f()->y;
} else if (y == DC_IGNORE) {
dc_gps_x = waypoints[(uint8_t)x].x;
dc_gps_y = waypoints[(uint8_t)x].y;
uint8_t wp = (uint8_t)x;
dc_gps_x = WaypointX(wp);
dc_gps_y = WaypointY(wp);
} else {
dc_gps_x = x;
dc_gps_y = y;
Expand Down

0 comments on commit b7fe72d

Please sign in to comment.