new brench

This commit is contained in:
Zorua
2026-01-17 17:43:42 +08:00
parent 80c832a16b
commit 26f210da12
2 changed files with 3 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ static void CalcOffsetAngle()
new_offset -= 360.0f;
else if (angle_diff < -180.0f)
new_offset += 360.0f;
chassis_cmd_send .offset_angle = last_offset_angle *(1.0f - smooth_factor) + new_offset * smooth_factor;
chassis_cmd_send.offset_angle = last_offset_angle *(1.0f - smooth_factor) + new_offset * smooth_factor;
last_offset_angle = chassis_cmd_send.offset_angle;
// static float angle;
// static float last_diff = 0.0f; // 用于在±180°附近保持上次符号,避免来回跳变