mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
[booz_cam] fix booz cam module to work without tilt
This commit is contained in:
@@ -33,9 +33,9 @@
|
|||||||
uint8_t booz_cam_mode;
|
uint8_t booz_cam_mode;
|
||||||
|
|
||||||
// Tilt definition
|
// Tilt definition
|
||||||
|
int16_t booz_cam_tilt;
|
||||||
#ifdef BOOZ_CAM_TILT_NEUTRAL
|
#ifdef BOOZ_CAM_TILT_NEUTRAL
|
||||||
int16_t booz_cam_tilt_pwm;
|
int16_t booz_cam_tilt_pwm;
|
||||||
int16_t booz_cam_tilt;
|
|
||||||
#ifndef BOOZ_CAM_TILT_MIN
|
#ifndef BOOZ_CAM_TILT_MIN
|
||||||
#define BOOZ_CAM_TILT_MIN BOOZ_CAM_TILT_NEUTRAL
|
#define BOOZ_CAM_TILT_MIN BOOZ_CAM_TILT_NEUTRAL
|
||||||
#endif
|
#endif
|
||||||
@@ -46,8 +46,8 @@ int16_t booz_cam_tilt;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Pan definition
|
// Pan definition
|
||||||
#ifdef BOOZ_CAM_PAN_NEUTRAL
|
|
||||||
int16_t booz_cam_pan;
|
int16_t booz_cam_pan;
|
||||||
|
#ifdef BOOZ_CAM_PAN_NEUTRAL
|
||||||
#ifndef BOOZ_CAM_PAN_MIN
|
#ifndef BOOZ_CAM_PAN_MIN
|
||||||
#define BOOZ_CAM_PAN_MIN BOOZ_CAM_PAN_NEUTRAL
|
#define BOOZ_CAM_PAN_MIN BOOZ_CAM_PAN_NEUTRAL
|
||||||
#endif
|
#endif
|
||||||
@@ -78,9 +78,13 @@ void booz_cam_init(void) {
|
|||||||
booz_cam_tilt_pwm = BOOZ_CAM_TILT_NEUTRAL;
|
booz_cam_tilt_pwm = BOOZ_CAM_TILT_NEUTRAL;
|
||||||
BOOZ_CAM_SetPwm(booz_cam_tilt_pwm);
|
BOOZ_CAM_SetPwm(booz_cam_tilt_pwm);
|
||||||
booz_cam_tilt = 0;
|
booz_cam_tilt = 0;
|
||||||
|
#else
|
||||||
|
booz_cam_tilt = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef BOOZ_CAM_USE_PAN
|
#ifdef BOOZ_CAM_USE_PAN
|
||||||
booz_cam_pan = BOOZ_CAM_PAN_NEUTRAL;
|
booz_cam_pan = BOOZ_CAM_PAN_NEUTRAL;
|
||||||
|
#else
|
||||||
|
booz_cam_pan = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,11 @@
|
|||||||
|
|
||||||
extern uint8_t booz_cam_mode;
|
extern uint8_t booz_cam_mode;
|
||||||
|
|
||||||
|
extern int16_t booz_cam_tilt;
|
||||||
|
extern int16_t booz_cam_pan;
|
||||||
|
|
||||||
#ifdef BOOZ_CAM_TILT_NEUTRAL
|
#ifdef BOOZ_CAM_TILT_NEUTRAL
|
||||||
extern int16_t booz_cam_tilt_pwm;
|
extern int16_t booz_cam_tilt_pwm;
|
||||||
extern int16_t booz_cam_tilt;
|
|
||||||
#endif
|
|
||||||
#ifdef BOOZ_CAM_PAN_NEUTRAL
|
|
||||||
extern int16_t booz_cam_pan;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void booz_cam_init(void);
|
extern void booz_cam_init(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user