mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[modules] minor cleanup in cam_control
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user