reset gyro drift when gyro is turned off (#1542)

This commit is contained in:
Adam Bird 2022-09-21 21:29:35 -04:00 committed by GitHub
parent ec2222347e
commit b4740d131f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,10 @@ namespace Ship {
getGyroX(virtualSlot) *= gyro_sensitivity;
getGyroY(virtualSlot) *= gyro_sensitivity;
}
else {
getGyroX(virtualSlot) = 0;
getGyroY(virtualSlot) = 0;
}
getPressedButtons(virtualSlot) = 0;