fix cpu over flow on g4 when pid rate set to higher than 4k

This commit is contained in:
DusKing1 2021-12-02 08:49:03 +08:00
parent ec96415e52
commit 2f52855a91
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 3);
#define PID_PROCESS_DENOM_DEFAULT 8 #define PID_PROCESS_DENOM_DEFAULT 8
#elif defined(STM32F3) #elif defined(STM32F3)
#define PID_PROCESS_DENOM_DEFAULT 4 #define PID_PROCESS_DENOM_DEFAULT 4
#elif defined(STM32F411xE) #elif defined(STM32F411xE) || defined(STM32G4) //G4 sometimes cpu overflow when PID rate set to higher than 4k
#define PID_PROCESS_DENOM_DEFAULT 2 #define PID_PROCESS_DENOM_DEFAULT 2
#else #else
#define PID_PROCESS_DENOM_DEFAULT 1 #define PID_PROCESS_DENOM_DEFAULT 1