[VisualAngle]升级地图SDK;修正顶视角不消失问题
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user