From 3e2b3620ca08955f815b949e5c1a291e43bac47e Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Thu, 10 Nov 2022 16:53:11 +0800 Subject: [PATCH] =?UTF-8?q?mogo-obu-sdk=20=E4=BF=AE=E6=94=B9obu=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 2 +- .../function/obu/mogo/MogoPrivateObuNewManager.kt | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/config.gradle b/config.gradle index 1ce4ee01f0..04e1f0f0f0 100644 --- a/config.gradle +++ b/config.gradle @@ -113,7 +113,7 @@ ext { // obu sdk obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3", mogoobuold : 'com.zhidao.support.obu:mogoobu:1.0.0.33', - mogoobu : 'com.mogo.support.obu:mogo-obu:1.0.0', + mogoobu : 'com.mogo.support.obu:mogo-obu:1.0.1', mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.24', // google diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index 23dc2a366b..18e8ffda81 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -44,13 +44,12 @@ class MogoPrivateObuNewManager private constructor() { } private var mContext: Context? = null - private val TAG = "liyz" + private val TAG = "ObuNewManager" private var mObuStatusInfo = CallerObuListenerManager.getObuStatusInfo() fun connectObu(context: Context, obuIpAddress: String, padIpAddress: String) { MogoObuManager.getInstance().registerMogoObuListener(mogoObuListener) - Log.d(TAG, "MogoPrivateObuNewManager obuIpAddress = $obuIpAddress ----- padIpAddress = $padIpAddress") val com = MogoObuCom.newBuilder() .setLocalIp(padIpAddress) .setComType(MogoObuComType.UDP) @@ -91,7 +90,6 @@ class MogoPrivateObuNewManager private constructor() { */ override fun onConnectStatus(connectStatus: Int) { if (connectStatus == 0) { //断开连接 - Log.d(TAG, "new onConnectFail ------> ") CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "onConnectFail ------> ") mObuStatusInfo.obuStatus = false mObuStatusInfo.obuHvStatus = false @@ -101,7 +99,6 @@ class MogoPrivateObuNewManager private constructor() { mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_HV", false) } mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", false) } } else if (connectStatus == 1) { //连接成功 - Log.d(TAG, "new onConnected ------> ") CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "onConnected ------> ") mObuStatusInfo.obuStatus = true CallerObuListenerManager.invokeListener(mObuStatusInfo) @@ -113,8 +110,6 @@ class MogoPrivateObuNewManager private constructor() { } catch (e: Exception) { e.printStackTrace() } - } else { - Log.d(TAG, "new connectStatus ------> $connectStatus ") } } @@ -243,7 +238,6 @@ class MogoPrivateObuNewManager private constructor() { "$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "onMogoObuRsiWarning ------> $data" ) - Log.d(TAG, "onMogoObuRsiWarning data = ${data.toString()}") if (data != null && data.warning_Msg != null && data.warning_Msg.size > 0) { var alertContent = "" var ttsContent = "" @@ -316,11 +310,7 @@ class MogoPrivateObuNewManager private constructor() { CallerLogger.d( "$M_OBU${MogoObuConst.TAG_MOGO_OBU}", - "ttsContent = $ttsContent --alertContent = $alertContent" - ) - Log.d( - TAG, - "appId = $appId ---ttsContent = $ttsContent ---alertContent = $alertContent + --direction = ${direction.direction}" + "ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} " ) when (status) { @@ -457,7 +447,6 @@ class MogoPrivateObuNewManager private constructor() { */ private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum { CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification") -// Log.d(TAG, "getMessageDirection 预警红边:预警方向->$targetClassification") return when (targetClassification) { MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方