From 278e215a211796503aab489199f9e5faa049c45c Mon Sep 17 00:00:00 2001 From: Adam M Rivera Date: Wed, 4 Jul 2012 21:06:21 -0500 Subject: [PATCH] Parameters: Added flag for camera pitch/roll servos (continuous or regular) --- ArduCopter/Parameters.h | 6 ++++++ ArduCopter/Parameters.pde | 8 +++++--- ArduCopter/config.h | 9 +++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ArduCopter/Parameters.h b/ArduCopter/Parameters.h index 71738a77e3..da472a1f65 100644 --- a/ArduCopter/Parameters.h +++ b/ArduCopter/Parameters.h @@ -141,6 +141,8 @@ public: k_param_camera_pitch_gain, k_param_camera_roll_gain, k_param_rc_speed, + k_param_camera_pitch_continuous, + k_param_camera_roll_continuous, // // 200: flight modes @@ -286,6 +288,8 @@ public: AP_Float camera_pitch_gain; AP_Float camera_roll_gain; + AP_Int8 camera_pitch_continuous; + AP_Int8 camera_roll_continuous; AP_Float stabilize_d; AP_Float stabilize_d_schedule; @@ -382,6 +386,8 @@ public: camera_pitch_gain (CAM_PITCH_GAIN), camera_roll_gain (CAM_ROLL_GAIN), + camera_pitch_continuous (CAM_PITCH_CONTINUOUS), + camera_roll_continuous (CAM_ROLL_CONTINUOUS), stabilize_d (STABILIZE_D), stabilize_d_schedule (STABILIZE_D_SCHEDULE), acro_p (ACRO_P), diff --git a/ArduCopter/Parameters.pde b/ArduCopter/Parameters.pde index d1a6987692..bff8a8c67d 100644 --- a/ArduCopter/Parameters.pde +++ b/ArduCopter/Parameters.pde @@ -166,9 +166,11 @@ static const AP_Param::Info var_info[] PROGMEM = { // variable //--------- - GSCALAR(camera_pitch_gain, "CAM_P_G"), - GSCALAR(camera_roll_gain, "CAM_R_G"), - GSCALAR(stabilize_d, "STAB_D"), + GSCALAR(camera_pitch_gain, "CAM_P_G"), + GSCALAR(camera_roll_gain, "CAM_R_G"), + GSCALAR(camera_pitch_continuous,"CAM_P_CONT"), + GSCALAR(camera_roll_continuous, "CAM_R_CONT"), + GSCALAR(stabilize_d, "STAB_D"), // @Param: STAB_D_S // @DisplayName: Stabilize D Schedule diff --git a/ArduCopter/config.h b/ArduCopter/config.h index e1026d5e8d..624044deb4 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -354,6 +354,15 @@ # define CAM_PITCH_GAIN 1.0 #endif +////////////////////////////////////////////////////////////////////////////// +// CAMERA SERVO TYPE +#ifndef CAM_PITCH_CONTINUOUS +# define CAM_PITCH_CONTINUOUS 0 +#endif +#ifndef CAM_ROLL_CONTINUOUS +# define CAM_ROLL_CONTINUOUS 0 +#endif + ////////////////////////////////////////////////////////////////////////////// // OPTICAL_FLOW