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

Overclock F1 targets by default (CC3D excluded) // Fix timer scaling for oneshot125 / oneshot42

This commit is contained in:
borisbstyle 2016-02-28 23:23:01 +01:00
parent 6e96adff0d
commit 0de34f14fe
3 changed files with 17 additions and 2 deletions

View file

@ -134,7 +134,17 @@ static void pwmWriteStandard(uint8_t index, uint16_t value)
{
*motors[index]->ccr = value;
}
#if defined(STM32F10X) && !defined(CC3D)
static void pwmWriteOneshot125(uint8_t index, uint16_t value)
{
*motors[index]->ccr = value * 21 / 6; // 24Mhz -> 8Mhz
}
static void pwmWriteOneshot42(uint8_t index, uint16_t value)
{
*motors[index]->ccr = value * 7 / 6;
}
#else
static void pwmWriteOneshot125(uint8_t index, uint16_t value)
{
*motors[index]->ccr = value * 3; // 24Mhz -> 8Mhz
@ -144,6 +154,7 @@ static void pwmWriteOneshot42(uint8_t index, uint16_t value)
{
*motors[index]->ccr = value;
}
#endif
static void pwmWriteMultiShot(uint8_t index, uint16_t value)
{