Changes to scaling of the I-term. It is now 200 times smaller
This commit is contained in:
parent
dab5b5626d
commit
e6ce36f9e9
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#define PTERM_SCALE 0.032029f /*P-term used as a scale value to the PID controller*/
|
||||
#define ITERM_SCALE 0.244381f /*I-term used as a scale value to the PID controller*/
|
||||
#define ITERM_SCALE 0.0012f /*I-term used as a scale value to the PID controller*/
|
||||
#define DTERM_SCALE 0.000529f /*D-term used as a scale value to the PID controller*/
|
||||
|
||||
#define RADIO_RANGE 500 /*Radio range input*/
|
||||
@ -31,7 +31,7 @@
|
||||
#define GYRO_RANGE 720 /*Determines the maximum rotational limit (limits the rc input)*/
|
||||
#define COMPASS_RANGE 180 /*Determines the maximum compass limit (limits the rc input)*/
|
||||
|
||||
#define PID_MAX_I 256/2 /*Constrains ITerm*/
|
||||
#define PID_MAX_I 256 /*Constrains ITerm*/
|
||||
#define PID_MAX_D 512 /*Constrains DTerm*/
|
||||
|
||||
/*Struct that belongs to a certain PID controller*/
|
||||
|
@ -47,6 +47,10 @@ void init_system()
|
||||
//Configure the clock
|
||||
system_clock_config();
|
||||
|
||||
//init motors to run with oneshot 125, small delay
|
||||
HAL_Delay(1000);
|
||||
pwmEnableAllMotors(Oneshot125);
|
||||
|
||||
//Initializes all the pids that are used in the system. This part will also init the gyro and accelerometer.
|
||||
pidInit();
|
||||
|
||||
@ -97,9 +101,7 @@ void init_system()
|
||||
|
||||
#endif
|
||||
|
||||
//init motors to run with oneshot 125, small delay
|
||||
HAL_Delay(1000);
|
||||
pwmEnableAllMotors(Oneshot125);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user