basic menu working

This commit is contained in:
Brent Perteet
2025-06-24 09:20:40 -05:00
parent f59eb660cf
commit 311981ceb4
9 changed files with 494 additions and 114 deletions

View File

@@ -168,8 +168,25 @@ static void imu_task(void *pvParameters) {
imu.raw[ANGLE_XY] = atan2f((float)imu_data.acc_x, (float)imu_data.acc_y) * 180 / M_PI;
float angle;
imu.filtered[ANGLE_XY] = LPF_Update(&lpf, imu.raw[ANGLE_XY]);
if (imu.raw[ANGLE_XY] > MAX_INDICATION_ANGLE)
{
angle = MAX_INDICATION_ANGLE;
}
else
if (imu.raw[ANGLE_XY] > MAX_INDICATION_ANGLE)
{
angle = -MAX_INDICATION_ANGLE;
}
else
{
angle = imu.raw[ANGLE_XY];
}
imu.angle = LPF_Update(&lpf, angle);
//imu.filtered[ANGLE_XY] = LPF_Update(&lpf, imu.raw[ANGLE_XY]);
system_setImuData(imu);