change the acc to pnc

This commit is contained in:
zhongchao
2022-08-19 15:15:45 +08:00
parent be887f4166
commit 486baf9bff

View File

@@ -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() {