Merge branch 'dev_robotaxi-d_230612_3.3.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_230612_3.3.0
This commit is contained in:
@@ -41,7 +41,7 @@ class BusPassengerMapDirectionView @JvmOverloads constructor(
|
||||
|
||||
companion object {
|
||||
//小地图名称
|
||||
const val TAG = "TPMapDirectionView"
|
||||
const val TAG = "BusPassengerMapDirectionView"
|
||||
}
|
||||
|
||||
private lateinit var mAMapNaviView: TextureMapView
|
||||
@@ -116,7 +116,7 @@ class BusPassengerMapDirectionView @JvmOverloads constructor(
|
||||
// 设置地图的样式
|
||||
mAMap.uiSettings.apply {
|
||||
isZoomControlsEnabled = false // 地图缩放级别的交换按钮
|
||||
setAllGesturesEnabled(false) // 所有手势
|
||||
setAllGesturesEnabled(true) // 所有手势
|
||||
isMyLocationButtonEnabled = false // 显示默认的定位按钮
|
||||
setLogoBottomMargin(-150) //设置Logo下边界距离屏幕底部的边距,设置为负值即可
|
||||
}
|
||||
@@ -148,9 +148,9 @@ class BusPassengerMapDirectionView @JvmOverloads constructor(
|
||||
mAMap.setOnCameraChangeListener(this)
|
||||
}
|
||||
|
||||
override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
|
||||
return true
|
||||
}
|
||||
// override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
|
||||
// return true
|
||||
// }
|
||||
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
if (mogoLocation == null) {
|
||||
@@ -212,8 +212,10 @@ class BusPassengerMapDirectionView @JvmOverloads constructor(
|
||||
mPolyline!!.options.customTextureIndex = texIndexList
|
||||
return
|
||||
}
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
if(textureList.isEmpty()) {
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
}
|
||||
//设置线段纹理
|
||||
val polylineOptions = PolylineOptions().apply {
|
||||
addAll(allPoints)
|
||||
@@ -231,6 +233,7 @@ class BusPassengerMapDirectionView @JvmOverloads constructor(
|
||||
override fun clearPolyline() {
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
mPolyline = null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class TaxiPassengerMapDirectionView @JvmOverloads constructor(
|
||||
|
||||
companion object {
|
||||
//小地图名称
|
||||
const val TAG = "TPMapDirectionView"
|
||||
const val TAG = "TaxiPassengerMapDirectionView"
|
||||
private const val zoomLevel = 13.0f
|
||||
}
|
||||
|
||||
@@ -212,8 +212,10 @@ class TaxiPassengerMapDirectionView @JvmOverloads constructor(
|
||||
mPolyline!!.options.customTextureIndex = texIndexList
|
||||
return
|
||||
}
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
if(textureList.isEmpty()) {
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
}
|
||||
//设置线段纹理
|
||||
val polylineOptions = PolylineOptions().apply {
|
||||
addAll(allPoints)
|
||||
@@ -231,6 +233,7 @@ class TaxiPassengerMapDirectionView @JvmOverloads constructor(
|
||||
override fun clearPolyline() {
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
mPolyline = null
|
||||
}
|
||||
mStartMarker.isVisible = false
|
||||
mEndMarker.isVisible = false
|
||||
|
||||
@@ -219,8 +219,10 @@ class TaxiMapDirectionView @JvmOverloads constructor(
|
||||
mPolyline!!.options.customTextureIndex = texIndexList
|
||||
return
|
||||
}
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
if(textureList.isEmpty()) {
|
||||
textureList.add(mArrivedRes)
|
||||
textureList.add(mUnArrivedRes)
|
||||
}
|
||||
//设置线段纹理
|
||||
val polylineOptions = PolylineOptions().apply {
|
||||
addAll(allPoints)
|
||||
@@ -238,6 +240,7 @@ class TaxiMapDirectionView @JvmOverloads constructor(
|
||||
override fun clearPolyline() {
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
mPolyline = null
|
||||
}
|
||||
mStartMarker.isVisible = false
|
||||
mEndMarker.isVisible = false
|
||||
@@ -281,6 +284,6 @@ class TaxiMapDirectionView @JvmOverloads constructor(
|
||||
|
||||
companion object {
|
||||
//小地图名称
|
||||
const val TAG = "TPMapDirectionView"
|
||||
const val TAG = "TaxiMapDirectionView"
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ internal class MoFangLinkedLog {
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_HMI,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MO_FANG_CONNECT,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
import android.os.Message;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
@@ -27,10 +28,12 @@ public class AutopilotAbility250 {
|
||||
private static final String[] NODE_INFO_STATE = {"未知状态 ", "依赖未就绪 ", "启动中 ", "运行 ", "停止 ", "无法启动状态 ", "人为启动状态 ", "人为关闭状态 "};
|
||||
private volatile Timer timer;
|
||||
private ChassisStatesOuterClass.ChassisStates chassisStates;
|
||||
private int mapVersion = -1;//工控机版本
|
||||
private int mapVersion = -1;//MAP版本
|
||||
private int masterVersion = -1;//Master版本
|
||||
|
||||
public AutopilotAbility250(int mapVersion) {
|
||||
this.mapVersion = mapVersion;
|
||||
this.masterVersion = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,19 +54,18 @@ public class AutopilotAbility250 {
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测节点状态相关
|
||||
if (statusInfo != null) {
|
||||
int version = -1;
|
||||
if (statusInfo.hasMasterVersion()) {
|
||||
if (masterVersion == -1 && statusInfo.hasMasterVersion()) {
|
||||
//截取Master Version
|
||||
String masterVersion = statusInfo.getMasterVersion();
|
||||
version = AdasManager.getInstance().parseVersion(false, masterVersion);
|
||||
masterVersion = AdasManager.getInstance().parseVersion(false, statusInfo.getMasterVersion());
|
||||
}
|
||||
CupidLogUtils.i(TAG, "MasterVersion=" + masterVersion);
|
||||
//SSM 3版本兼容
|
||||
if (mapVersion >= 30400 && version > 2 && statusInfo.hasAutoPilotReady() && statusInfo.hasAutoPilotUnreadyReason()) {
|
||||
if (mapVersion >= 30400 && masterVersion > 2 && statusInfo.hasAutoPilotReady() && statusInfo.hasAutoPilotUnreadyReason()) {
|
||||
isAutopilotAbility = statusInfo.getAutoPilotReady();
|
||||
if (!isAutopilotAbility) {
|
||||
unableAutopilotReason = statusInfo.getAutoPilotUnreadyReason();
|
||||
}
|
||||
} else if (mapVersion >= 21000 && version > 1 && statusInfo.hasAutoPilotReady()) {//如果 maser version 大于1,还需要判断AutoPilotReady字段是否存在,以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
|
||||
} else if (mapVersion >= 21000 && masterVersion > 1 && statusInfo.hasAutoPilotReady()) {//如果 maser version 大于1,还需要判断AutoPilotReady字段是否存在,以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
|
||||
isAutopilotAbility = statusInfo.getAutoPilotReady();
|
||||
if (!isAutopilotAbility) {
|
||||
SystemStatusInfo.NodeFaultList nodeFaultList = statusInfo.getAutoPilotUnreadyList();
|
||||
@@ -176,6 +178,7 @@ public class AutopilotAbility250 {
|
||||
timer = null;
|
||||
}
|
||||
this.chassisStates = null;
|
||||
this.masterVersion = -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import android.os.Message;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
@@ -29,8 +29,12 @@ public class AutopilotAbility330 {
|
||||
private volatile Timer timer;
|
||||
|
||||
private volatile FSMStatusReasonQueryOuterClass.FSMStatusReasonRespond fsmStatusReasonRespond;//自动驾驶状态为OFF的原因
|
||||
private int mapVersion = -1;//MAP版本
|
||||
private int masterVersion = -1;//Master版本
|
||||
|
||||
public AutopilotAbility330() {
|
||||
public AutopilotAbility330(int mapVersion) {
|
||||
this.mapVersion = mapVersion;
|
||||
this.masterVersion = -1;
|
||||
}
|
||||
|
||||
public synchronized void setFsmStatusReasonRespond(FSMStatusReasonQueryOuterClass.FSMStatusReasonRespond fsmStatusReasonRespond) {
|
||||
@@ -51,19 +55,18 @@ public class AutopilotAbility330 {
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测节点状态相关
|
||||
if (statusInfo != null) {
|
||||
int version = -1;
|
||||
if (statusInfo.hasMasterVersion()) {
|
||||
if (masterVersion == -1 && statusInfo.hasMasterVersion()) {
|
||||
//截取Master Version
|
||||
String masterVersion = statusInfo.getMasterVersion();
|
||||
version = AdasManager.getInstance().parseVersion(false, masterVersion);
|
||||
masterVersion = AdasManager.getInstance().parseVersion(false, statusInfo.getMasterVersion());
|
||||
}
|
||||
CupidLogUtils.i(TAG, "MasterVersion=" + masterVersion);
|
||||
//SSM 3版本兼容
|
||||
if (version > 2 && statusInfo.hasAutoPilotReady() && statusInfo.hasAutoPilotUnreadyReason()) {
|
||||
if (mapVersion >= 30400 && masterVersion > 2 && statusInfo.hasAutoPilotReady() && statusInfo.hasAutoPilotUnreadyReason()) {
|
||||
isAutopilotAbility = statusInfo.getAutoPilotReady();
|
||||
if (!isAutopilotAbility) {
|
||||
unableAutopilotReason = statusInfo.getAutoPilotUnreadyReason();
|
||||
}
|
||||
} else if (version > 1 && statusInfo.hasAutoPilotReady()) {//如果 maser version 大于1,还需要判断AutoPilotReady字段是否存在,以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
|
||||
} else if (mapVersion >= 21000 && masterVersion > 1 && statusInfo.hasAutoPilotReady()) {//如果 maser version 大于1,还需要判断AutoPilotReady字段是否存在,以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
|
||||
isAutopilotAbility = statusInfo.getAutoPilotReady();
|
||||
if (!isAutopilotAbility) {
|
||||
SystemStatusInfo.NodeFaultList nodeFaultList = statusInfo.getAutoPilotUnreadyList();
|
||||
@@ -162,6 +165,7 @@ public class AutopilotAbility330 {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
this.masterVersion = -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ public class AutopilotAbilityManager {
|
||||
stop230();
|
||||
stop250();
|
||||
if (autopilotAbility330 == null) {
|
||||
autopilotAbility330 = new AutopilotAbility330();
|
||||
autopilotAbility330 = new AutopilotAbility330(mapVersion);
|
||||
autopilotAbility330.start();
|
||||
}
|
||||
} else if (mapVersion >= 20500) {
|
||||
@@ -243,6 +243,7 @@ public class AutopilotAbilityManager {
|
||||
stopTimer();
|
||||
stop230();
|
||||
stop250();
|
||||
stop330();
|
||||
handler = null;
|
||||
mapVersion = -1;
|
||||
isFutianSweeper = false;
|
||||
|
||||
Reference in New Issue
Block a user