From 62ee1fd6cd3ffd1a2cc2c5dae0c97ca66e316357 Mon Sep 17 00:00:00 2001 From: ctzsnooze Date: Tue, 20 Oct 2020 23:54:50 +1100 Subject: [PATCH] Sets antigravity gain to 0 when the user wants none. In the PR adding P to antigravity, the default value was changed so that zero now meant no antigravity, whereas before 1000 meant none. Unfortunately, `ITERM_ACCELERATOR_GAIN_OFF` remained at 1000. This was an oversight. Note also that the default value of 3500 now results in more antigravity effect than previously; it is equivalent to 4500 in the previous system. --- src/main/flight/pid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/flight/pid.h b/src/main/flight/pid.h index 550623082b..b46ed9c86b 100644 --- a/src/main/flight/pid.h +++ b/src/main/flight/pid.h @@ -52,7 +52,7 @@ // Anti gravity I constant #define AG_KI 21.586988f; -#define ITERM_ACCELERATOR_GAIN_OFF 1000 +#define ITERM_ACCELERATOR_GAIN_OFF 0 #define ITERM_ACCELERATOR_GAIN_MAX 30000 typedef enum { PID_ROLL,