Faster Multishot Math for F1 processors

This commit is contained in:
borisbstyle 2016-04-07 00:39:08 +02:00
parent 8b7b47da9a
commit f6b05a4894
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ static void pwmWriteOneshot42(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)