Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Ensure showing correct raw data in imu command Some IMUs will reset acc and gyro buffer on whoAmI() call

Oleg Kalachev5151bb913323
diff --git a/flix/imu.ino b/flix/imu.ino
index 3022bd1..cf29c8e 100644
--- a/flix/imu.ino
+++ b/flix/imu.ino
@@ -125,6 +125,7 @@ void printIMUInfo() {
print("rate: %.0f\n", loopRate);
print("gyro: %f %f %f\n", rates.x, rates.y, rates.z);
print("acc: %f %f %f\n", acc.x, acc.y, acc.z);
+ IMU.waitForData();
Vector rawGyro, rawAcc;
IMU.getGyro(rawGyro.x, rawGyro.y, rawGyro.z);
IMU.getAccel(rawAcc.x, rawAcc.y, rawAcc.z);