From 92545b1ffb471784b6c984cf546b519c7066bcaf Mon Sep 17 00:00:00 2001 From: jasonshort Date: Mon, 16 May 2011 15:55:32 +0000 Subject: [PATCH] separated the PID values based on chosen Nav PID, Temporary until we get rate control tested. git-svn-id: https://arducopter.googlecode.com/svn/trunk@2337 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/config.h | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/ArduCopterMega/config.h b/ArduCopterMega/config.h index 37dc50c8e9..b7a3880451 100644 --- a/ArduCopterMega/config.h +++ b/ArduCopterMega/config.h @@ -389,17 +389,32 @@ # define NAV_LOITER_IMAX 20 // 20° #endif -#ifndef NAV_WP_P -# define NAV_WP_P 3.0 // for 4.5 ms error = 13.5 pitch -#endif -#ifndef NAV_WP_I -# define NAV_WP_I 0.5 // this is a fast ramp up -#endif -#ifndef NAV_WP_D -# define NAV_WP_D 0 // slight dampening of a few degrees at most -#endif -#ifndef NAV_WP_IMAX -# define NAV_WP_IMAX 40 // degrees +#if NAV_TEST == 1 // 0 = traditional, 1 = rate controlled + #ifndef NAV_WP_P + # define NAV_WP_P 3.0 // for 4.5 ms error = 13.5 pitch + #endif + #ifndef NAV_WP_I + # define NAV_WP_I 0.5 // this is a fast ramp up + #endif + #ifndef NAV_WP_D + # define NAV_WP_D 0 // slight dampening of a few degrees at most + #endif + #ifndef NAV_WP_IMAX + # define NAV_WP_IMAX 40 // degrees + #endif +#else + #ifndef NAV_WP_P + # define NAV_WP_P 4.0 + #endif + #ifndef NAV_WP_I + # define NAV_WP_I 0.15 // leave 0 + #endif + #ifndef NAV_WP_D + # define NAV_WP_D 10 // not sure about at all + #endif + #ifndef NAV_WP_IMAX + # define NAV_WP_IMAX 20 // 20 degrees + #endif #endif //////////////////////////////////////////////////////////////////////////////