1
0
Fork 0
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:
borisbstyle 2015-10-12 23:53:43 +02:00
commit 4b3ba927e9
50 changed files with 544 additions and 250 deletions

View file

@ -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);