Skip to content

Commit

Permalink
Set DSHOT default (betaflight#12508)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored and davidbitton committed Feb 5, 2024
1 parent 0ad48e0 commit ce98048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit ce98048

Please sign in to comment.