mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
Added PG config definitions 4
This commit is contained in:
parent
fd1d8d532e
commit
c92679f454
10 changed files with 110 additions and 13 deletions
|
@ -58,6 +58,19 @@ static float previousGyroIf[3];
|
|||
|
||||
static float dT;
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 0);
|
||||
|
||||
#ifdef STM32F10X
|
||||
#define PID_PROCESS_DENOM_DEFAULT 1
|
||||
#elif defined(USE_GYRO_SPI_MPU6000) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_ICM20689)
|
||||
#define PID_PROCESS_DENOM_DEFAULT 4
|
||||
#else
|
||||
#define PID_PROCESS_DENOM_DEFAULT 2
|
||||
#endif
|
||||
PG_RESET_TEMPLATE(pidConfig_t, pidConfig,
|
||||
.pid_process_denom = PID_PROCESS_DENOM_DEFAULT
|
||||
);
|
||||
|
||||
void pidSetTargetLooptime(uint32_t pidLooptime)
|
||||
{
|
||||
targetPidLooptime = pidLooptime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue