diff --git a/1.Hardware/钢网/Gerber_2-PCB_GeekTrack_PCB_v01_2022-09-18.zip b/1.Hardware/钢网/Gerber_2-PCB_GeekTrack_PCB_v01_2022-09-18.zip new file mode 100644 index 0000000..c27ee43 Binary files /dev/null and b/1.Hardware/钢网/Gerber_2-PCB_GeekTrack_PCB_v01_2022-09-18.zip differ diff --git a/2.Firmware/GeekTrack/components/GeekHAL/HAL/HAL_IMU.cpp b/2.Firmware/GeekTrack/components/GeekHAL/HAL/HAL_IMU.cpp index c8a70bf..c0fe6fc 100644 --- a/2.Firmware/GeekTrack/components/GeekHAL/HAL/HAL_IMU.cpp +++ b/2.Firmware/GeekTrack/components/GeekHAL/HAL/HAL_IMU.cpp @@ -41,7 +41,14 @@ void IMU_Update() imu.steps = Pedometer_Update(imu.ax, imu.ay, imu.az); - printf("%.2f, %.2f, %.2f\n", imu.acc[0], imu.acc[1], imu.acc[2]); + /* Sensor Debug. */ + float yaw = 0.0f, pitch = 0.0f, roll = 0.0f; + MPU9250_GetEulerAngles(&yaw, &roll, &pitch); + + printf("%.2f, %.2f, %.2f\n", yaw, roll, pitch); + //printf("%.2f, %.2f, %.2f\n", imu.acc[0], imu.acc[1], imu.acc[2]); + //printf("%.2f, %.2f, %.2f\n", imu.gyr[0], imu.gyr[1], imu.gyr[2]); + if (CommitFunc) { CommitFunc(&imu, UserData); diff --git a/2.Firmware/GeekTrack/components/Libraries/src/mpu9250.c b/2.Firmware/GeekTrack/components/Libraries/src/mpu9250.c index 20e4875..63c9f11 100644 --- a/2.Firmware/GeekTrack/components/Libraries/src/mpu9250.c +++ b/2.Firmware/GeekTrack/components/Libraries/src/mpu9250.c @@ -107,9 +107,9 @@ void MPU9250_GetEulerAngles(float* yaw,float* roll, float* pitch) mpu9250.yaw = atan2(q2*q1 + q0*q3,0.5f - q2*q2 - q3*q3); // * (180.0f /3.141592f); mpu9250.roll = atan2(q2*q3 + q0*q1,0.5f - q2*q2 - q1*q1); //* (180.0f /3.141592f); - mpu9250.yaw = (180.0f / 3.141592f); - mpu9250.roll = (180.0f / 3.141592f); - mpu9250.pitch = (180.0f / 3.141592f); + mpu9250.yaw *= (180.0f / 3.141592f); + mpu9250.roll *= (180.0f / 3.141592f); + mpu9250.pitch *= (180.0f / 3.141592f); *yaw = mpu9250.yaw; *roll = mpu9250.roll; diff --git a/3.Docs/GeekTrackv2.xmind b/3.Docs/GeekTrackv2.xmind new file mode 100644 index 0000000..3e12b61 Binary files /dev/null and b/3.Docs/GeekTrackv2.xmind differ