mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Merge branch 'master' into betaflight
Conflicts: src/main/blackbox/blackbox_io.c src/main/drivers/serial_usb_vcp.c src/main/flight/imu.c src/main/mw.c src/main/target/CC3D/target.h
This commit is contained in:
commit
4b3ba927e9
50 changed files with 544 additions and 250 deletions
|
@ -92,6 +92,13 @@ void imuConfigure(
|
|||
throttleAngleScale = calculateThrottleAngleScale(throttle_correction_angle);
|
||||
}
|
||||
|
||||
void imuInit(void)
|
||||
{
|
||||
smallAngle = lrintf(acc_1G * cos_approx(degreesToRadians(imuRuntimeConfig->small_angle)));
|
||||
accVelScale = 9.80665f / acc_1G / 10000.0f;
|
||||
gyroScaleRad = gyro.scale * (M_PIf / 180.0f) * 0.000001f;
|
||||
}
|
||||
|
||||
float calculateThrottleAngleScale(uint16_t throttle_correction_angle)
|
||||
{
|
||||
return (1800.0f / M_PIf) * (900.0f / throttle_correction_angle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue