[modules] minor cleanup in cam_control

This commit is contained in:
Felix Ruess
2014-12-08 10:59:43 +01:00
parent 884b1f68c1
commit 762aa4ffe1
4 changed files with 7 additions and 11 deletions
+5 -1
View File
@@ -101,7 +101,11 @@ void cam_waypoint_target(void);
void cam_ac_target(void); void cam_ac_target(void);
static void send_cam(struct transport_tx *trans, struct link_device *dev) { static void send_cam(struct transport_tx *trans, struct link_device *dev) {
SEND_CAM(DefaultChannel, DefaultDevice); int16_t x = cam_target_x;
int16_t y = cam_target_y;
int16_t phi = DegOfRad(cam_phi_c);
int16_t theta = DegOfRad(cam_theta_c);
pprz_msg_send_CAM(trans, dev, AC_ID, &phi, &theta, &x, &y);
} }
#ifdef SHOW_CAM_COORDINATES #ifdef SHOW_CAM_COORDINATES
-8
View File
@@ -96,12 +96,4 @@ extern bool_t video_tx_state;
#endif #endif
#define SEND_CAM(_trans, _dev) { \
int16_t x = cam_target_x; \
int16_t y = cam_target_y; \
int16_t phi = DegOfRad(cam_phi_c); \
int16_t theta = DegOfRad(cam_theta_c); \
DOWNLINK_SEND_CAM(_trans, _dev, &phi, &theta, &x, &y); \
}
#endif // CAM_H #endif // CAM_H
+1 -1
View File
@@ -97,7 +97,7 @@ float memory_x, memory_y, memory_z;
#if defined(SHOW_CAM_COORDINATES) #if defined(SHOW_CAM_COORDINATES)
float cam_point_x; float cam_point_x;
float cam_point_y; float cam_point_y;
unsigned int cam_point_distance_from_home; uint16_t cam_point_distance_from_home;
float cam_point_lon, cam_point_lat; float cam_point_lon, cam_point_lat;
float distance_correction = 1; float distance_correction = 1;
#endif #endif
+1 -1
View File
@@ -25,7 +25,7 @@
#define POINT_H #define POINT_H
#if defined(SHOW_CAM_COORDINATES) #if defined(SHOW_CAM_COORDINATES)
extern unsigned int cam_point_distance_from_home; extern uint16_t cam_point_distance_from_home;
extern float cam_point_lon, cam_point_lat; extern float cam_point_lon, cam_point_lat;
extern float distance_correction; extern float distance_correction;
#endif #endif