mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +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
|
@ -68,7 +68,11 @@ int main(void)
|
|||
pwm_params.extraServos = cfg.gimbal_flags & GIMBAL_FORWARDAUX;
|
||||
pwm_params.motorPwmRate = mcfg.motor_pwm_rate;
|
||||
pwm_params.servoPwmRate = mcfg.servo_pwm_rate;
|
||||
pwm_params.idlePulse = feature(FEATURE_3D) ? mcfg.neutral3d : 0;
|
||||
pwm_params.idlePulse = PULSE_1MS; // standard PWM for brushless ESC (default, overridden below)
|
||||
if (feature(FEATURE_3D))
|
||||
pwm_params.idlePulse = mcfg.neutral3d;
|
||||
if (pwm_params.motorPwmRate > 500)
|
||||
pwm_params.idlePulse = 0; // brushed motors
|
||||
pwm_params.failsafeThreshold = cfg.failsafe_detect_threshold;
|
||||
switch (mcfg.power_adc_channel) {
|
||||
case 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue