[6.6.0] union deviceUtil check and fix bug, close the multi device
This commit is contained in:
@@ -35,7 +35,7 @@ class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
MapPointCloudSubscriber.instance
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
RoadCrossCameraManager.instance.init(context)
|
||||
if(DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()){ //todo 新增稳定设备类型需要添加,目的避免在nuc设备上使用此类功能
|
||||
if(DeviceUtils.isLeOrEb5Model()){ //todo 新增稳定设备类型需要添加,目的避免在nuc设备上使用此类功能
|
||||
romaManager.init()
|
||||
aiCloudIdentifyDataManager.initServer(AbsMogoApplication.getApp())
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
private var identify: Identify? = null
|
||||
private var aiCloudIdentify: Identify? = null
|
||||
private var startTime: Long = 0L
|
||||
private var dockerVersion: String? = null
|
||||
|
||||
fun initType() {
|
||||
drawType("默认开启感知优化,等待docker版本")
|
||||
@@ -50,24 +51,7 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
val dockerVersion = carConfigResp.dockVersion
|
||||
if (dockerVersion != null && dockerVersion.isNotEmpty()) {
|
||||
try {
|
||||
val version = ParseVersionUtils.parseVersion(true, dockerVersion)
|
||||
identify = if (version >= 30100 && isT1T2(FunctionBuildConfig.appIdentityMode)) {
|
||||
FunctionBuildConfig.isBeautyMode = false
|
||||
drawType("关闭感知优化模式")
|
||||
DriverIdentify.originDataDrawer
|
||||
} else {
|
||||
FunctionBuildConfig.isBeautyMode = true
|
||||
drawType("开启感知优化模式")
|
||||
UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
drawType("解析docker异常:$dockerVersion")
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
}
|
||||
dockerVersion = carConfigResp.dockVersion
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
@@ -93,6 +77,29 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
object : Handler(WorkThreadHandler.newInstance("IdentifyFactoryDrawer").looper) {
|
||||
override fun handleMessage(msg: Message) {
|
||||
super.handleMessage(msg)
|
||||
|
||||
if(identify == null){
|
||||
if (dockerVersion != null && dockerVersion!!.isNotEmpty()) {
|
||||
try {
|
||||
val version = ParseVersionUtils.parseVersion(true, dockerVersion)
|
||||
identify = if (version >= 30100 && isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
FunctionBuildConfig.isBeautyMode = false
|
||||
drawType("关闭感知优化模式")
|
||||
DriverIdentify.originDataDrawer
|
||||
} else {
|
||||
FunctionBuildConfig.isBeautyMode = true
|
||||
drawType("开启感知优化模式")
|
||||
UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
drawType("解析docker异常:$dockerVersion")
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
}else{
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!FunctionBuildConfig.isBeautyMode) {
|
||||
// 非感知美化优化模式,清除旧数据,使用 DriverIdentify originDataDrawer 原始数据绘制
|
||||
if (identify is IdentifyBeautifyDataDrawer) {
|
||||
@@ -108,6 +115,7 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
}
|
||||
|
||||
when (msg.what) {
|
||||
MSG_CHECK -> {
|
||||
if(startTime == 0L){
|
||||
|
||||
Reference in New Issue
Block a user