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:
parent
8b7b47da9a
commit
f6b05a4894
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue