Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set DSHOT default #12508

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/pg/motor.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig)
#else
motorConfig->minthrottle = 1070;
motorConfig->dev.motorPwmRate = BRUSHLESS_MOTORS_PWM_RATE;
#ifndef USE_DSHOT
motorConfig->dev.motorPwmProtocol = PWM_TYPE_DISABLED;
#elif defined(DEFAULT_MOTOR_DSHOT_SPEED)
motorConfig->dev.motorPwmProtocol = DEFAULT_MOTOR_DSHOT_SPEED;
#else
motorConfig->dev.motorPwmProtocol = PWM_TYPE_DSHOT600;
#endif // USE_DSHOT
#endif // BRUSHED_MOTORS

motorConfig->maxthrottle = 2000;
Expand Down
2 changes: 2 additions & 0 deletions src/main/target/STM32F411/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

#define USE_BEEPER

#define DEFAULT_MOTOR_DSHOT_SPEED PWM_TYPE_DSHOT300

#ifdef USE_SDCARD
#define USE_SDCARD_SPI
#define USE_SDCARD_SDIO
Expand Down