mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 17:55:28 +03:00
Change fallback ESC protocol to Multishort when DSHOT is not available
This commit is contained in:
parent
2f2719c313
commit
c40cfdd143
2 changed files with 1 additions and 11 deletions
|
@ -239,7 +239,7 @@ void validateAndFixConfig(void)
|
||||||
// Limitations of different protocols
|
// Limitations of different protocols
|
||||||
#if !defined(USE_DSHOT)
|
#if !defined(USE_DSHOT)
|
||||||
if (motorConfig()->motorPwmProtocol > PWM_TYPE_BRUSHED) {
|
if (motorConfig()->motorPwmProtocol > PWM_TYPE_BRUSHED) {
|
||||||
motorConfigMutable()->motorPwmProtocol = PWM_TYPE_STANDARD;
|
motorConfigMutable()->motorPwmProtocol = PWM_TYPE_MULTISHOT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -93,16 +93,6 @@ PG_RESET_TEMPLATE(mixerConfig_t, mixerConfig,
|
||||||
.outputMode = SETTING_OUTPUT_MODE_DEFAULT,
|
.outputMode = SETTING_OUTPUT_MODE_DEFAULT,
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef BRUSHED_MOTORS
|
|
||||||
#define DEFAULT_PWM_PROTOCOL PWM_TYPE_BRUSHED
|
|
||||||
#define DEFAULT_PWM_RATE 16000
|
|
||||||
#else
|
|
||||||
#define DEFAULT_PWM_PROTOCOL PWM_TYPE_ONESHOT125
|
|
||||||
#define DEFAULT_PWM_RATE 400
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFAULT_MAX_THROTTLE 1850
|
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(motorConfig_t, motorConfig, PG_MOTOR_CONFIG, 9);
|
PG_REGISTER_WITH_RESET_TEMPLATE(motorConfig_t, motorConfig, PG_MOTOR_CONFIG, 9);
|
||||||
|
|
||||||
PG_RESET_TEMPLATE(motorConfig_t, motorConfig,
|
PG_RESET_TEMPLATE(motorConfig_t, motorConfig,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue