[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Gyro Fusion #784

Draft
wants to merge 4 commits into
base: emuflight-1.0.0-master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update gyro.c
  • Loading branch information
Quick-Flash authored and nerdCopter committed Nov 22, 2022
commit 4cf2e5c3101a711c2a3825a5cc58a5fc3f0255d0
3 changes: 1 addition & 2 deletions src/main/sensors/gyro.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@ FAST_CODE void gyroUpdate(void)
gyro.gyroADC[X] = ((gyroScaled1 * varianceGyro2) + (gyroScaled2 * varianceGyro1)) / (varianceGyro1 + varianceGyro2);
DEBUG_SET(DEBUG_FUSION, 0, lrintf(gyroScaled1));
DEBUG_SET(DEBUG_FUSION, 1, lrintf(gyroScaled2));
DEBUG_SET(DEBUG_FUSION, 2, lrintf(varianceGyro1));
DEBUG_SET(DEBUG_FUSION, 3, lrintf(varianceGyro2));
DEBUG_SET(DEBUG_FUSION, 2, lrintf(gyro.gyroADC[X]));

gyroScaled1 = gyro.gyroSensor1.gyroDev.gyroADC[Y] * gyro.gyroSensor1.gyroDev.scale;
gyroScaled2 = gyro.gyroSensor2.gyroDev.gyroADC[Y] * gyro.gyroSensor2.gyroDev.scale;
Expand Down