Merge branch 'dev_arch_opt_3.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_arch_opt_3.0
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.och.common.module.manager
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
@@ -17,6 +16,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -26,26 +26,40 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
|
||||
const val TAG = "AbnormalFactorsLoopManager"
|
||||
|
||||
private const val LOOP_TIME = 10 *1000L
|
||||
private const val LOOP_TIME = 10 * 1000L
|
||||
private const val LOOP_DELAY = 5 * 1000L
|
||||
private var socketStatus: Boolean = false
|
||||
private var socketStatus by Delegates.observable(false) { _, _, newValue ->
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
return@observable
|
||||
}
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
return@observable
|
||||
}
|
||||
if (newValue) {
|
||||
ToastUtils.showLong("长链接状态恢复")
|
||||
} else {
|
||||
ToastUtils.showLong("长链接异常,请开启相应权限或者查看网络")
|
||||
}
|
||||
}
|
||||
|
||||
private var looperDisposable : Disposable? = null
|
||||
private var looperDisposable: Disposable? = null
|
||||
|
||||
fun startLoopAbnormalFactors(context: Context){
|
||||
if (looperDisposable != null && !looperDisposable!!.isDisposed){
|
||||
fun startLoopAbnormalFactors(context: Context) {
|
||||
if (looperDisposable != null && !looperDisposable!!.isDisposed) {
|
||||
return
|
||||
}
|
||||
i(TAG, "startLoopAbnormalFactors()")
|
||||
looperDisposable = Observable.interval(LOOP_DELAY, LOOP_TIME, TimeUnit.MILLISECONDS)
|
||||
.map { aLong -> aLong+1 }
|
||||
.map { aLong -> aLong + 1 }
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe{ aLong -> checkAbnormalFactors(context)}
|
||||
.subscribe { aLong -> checkAbnormalFactors(context) }
|
||||
|
||||
//长链接监听
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET,this)
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET, this
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkAbnormalFactors(context: Context) {
|
||||
@@ -54,14 +68,15 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
var networkStatus = false
|
||||
|
||||
//定位权限
|
||||
locationStatusPermsStatus = !(!PermissionUtil.isLocServiceEnable(context) || !PermissionUtil.checkPermission(
|
||||
context, *arrayOf(
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
)
|
||||
))
|
||||
locationStatusPermsStatus =
|
||||
!(!PermissionUtil.isLocServiceEnable(context) || !PermissionUtil.checkPermission(
|
||||
context, *arrayOf(
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
)
|
||||
))
|
||||
|
||||
//网络状态或者网络权限是否打开
|
||||
if (NetworkUtils.isConnected(context)){
|
||||
if (NetworkUtils.isConnected(context)) {
|
||||
networkStatus = true
|
||||
}
|
||||
//长链接状态 socketStatus
|
||||
@@ -70,28 +85,27 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!networkStatus) toastStr += " 网络异常 "
|
||||
|
||||
//乘客屏不显示长链接异常
|
||||
if (!socketStatus && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) toastStr += " 长链接异常 "
|
||||
|
||||
i(TAG, "abnormal_factors_Str = $toastStr")
|
||||
|
||||
if (!FunctionBuildConfig.isDemoMode && toastStr !== ""){
|
||||
if (!FunctionBuildConfig.isDemoMode && toastStr !== "") {
|
||||
ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun stopLoopAbnormalFactors(){
|
||||
fun stopLoopAbnormalFactors() {
|
||||
looperDisposable!!.dispose()
|
||||
looperDisposable == null
|
||||
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET,this)
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET, this
|
||||
)
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
|
||||
//长链接监听、
|
||||
if (StatusDescriptor.CLOUD_SOCKET == descriptor){
|
||||
if (StatusDescriptor.CLOUD_SOCKET == descriptor) {
|
||||
socketStatus = isTrue
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
private const val MSG_SOCKET_TYPE = 501000
|
||||
private const val MSG_TYPE_SHOW_DIALOG = 0
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_STATUS = 1
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING = 2
|
||||
|
||||
val dispatchAutoPilotManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
DispatchAutoPilotManager()
|
||||
@@ -68,6 +69,16 @@ class DispatchAutoPilotManager private constructor() :
|
||||
getAutoPilotStatusInfo().reason
|
||||
)
|
||||
sendEmptyMessageDelayed(MSG_TYPE_UPLOAD_AUTOPILOT_STATUS, 1000L)
|
||||
} else if(msg.what == MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING){
|
||||
val data = msg.obj as MessagePad.GlobalPathResp
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in data.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,14 +176,10 @@ class DispatchAutoPilotManager private constructor() :
|
||||
if (globalPathResp == null || globalPathResp.wayPointsList.isEmpty()) {
|
||||
return
|
||||
}
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in globalPathResp.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
val message = Message()
|
||||
message.what = MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING
|
||||
message.obj = globalPathResp
|
||||
handler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
|
||||
@@ -76,7 +76,7 @@ class DispatchServiceModel private constructor() {
|
||||
fun uploadAutopilotRoute(list: List<RouteModels?>?) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
val reportedRoute = ReportedRoute(sn, GsonUtil.jsonFromObject(list))
|
||||
val map: MutableMap<String, Any> = HashMap()
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
map["sn"] = sn
|
||||
map["data"] = GsonUtil.jsonFromObject(reportedRoute)
|
||||
mAdasApiService.uploadAutopilotRoute(map)
|
||||
|
||||
@@ -15,7 +15,7 @@ interface IDispatchAdasApiService {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("eagle-eye-dns/eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, Any>): Observable<BaseData>
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, String>): Observable<BaseData>
|
||||
|
||||
/**
|
||||
* 上报自动驾驶调度处理结果 服务于业务调度
|
||||
|
||||
@@ -13,10 +13,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuSaveMessageListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.*
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
|
||||
@@ -114,6 +111,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onCurrentVersion version = ${version.version}")
|
||||
if (!version.version.isNullOrEmpty()) {
|
||||
mVersionName = version.version
|
||||
CallerObuInfoListenerManager.invokeObuVersionName(version.version)
|
||||
CallerDevaToolsManager.queryObuUpgrade(version.version)
|
||||
}
|
||||
}
|
||||
@@ -684,12 +682,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
when (appId) {
|
||||
//前向碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.FCW.toString() -> {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion && level == 3) {
|
||||
alertContent = "前车距离过近"
|
||||
ttsContent = "前车距离过近"
|
||||
CallerObuWarningListenerManager.invokeTrackerFusionData(
|
||||
ObuManager.getInstance().obuRvToTrackedObject(info)
|
||||
)
|
||||
} else {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
@@ -54,6 +55,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -107,7 +109,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -139,6 +142,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//OBU连接状态
|
||||
private var obuConnectStatus: Boolean = false
|
||||
private var mObuVersionName: String = ""
|
||||
private var mObuDeviceId: String = ""
|
||||
|
||||
//渠道包标签
|
||||
private var onlineSelected: Boolean = true
|
||||
@@ -217,6 +222,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//查询工控机基础配置信息
|
||||
CallerAutoPilotControlManager.getCarConfig()
|
||||
}
|
||||
|
||||
CallerObuInfoListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -244,7 +251,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
// 移除 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 obu获取信息 监听
|
||||
CallerObuInfoListenerManager.removeListener(TAG)
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
@@ -400,13 +408,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//展示OBU控制中心
|
||||
obuControllerLayout.visibility = View.VISIBLE
|
||||
tbVehicleStateController.isChecked = true
|
||||
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏OBU控制中心
|
||||
obuControllerLayout.visibility = View.GONE
|
||||
tbVehicleStateController.isChecked = false
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1610,7 +1616,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tvRouteInfoSizeCopy.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
|
||||
|
||||
// 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况
|
||||
mIdentifyDataSize = 0
|
||||
mUnknownIdentifyDataSize = 0
|
||||
@@ -1625,13 +1630,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//obu TODO 后面会添加很多os那边需要显示的内容
|
||||
obuVersionNameTv.text = Html.fromHtml(
|
||||
"OBU版本号:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
"<font color='blue'> 1.0"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
}
|
||||
}"
|
||||
"OBU版本号:$mObuVersionName"
|
||||
)
|
||||
|
||||
obuConnectStatusTv.text = Html.fromHtml(
|
||||
@@ -1644,7 +1643,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2043,4 +2041,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
setLogCheckedChangeListener()
|
||||
}
|
||||
|
||||
override fun onGetObuVersionName(obuVersionName: String) {
|
||||
mObuVersionName = obuVersionName
|
||||
}
|
||||
|
||||
override fun onObuDeviceId(obuDeviceId: String) {
|
||||
mObuDeviceId = obuDeviceId
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,6 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
@SuppressLint("NewApi")
|
||||
private fun filterTrafficData(trafficData: List<TrackedObject>): HashMap<String, TrackedObject> {
|
||||
mFilterTrafficData.clear()
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
// 过滤掉未知感知数据
|
||||
if (TrackerSourceColorHelper.filterData(data)) {
|
||||
@@ -110,13 +109,12 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
}
|
||||
var temp: TrackedObject = data
|
||||
val uuid = "" + data.uuid
|
||||
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
|
||||
val cacheData = mMarkersCaches[uuid]
|
||||
if (cacheData != null) {
|
||||
val color = TrackerSourceColorHelper.getDefaultColor(data)
|
||||
temp = data.toBuilder().setColor(color).build()
|
||||
mFilterTrafficData[uuid] = temp
|
||||
}
|
||||
mFilterTrafficData[uuid] = temp
|
||||
mMarkersCaches[uuid] = temp
|
||||
trafficDataUuidList.add(uuid)
|
||||
}
|
||||
|
||||
@@ -94,21 +94,6 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerFusionData(trackObject: TrackedObject?) {
|
||||
super.updateTrackerFusionData(trackObject)
|
||||
try {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
//todo emArrow
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
|
||||
@@ -71,6 +71,10 @@ class OverMapView @JvmOverloads constructor(
|
||||
private var resetDrawableMarginRight: Int = -1
|
||||
private var resetDrawableMarginBottom: Int = -1
|
||||
private var isClearArrived: Boolean = false
|
||||
private var leftPadding: Int = 100
|
||||
private var topPadding: Int = 100
|
||||
private var rightPadding: Int = 100
|
||||
private var bottomPadding: Int = 100
|
||||
|
||||
private var mMapView: TextureMapView? = null
|
||||
private var mAMap: AMap? = null
|
||||
@@ -136,6 +140,10 @@ class OverMapView @JvmOverloads constructor(
|
||||
AutoSizeUtils.dp2px(context, 40f)
|
||||
)
|
||||
isClearArrived = typedArray.getBoolean(R.styleable.OverMapView_isClearArrived, false)
|
||||
leftPadding = typedArray.getInt(R.styleable.OverMapView_leftPadding, 100)
|
||||
topPadding = typedArray.getInt(R.styleable.OverMapView_topPadding, 100)
|
||||
rightPadding = typedArray.getInt(R.styleable.OverMapView_rightPadding, 100)
|
||||
bottomPadding = typedArray.getInt(R.styleable.OverMapView_bottomPadding, 100)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
@@ -559,10 +567,10 @@ class OverMapView @JvmOverloads constructor(
|
||||
mAMap!!.moveCamera(
|
||||
CameraUpdateFactory.newLatLngBoundsRect(
|
||||
boundsBuilder.build(),
|
||||
100,
|
||||
100,
|
||||
100,
|
||||
100
|
||||
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
|
||||
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
|
||||
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
|
||||
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
|
||||
)
|
||||
)
|
||||
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
|
||||
|
||||
@@ -24,5 +24,10 @@
|
||||
<attr name="resetDrawableMarginBottom" format="dimension" />
|
||||
<!-- 是否擦除已走过的路线 -->
|
||||
<attr name="isClearArrived" format="boolean" />
|
||||
<!-- 规定屏幕范围的padding -->
|
||||
<attr name="leftPadding" format="integer" />
|
||||
<attr name="topPadding" format="integer" />
|
||||
<attr name="rightPadding" format="integer" />
|
||||
<attr name="bottomPadding" format="integer" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -96,7 +96,7 @@ object FunctionBuildConfig {
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isObuWarningFusionUnion = false
|
||||
var isObuWarningFusionUnion = true
|
||||
|
||||
/**
|
||||
* 当前APP的身份模式
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.eagle.core.function.api.obu
|
||||
|
||||
|
||||
/**
|
||||
* OBU 显示信息
|
||||
* @author lixiaopeng
|
||||
* @date 2023/2/28
|
||||
*/
|
||||
interface IMoGoObuInfoListener {
|
||||
|
||||
/**
|
||||
* @param obuVersionName OBU硬件版本
|
||||
*/
|
||||
fun onGetObuVersionName(obuVersionName: String)
|
||||
|
||||
/**
|
||||
* obuDeviceId
|
||||
*/
|
||||
fun onObuDeviceId(obuDeviceId: String)
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.obu
|
||||
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -17,13 +16,6 @@ interface IMoGoObuStatusListener {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* obu Tracker data
|
||||
*/
|
||||
fun updateTrackerFusionData(trackObject: MessagePad.TrackedObject?){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新obu Tracker 预警信息
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 一些obu的信息,用于排查obu硬件问题
|
||||
*
|
||||
*/
|
||||
object CallerObuInfoListenerManager : CallerBase<IMoGoObuInfoListener>() {
|
||||
|
||||
fun invokeObuVersionName(obuVersionName: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onGetObuVersionName(obuVersionName)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeObuDeviceId(obuDeviceId: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onObuDeviceId(obuDeviceId)
|
||||
}
|
||||
}
|
||||
|
||||
// fun invokeQueryContainersResponse(dockerList: List<String>) {
|
||||
// M_LISTENERS.forEach {
|
||||
// val listener = it.value
|
||||
// //TODO
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -20,13 +20,6 @@ object CallerObuWarningListenerManager : CallerBase<IMoGoObuStatusListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeTrackerFusionData(trackObject: MessagePad.TrackedObject?){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.updateTrackerFusionData(trackObject)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeTrackerWarningInfo(trafficData: TrafficData) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.map;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Point;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -126,9 +125,6 @@ public class AMapWrapper implements IMogoMap {
|
||||
MarkerSimpleData markerOptions = ObjectUtils.fromTrafficData(trackedObject);
|
||||
if (markerOptions != null) {
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
if(markerOptions.id == 65061){
|
||||
Log.i("emArrow","time :" + markerOptions.time + " , lat : " + markerOptions.lat + " , lon : " + markerOptions.lon);
|
||||
}
|
||||
}
|
||||
});
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
|
||||
Reference in New Issue
Block a user