Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Show imu data in cli

Oleg Kalachev17edd0ee0040
diff --git a/flix/cli.ino b/flix/cli.ino
index ca297b9..4d4637c 100644
--- a/flix/cli.ino
+++ b/flix/cli.ino
@@ -66,6 +66,8 @@ static void doCommand()
} else if (command == "psq") {
Serial.printf("qx: %f qy: %f qz: %f qw: %f\n", attitude.x, attitude.y, attitude.z, attitude.w);
} else if (command == "imu") {
+ Serial.printf("gyro: %f %f %f\n", rates.x, rates.y, rates.z);
+ Serial.printf("acc: %f %f %f\n", acc.x, acc.y, acc.z);
printIMUCal();
} else if (command == "rc") {
Serial.printf("RAW throttle %d yaw %d pitch %d roll %d aux %d mode %d\n",
diff --git a/gazebo/flix.h b/gazebo/flix.h
index f68370d..6f90636 100644
--- a/gazebo/flix.h
+++ b/gazebo/flix.h
@@ -45,4 +45,4 @@ void setLED(bool on) {};
void calibrateGyro() {};
void fullMotorTest(int n) {};
void sendMotors() {};
-void printIMUCal() { Serial.print("N/A"); };
+void printIMUCal() { Serial.print("cal: N/A\n"); };