mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Add default config option for dshot telemetry (#13184)
This commit is contained in:
parent
32ccc841ab
commit
09b59b7668
2 changed files with 13 additions and 0 deletions
|
@ -44,6 +44,10 @@
|
||||||
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF
|
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(DEFAULT_DSHOT_TELEMETRY)
|
||||||
|
#define DEFAULT_DSHOT_TELEMETRY DSHOT_TELEMETRY_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_FN(motorConfig_t, motorConfig, PG_MOTOR_CONFIG, 2);
|
PG_REGISTER_WITH_RESET_FN(motorConfig_t, motorConfig, PG_MOTOR_CONFIG, 2);
|
||||||
|
|
||||||
void pgResetFn_motorConfig(motorConfig_t *motorConfig)
|
void pgResetFn_motorConfig(motorConfig_t *motorConfig)
|
||||||
|
@ -107,6 +111,10 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig)
|
||||||
motorConfig->dev.useBurstDshot = DEFAULT_DSHOT_BURST;
|
motorConfig->dev.useBurstDshot = DEFAULT_DSHOT_BURST;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_DSHOT_TELEMETRY
|
||||||
|
motorConfig->dev.useDshotTelemetry = DEFAULT_DSHOT_TELEMETRY;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DSHOT_BITBANG
|
#ifdef USE_DSHOT_BITBANG
|
||||||
motorConfig->dev.useDshotBitbang = DEFAULT_DSHOT_BITBANG;
|
motorConfig->dev.useDshotBitbang = DEFAULT_DSHOT_BITBANG;
|
||||||
motorConfig->dev.useDshotBitbangedTimer = DSHOT_BITBANGED_TIMER_DEFAULT;
|
motorConfig->dev.useDshotBitbangedTimer = DSHOT_BITBANGED_TIMER_DEFAULT;
|
||||||
|
|
|
@ -37,6 +37,11 @@ typedef enum {
|
||||||
DSHOT_DMAR_AUTO
|
DSHOT_DMAR_AUTO
|
||||||
} dshotDmar_e;
|
} dshotDmar_e;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
DSHOT_TELEMETRY_OFF,
|
||||||
|
DSHOT_TELEMETRY_ON,
|
||||||
|
} dshotTelemetry_e;
|
||||||
|
|
||||||
typedef struct motorDevConfig_s {
|
typedef struct motorDevConfig_s {
|
||||||
uint16_t motorPwmRate; // The update rate of motor outputs (50-498Hz)
|
uint16_t motorPwmRate; // The update rate of motor outputs (50-498Hz)
|
||||||
uint8_t motorPwmProtocol; // Pwm Protocol
|
uint8_t motorPwmProtocol; // Pwm Protocol
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue