diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java index 5ab824a239..0fb0483568 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java @@ -1,6 +1,8 @@ package com.mogo.eagle.core.function.autopilot.adapter; -import android.text.TextUtils; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA; + +import android.util.Log; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener; @@ -8,12 +10,10 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager; -import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.module.common.drawer.IdentifyDataDrawer; -import com.zhidao.support.obu.ami.AmiClientManager; - import org.jetbrains.annotations.NotNull; import java.util.List; @@ -47,15 +47,39 @@ public class MoGoHandAdasMsgManager implements return moGoHandAdasMsgManager; } + private int turnLightTimes = 0; + private boolean isOnTurnLight = false; + private int turnLight = 0; + + private int setTurnLightState(int turn_light) { + if (turn_light == 0) { + if (isOnTurnLight) { + if (turnLightTimes >= 10) { + isOnTurnLight = false; + turnLight = 0; + } + turnLightTimes++; + } + } else if (turn_light == 1) { + turnLightTimes = 0; + isOnTurnLight = true; + turnLight = 1; + } else if (turn_light == 2) { + turnLightTimes = 0; + isOnTurnLight = true; + turnLight = 2; + } + return turnLight; + } + @Override public void onAutopilotLightSwitchData(Chassis.LightSwitch lightSwitch) { //can数据转发 转向灯状态 0是正常 1是左转 2是右转 -// if (lightSwitch != null) { -// int turnLightNum = lightSwitch.getNumber(); -// AmiClientManager.getInstance().setTurnLightState(turnLightNum); -// //设置转向灯 -// CallerHmiManager.INSTANCE.showTurnLight(turnLightNum); -// } + if (lightSwitch != null) { + int state = setTurnLightState(lightSwitch.getNumber()); + CallerLogger.INSTANCE.d(M_DEVA + TAG, "onAutopilotLightSwitchData -- newState:" + state + ",oldState:" + lightSwitch.getNumber()); + CallerHmiManager.INSTANCE.showTurnLight(state); + } } @Override diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt index 222aad6344..32143dbcf6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt @@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.turnlight import android.content.Context import android.util.AttributeSet +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.animation.AlphaAnimation @@ -86,8 +87,6 @@ class TurnLightViewStatus @JvmOverloads constructor( } } else { //消失 - CallerVisualAngleManager.changeVisualAngle(Default()) - isVisualAngleChanged = false if (!isDisappare) { GlobalScope.launch(Dispatchers.Main) { animationDisappear() diff --git a/gradle.properties b/gradle.properties index e4530c9ffa..3161f3c3bc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.48 MOGO_TELEMATIC_VERSION=1.3.48 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.0.9.4 +MAP_SDK_VERSION=2.0.9.5 MAP_SDK_OPERATION_VERSION=1.0.12 # websocket WEBSOCKET_VERSION=1.1.7