完成了自动驾驶状态信息回传

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-12 21:24:58 +08:00
parent 870af04059
commit 9802124169
15 changed files with 309 additions and 37 deletions

View File

@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.obu.mogo
import android.content.Context
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
@@ -39,7 +38,7 @@ class MogoPrivateObuManager private constructor() {
private var mMogoServiceApis: IMogoServiceApis? = null
private var mIMogoMapService: IMogoMapService? = null
private var mContext: Context? = null
private var mObuStatusInfo = ObuStatusInfo()
private var mObuStatusInfo = CallerObuListenerManager.getObuStatusInfo()
fun init(context: Context, ipAddress: String) {
Logger.d(MogoObuConst.TAG_MOGO_OBU, "obuManager初始化--")
@@ -447,7 +446,10 @@ class MogoPrivateObuManager private constructor() {
-> {
if (info.ext_info != null) {
// 计算为千米每小时 TODO 这里需要做一下向上取整数406080120等
Logger.d(MogoObuConst.TAG_MOGO_OBU, "info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}")
Logger.d(
MogoObuConst.TAG_MOGO_OBU,
"info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}"
)
CallerHmiManager.showLimitingVelocity((Math.ceil(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
}
}