mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
implement (not flight tested) brushed motors support.
set motor_pwm_rate to some value > 500 (1000, 8000, 16000 etc works on my scope). then the motor output can be used to directly drive brushed motor fets. PWM is rescaled to 0-base in brushed mode, so all same values of min/maxthrottle apply.
This commit is contained in:
parent
a695ddd66a
commit
e8b3d00003
5 changed files with 40 additions and 13 deletions
|
@ -3,6 +3,7 @@
|
|||
#define MAX_MOTORS 12
|
||||
#define MAX_SERVOS 8
|
||||
#define MAX_INPUTS 8
|
||||
#define PULSE_1MS (1000) // 1ms pulse width
|
||||
|
||||
typedef struct drv_pwm_config_t {
|
||||
bool enableInput;
|
||||
|
@ -15,8 +16,8 @@ typedef struct drv_pwm_config_t {
|
|||
uint8_t adcChannel; // steal one RC input for current sensor
|
||||
uint16_t motorPwmRate;
|
||||
uint16_t servoPwmRate;
|
||||
uint16_t idlePulse; // PWM value to use when initializing the driver;
|
||||
// default of zero means PULSE_1MS, otherwise set to given value. Used by 3D mode.
|
||||
uint16_t idlePulse; // PWM value to use when initializing the driver. set this to either PULSE_1MS (regular pwm),
|
||||
// some higher value (used by 3d mode), or 0, for brushed pwm drivers.
|
||||
uint16_t failsafeThreshold;
|
||||
} drv_pwm_config_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue