1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Stop Dshot commands from running when ESCs not disarmed.

This commit is contained in:
mikeller 2018-06-16 12:23:14 +12:00
parent 0a949c35b3
commit d49948f1fd
4 changed files with 69 additions and 34 deletions

View file

@ -191,7 +191,7 @@ bool isMotorProtocolDshot(void);
#ifdef USE_DSHOT
typedef uint8_t loadDmaBufferFn(uint32_t *dmaBuffer, int stride, uint16_t packet); // function pointer used to encode a digital motor value into the DMA buffer representation
uint16_t prepareDshotPacket(motorDmaOutput_t *const motor, uint16_t value);
uint16_t prepareDshotPacket(motorDmaOutput_t *const motor);
extern loadDmaBufferFn *loadDmaBuffer;
@ -201,9 +201,11 @@ void pwmWriteDshotCommand(uint8_t index, uint8_t motorCount, uint8_t command, bo
void pwmWriteDshotInt(uint8_t index, uint16_t value);
void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, motorPwmProtocolTypes_e pwmProtocolType, uint8_t output);
void pwmCompleteDshotMotorUpdate(uint8_t motorCount);
bool pwmIsProcessingDshotCommand(void);
bool pwmDshotCommandIsQueued(void);
bool pwmDshotCommandIsProcessing(void);
uint8_t pwmGetDshotCommand(uint8_t index);
bool pwmProcessDshotCommand(uint8_t motorCount);
bool pwmDshotCommandOutputIsEnabled(uint8_t motorCount);
#endif