mogo-obu-sdk 修改obu的版本
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 //正前方
|
||||
|
||||
Reference in New Issue
Block a user