From 486baf9bff78c5e0177f2553c10105342ea53b69 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Fri, 19 Aug 2022 15:15:45 +0800 Subject: [PATCH] change the acc to pnc --- .../core/function/hmi/ui/widget/TrafficDataView.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java index cc2d7aa78d..f3484daede 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java @@ -15,7 +15,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager; +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager; import com.mogo.eagle.core.function.hmi.R; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; @@ -24,6 +24,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils; import org.jetbrains.annotations.NotNull; import chassis.Chassis; +import mogo.telematics.pad.MessagePad; /** * @author Jing @@ -99,11 +100,7 @@ public class TrafficDataView extends ConstraintLayout { super.onAttachedToWindow(); handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L); CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener); - CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, gnssInfo -> { - if (gnssInfo != null) { - acceleration = gnssInfo.getAcceleration(); - } - }); + CallerAutopilotPlanningActionsListenerManager.INSTANCE.addListener(TAG, planningActionMsg -> acceleration = planningActionMsg.getDestinationAcc()); } private void initView(@NonNull Context context) { @@ -119,7 +116,7 @@ public class TrafficDataView extends ConstraintLayout { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); CallerAutopilotVehicleStateListenerManager.INSTANCE.removeListener(TAG); - CallerAutopilotCarStatusListenerManager.INSTANCE.removeListener(TAG); + CallerAutopilotPlanningActionsListenerManager.INSTANCE.removeListener(TAG); } private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {