1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Merge pull request #1282 from blckmn/digital_motors

DSHOT600 & 150 -> digital one shot motor (ESC) protocol
This commit is contained in:
borisbstyle 2016-10-19 00:24:39 +02:00 committed by GitHub
commit f698f99198
34 changed files with 731 additions and 153 deletions

View file

@ -259,8 +259,9 @@ void init(void)
featureClear(FEATURE_3D);
idlePulse = 0; // brushed motors
}
#ifdef USE_QUAD_MIXER_ONLY
motorInit(&masterConfig.motorConfig, idlePulse, 4);
motorInit(&masterConfig.motorConfig, idlePulse, QUAD_MOTOR_COUNT);
#else
motorInit(&masterConfig.motorConfig, idlePulse, mixers[masterConfig.mixerMode].motorCount);
#endif
@ -281,10 +282,7 @@ void init(void)
pwmRxSetInputFilteringMode(masterConfig.inputFilteringMode);
#endif
bool usingUnsyncedOutput = (masterConfig.motorConfig.useUnsyncedPwm
|| masterConfig.motorConfig.motorPwmProtocol == PWM_TYPE_BRUSHED
|| masterConfig.motorConfig.motorPwmProtocol == PWM_TYPE_STANDARD);
mixerUsePWMOutputConfiguration(usingUnsyncedOutput);
mixerConfigureOutput();
systemState |= SYSTEM_STATE_MOTORS_READY;