mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
2.8.1 changes ready for merge
This commit is contained in:
parent
6927139261
commit
897aab9c86
13 changed files with 200 additions and 142 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
|
@ -135,7 +136,7 @@ static void pwmWriteStandard(uint8_t index, uint16_t value)
|
|||
|
||||
static void pwmWriteMultiShot(uint8_t index, uint16_t value)
|
||||
{
|
||||
*motors[index]->ccr = 60001 * (value - 1000) / 250000 + 60;
|
||||
*motors[index]->ccr = lrintf(((float)(value-1000) / 0.69444f) + 360);
|
||||
}
|
||||
|
||||
void pwmWriteMotor(uint8_t index, uint16_t value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue