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

Faster Multishot Math for F1 processors

This commit is contained in:
borisbstyle 2016-04-07 00:39:08 +02:00
parent 8b7b47da9a
commit f6b05a4894

View file

@ -159,7 +159,7 @@ static void pwmWriteOneshot42(uint8_t index, uint16_t value)
static void pwmWriteMultiShot(uint8_t index, uint16_t value) static void pwmWriteMultiShot(uint8_t index, uint16_t value)
{ {
*motors[index]->ccr = (uint16_t)((float)(value-1000) / 4.1666f)+ 60; *motors[index]->ccr = 60001 * (value - 1000) / 250000 + 60;
} }
void pwmWriteMotor(uint8_t index, uint16_t value) void pwmWriteMotor(uint8_t index, uint16_t value)