mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
new Baseflight PID
full gyro scale is used now and a new pid with float calculations was added based on PIDrewrite eeprom size was also increased from 1kB to 2kB
This commit is contained in:
parent
bff260c7c6
commit
b996b26cbb
11 changed files with 192 additions and 31 deletions
10
src/utils.c
10
src/utils.c
|
@ -14,6 +14,16 @@ int constrain(int amt, int low, int high)
|
|||
return amt;
|
||||
}
|
||||
|
||||
float constrainf(float amt, float low, float high)
|
||||
{
|
||||
if (amt < low)
|
||||
return low;
|
||||
else if (amt > high)
|
||||
return high;
|
||||
else
|
||||
return amt;
|
||||
}
|
||||
|
||||
void initBoardAlignment(void)
|
||||
{
|
||||
float roll, pitch, yaw;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue