Skip to content

Commit

Permalink
Temporary calculations test
Browse files Browse the repository at this point in the history
Not ran yet on hardware
  • Loading branch information
MaEtUgR committed Jul 8, 2024
1 parent 94b30f7 commit d60c84c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions firmware/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Adafruit_DRV2605 haptic;
SF fusion;

LED led;
RotationMath rotation_math;

// Variables
float gx, gy, gz, ax, ay, az, mx, my, mz;
Expand Down Expand Up @@ -143,6 +144,7 @@ void loop() {
throttle = getThrottle();

float* quat = fusion.getQuat();
matrix::Eulerf control_angles = rotation_math.getControlAngles(matrix::Quatf(quat));
// Serial.print(">dt:");
// Serial.println(deltat);
// Serial.print(">gx:");
Expand Down Expand Up @@ -175,6 +177,14 @@ void loop() {
Serial.print(">z:");
Serial.println(quat[3]);

Serial.print("Roll: ");
Serial.print(degrees(control_angles(0)));
Serial.print(" Pitch: ");
Serial.print(degrees(control_angles(1)));
Serial.print(" Yaw: ");
Serial.print(degrees(control_angles(2)));
Serial.println("");

// animatePowerOn(throttle);

delay(50);
Expand Down

0 comments on commit d60c84c

Please sign in to comment.