|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
40 #ifndef ROTORCRAFT_CAM_H
41 #define ROTORCRAFT_CAM_H
44 #include "generated/airframe.h"
48 #define ROTORCRAFT_CAM_MODE_NONE 0
49 #define ROTORCRAFT_CAM_MODE_MANUAL 1
50 #define ROTORCRAFT_CAM_MODE_HEADING 2
51 #define ROTORCRAFT_CAM_MODE_WP 3
54 #ifndef ROTORCRAFT_CAM_DEFAULT_MODE
55 #define ROTORCRAFT_CAM_DEFAULT_MODE ROTORCRAFT_CAM_MODE_NONE
61 #ifdef ROTORCRAFT_CAM_TILT_SERVO
62 #define ROTORCRAFT_CAM_USE_TILT 1
64 #define ROTORCRAFT_CAM_USE_TILT 0
69 #if defined ROTORCRAFT_CAM_TILT_ANGLE_MIN && defined ROTORCRAFT_CAM_TILT_ANGLE_MAX && defined ROTORCRAFT_CAM_USE_TILT
70 #define CAM_TA_MIN ANGLE_BFP_OF_REAL(ROTORCRAFT_CAM_TILT_ANGLE_MIN)
71 #define CAM_TA_MAX ANGLE_BFP_OF_REAL(ROTORCRAFT_CAM_TILT_ANGLE_MAX)
72 #define ROTORCRAFT_CAM_USE_TILT_ANGLES 1
78 #ifndef ROTORCRAFT_CAM_USE_PAN
79 #define ROTORCRAFT_CAM_USE_PAN 1
85 #ifndef ROTORCRAFT_CAM_TRACK_WP
87 #define ROTORCRAFT_CAM_TRACK_WP WP_CAM
104 #define rotorcraft_cam_SetCamMode(_v) { \
105 rotorcraft_cam_set_mode(_v); \
112 #ifndef ROTORCRAFT_CAM_STICK_TILT_INC
113 #define ROTORCRAFT_CAM_STICK_TILT_INC RadOfDeg(10.)
115 #ifndef ROTORCRAFT_CAM_STICK_PAN_INC
116 #define ROTORCRAFT_CAM_STICK_PAN_INC RadOfDeg(20.)
119 #define ROTORCRAFT_CAM_STICK_PARSE(buf) { \
120 rotorcraft_cam_tilt += (int16_t)((ANGLE_BFP_OF_REAL(ROTORCRAFT_CAM_STICK_TILT_INC)/127.)*(float)DL_ROTORCRAFT_CAM_STICK_tilt(buf)); \
121 rotorcraft_cam_pan += (int16_t)((ANGLE_BFP_OF_REAL(ROTORCRAFT_CAM_STICK_PAN_INC)/127.)*(float)DL_ROTORCRAFT_CAM_STICK_pan(buf)); \
122 INT32_COURSE_NORMALIZE(rotorcraft_cam_pan); \
void rotorcraft_cam_periodic(void)
int16_t rotorcraft_cam_pan
int16_t rotorcraft_cam_tilt
void rotorcraft_cam_init(void)
Paparazzi fixed point algebra.
int16_t rotorcraft_cam_tilt_pwm
uint8_t rotorcraft_cam_mode
WP control.
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
void rotorcraft_cam_set_mode(uint8_t mode)