Merge remote-tracking branch 'origin/dev_robotaxi-d_230612_3.3.0' into dev_robobus-d_230707_3.3.2

This commit is contained in:
renwj
2023-07-11 14:08:17 +08:00
3 changed files with 5 additions and 5 deletions

View File

@@ -200,7 +200,7 @@ class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChas
val outerAngle = abs(steering * 1.0 / VEHICLE_STEERING_RATIO)
val radians = Math.toRadians(outerAngle)
val d = (newTargetHeight / tan(radians)).toFloat()
if (steering < 0) {
if (steering > 0) {
// 左打轮
// 将坐标原点平移到圆心
canvas.translate(newTargetX - (d - newTargetWidth), newTargetY + newTargetHeight)
@@ -215,7 +215,7 @@ class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChas
canvas.drawArc(innerRect, -innerAngle.toFloat(), -60f, false, routerPaint)
}
if (steering > 0) {
if (steering < 0) {
//右打轮
// 将坐标原点平移到圆心
canvas.translate(newTargetX + d, newTargetY + newTargetHeight)