rebase
This commit is contained in:
@@ -20,7 +20,6 @@ import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
@@ -35,7 +34,6 @@ import com.zhidao.support.adas.high.bean.IPCUpgradeInfo
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils
|
||||
import io.netty.channel.Channel
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
@@ -59,17 +57,16 @@ class MoGoAutopilotProvider :
|
||||
mContext = context
|
||||
// 初始化ADAS 域控制器
|
||||
CupidLogUtils.setEnableLog(false)
|
||||
CupidLogUtils.setIsWriteLog(false)
|
||||
// TODO 临时方案,根据不同的身份标识,连接不同的工控机IP
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {// 司机
|
||||
// 注册地图采集功能
|
||||
CallerMapDataCollectorManager.registerOnMapCollectTaskListener(this)
|
||||
// "192.168.1.102"
|
||||
val options = AdasOptions.Builder()
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.build()
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.build()
|
||||
|
||||
AdasManager.getInstance().create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
NSDNettyManager.getInstance().startNSDNettyServerWithSN(context, object :
|
||||
@@ -103,9 +100,9 @@ class MoGoAutopilotProvider :
|
||||
//FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true
|
||||
// "192.168.1.103"
|
||||
val options = AdasOptions
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.build()
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.build()
|
||||
AdasManager.getInstance().create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
NSDNettyManager.getInstance()
|
||||
.searchAndConnectServer(context, MoGoAiCloudClientConfig.getInstance().sn, object :
|
||||
@@ -175,8 +172,9 @@ class MoGoAutopilotProvider :
|
||||
SharedPrefsMgr.getInstance(it).putString(MoGoConfig.AUTOPILOT_IP, autoPilotIp)
|
||||
}
|
||||
// 设置IP地址
|
||||
AdasManager.getInstance().adasOptions.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.ASSIGN)
|
||||
AdasManager.getInstance().adasOptions.setIpcAssignIP(autoPilotIp)
|
||||
AdasManager.getInstance().adasOptions.ipcConnectionMode =
|
||||
AdasOptions.IPC_CONNECTION_MODE.ASSIGN
|
||||
AdasManager.getInstance().adasOptions.ipcAssignIP = autoPilotIp
|
||||
// 打开通讯连接
|
||||
AdasManager.getInstance().connect()
|
||||
return ""
|
||||
@@ -201,7 +199,7 @@ class MoGoAutopilotProvider :
|
||||
override fun startAutoPilot(result: AutopilotControlParameters) {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
val parameter = AutopilotControlCmdParameter("aiCloudToStartAutopilot", result)
|
||||
AdasManager.getInstance().aiCloudToAdasData(GsonUtils.toJson(parameter))
|
||||
// AdasManager.getInstance().aiCloudToAdasData(GsonUtils.toJson(parameter)) //todo pb : 需要指定来源
|
||||
} else {
|
||||
Logger.e(TAG, "车机与工控机链接失败,无法开启自动驾驶")
|
||||
}
|
||||
@@ -213,7 +211,7 @@ class MoGoAutopilotProvider :
|
||||
|
||||
override fun cancelAutoPilot() {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
AdasManager.getInstance().controlAutopilotCarHead()
|
||||
// AdasManager.getInstance().controlAutopilotCarHead() //todo pb : 需要指定来源
|
||||
} else {
|
||||
Logger.e(TAG, "车机与工控机链接失败,无法断开自动驾驶")
|
||||
}
|
||||
@@ -221,35 +219,31 @@ class MoGoAutopilotProvider :
|
||||
|
||||
override fun recordPackage(): Boolean {
|
||||
return AdasManager.getInstance()
|
||||
.recordPackage(1, (System.currentTimeMillis() / 1000).toInt())
|
||||
.startRecordPackage((System.currentTimeMillis() / 1000).toInt(), 1)
|
||||
}
|
||||
|
||||
override fun recordPackage(type: Int, id: Int): Boolean {
|
||||
return AdasManager.getInstance().recordPackage(type, id)
|
||||
return AdasManager.getInstance().startRecordPackage(id, type)
|
||||
}
|
||||
|
||||
override fun recordPackage(type: Int, id: Int, duration: Int): Boolean {
|
||||
return AdasManager.getInstance().recordPackage(type, id, duration)
|
||||
return AdasManager.getInstance().startRecordPackage(id, duration, type)
|
||||
}
|
||||
|
||||
override fun stopRecord(type: Int, id: Int): Boolean {
|
||||
return AdasManager.getInstance().stopRecord(type, id)
|
||||
return AdasManager.getInstance().stopRecordPackage(id, type)
|
||||
}
|
||||
|
||||
override fun setEnableLog(isEnableLog: Boolean) {
|
||||
CupidLogUtils.setEnableLog(isEnableLog)
|
||||
}
|
||||
|
||||
override fun setIsWriteLog(isWriteLog: Boolean) {
|
||||
CupidLogUtils.setIsWriteLog(isWriteLog)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerMapDataCollectorManager.unRegisterOnMapCollectTaskListener(this)
|
||||
}
|
||||
|
||||
override fun setAutoPilotSpeed(speed: Int): Boolean {
|
||||
return AdasManager.getInstance().setSpeed(speed)
|
||||
return AdasManager.getInstance().sendAutopilotSpeedReq(speed.toDouble())
|
||||
}
|
||||
|
||||
override fun setIPCShutDown() {
|
||||
@@ -261,21 +255,24 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
|
||||
override fun recordCause(key: String?, name: String?, id: String?, reason: String?) {
|
||||
AdasManager.getInstance().recordCause(key, name, id, reason)
|
||||
key?.let {
|
||||
AdasManager.getInstance()
|
||||
.sendRecordCause(it.toLong(), name ?: "", id ?: "", reason ?: "")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机升级确认
|
||||
*/
|
||||
override fun setIPCUpgradeAffirm() {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm());
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm())
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机升级取消
|
||||
*/
|
||||
override fun setIPCUpgradeCancel() {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel());
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel())
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,22 +282,22 @@ class MoGoAutopilotProvider :
|
||||
*/
|
||||
override fun setDemoMode(isEnable: Boolean) {
|
||||
if (isEnable) {
|
||||
AdasManager.getInstance().enableDemoMode()
|
||||
AdasManager.getInstance().sendDemoModeReq(1)
|
||||
} else {
|
||||
AdasManager.getInstance().disableDemoMode()
|
||||
AdasManager.getInstance().sendDemoModeReq(0)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 办公室调试使用,强制开启自动驾驶,将 status,pilotmode,control_pilotmode,强追设置为 1
|
||||
* 办公室调试使用,强制开启自动驾驶,将 status,pilotMode,control_pilotMode,强追设置为 1
|
||||
* isEnable = true 开启
|
||||
* isEnable = false 关闭
|
||||
*/
|
||||
override fun setControlAutopilotCarAuto(isEnable: Boolean) {
|
||||
if (isEnable) {
|
||||
AdasManager.getInstance().controlAutopilotCarAuto()
|
||||
// AdasManager.getInstance().sendAutoPilotModeReq() //todo pb : 需要指定来源
|
||||
} else {
|
||||
AdasManager.getInstance().controlAutopilotCarHead()
|
||||
// AdasManager.getInstance().sendAutoPilotModeReq() //todo pb : 需要指定来源
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_DATA
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotSNRequest
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager.invokeAutopilotCarConfigData
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager.invokeAutopilotCarStateData
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showAdUpgradeStatus
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showDockerRebootResult
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter
|
||||
import com.mogo.module.service.MarkerServiceHandler
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo
|
||||
import com.zhidao.support.adas.high.bean.SSHResult
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo_msg.MogoReportMsg
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* @author emarrow
|
||||
* @since 2022/3/11
|
||||
*
|
||||
*
|
||||
* 适配ADAS 回调监听分发,这里不做业务,只做数据包装及分发处理
|
||||
*/
|
||||
class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "OnAdasListenerAdapter"
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onTrajectory(header: MessagePad.Header, trajectory: MessagePad.Trajectory?) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
val trajectoryInfoArrayList = ArrayList<ADASTrajectoryInfo>()
|
||||
if (trajectory != null && trajectory.pointsList.size > 0) {
|
||||
for (trajectory in trajectory.pointsList) {
|
||||
val adasTrajectoryInfo = ADASTrajectoryInfo()
|
||||
adasTrajectoryInfo.lat = trajectory.latitude
|
||||
adasTrajectoryInfo.lon = trajectory.longitude
|
||||
adasTrajectoryInfo.acceleration = trajectory.acceleration
|
||||
adasTrajectoryInfo.accumulatedDis = trajectory.accumulatedDis
|
||||
adasTrajectoryInfo.time = trajectory.time
|
||||
adasTrajectoryInfo.velocity = trajectory.velocity
|
||||
adasTrajectoryInfo.alt = trajectory.altitude
|
||||
adasTrajectoryInfo.kappa = trajectory.kappa
|
||||
adasTrajectoryInfo.theta = trajectory.theta
|
||||
trajectoryInfoArrayList.add(adasTrajectoryInfo)
|
||||
}
|
||||
}
|
||||
invokeAutopilotTrajectory(trajectoryInfoArrayList)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onTrackedObjects(
|
||||
header: MessagePad.Header,
|
||||
trackedObjects: MessagePad.TrackedObjects
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotIdentifyDataUpdate(trackedObjects.objsList as ArrayList<TrackedObject>?)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo?) {
|
||||
invokeAutopilotCarStateData(gnssInfo)
|
||||
// 同步给MAP地图
|
||||
if (gnssInfo != null) {
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLat = gnssInfo.latitude
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon = gnssInfo.longitude
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.satelliteTime =
|
||||
java.lang.Double.valueOf(gnssInfo.satelliteTime).toLong()
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
MarkerServiceHandler.getApis().mapServiceApi.mapUIController.syncLocation2Map(
|
||||
gnssInfo
|
||||
)
|
||||
SnapshotLocationDataCenter.getInstance().syncAdasLocationInfo(gnssInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVehicleState(
|
||||
header: MessagePad.Header,
|
||||
vehicleState: VehicleStateOuterClass.VehicleState?
|
||||
) {
|
||||
if (vehicleState != null) {
|
||||
//转向灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotLightSwitchData(vehicleState.light)
|
||||
//刹车灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onAutopilotState(
|
||||
header: MessagePad.Header,
|
||||
autopilotState: MessagePad.AutopilotState?
|
||||
) {
|
||||
if (autopilotState != null) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
// 初始化自动驾驶状态信息
|
||||
val autopilotStatusInfo = getAutoPilotStatusInfo()
|
||||
autopilotStatusInfo.state = autopilotState.state
|
||||
autopilotStatusInfo.pilotmode = autopilotState.autopilotMode
|
||||
autopilotStatusInfo.reason = autopilotState.reason
|
||||
autopilotStatusInfo.camera = autopilotState.camera
|
||||
autopilotStatusInfo.rtk = autopilotState.rtk
|
||||
autopilotStatusInfo.radar = autopilotState.radar
|
||||
autopilotStatusInfo.speed = autopilotState.speed.toFloat()
|
||||
autopilotStatusInfo.version = AdasManager.getInstance().apVersion
|
||||
if (autopilotStatusInfo.connectIP == null) {
|
||||
autopilotStatusInfo.connectIP = AdasManager.getInstance().ipcConnectedIp
|
||||
}
|
||||
if (autopilotStatusInfo.dockVersion == null) {
|
||||
// autopilotStatusInfo.dockVersion =
|
||||
// AdasManager.getInstance() //todo pb : get docker
|
||||
}
|
||||
invokeAutoPilotStatus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onReportMessage(
|
||||
header: MessagePad.Header,
|
||||
mogoReportMessage: MogoReportMsg.MogoReportMessage?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotGuardian(mogoReportMessage)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBasicInfoReq(
|
||||
header: MessagePad.Header,
|
||||
basicInfoReq: MessagePad.BasicInfoReq?
|
||||
) {
|
||||
invokeAutopilotSNRequest()
|
||||
}
|
||||
|
||||
override fun onCarConfigResp(
|
||||
header: MessagePad.Header,
|
||||
carConfigResp: MessagePad.CarConfigResp?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded && carConfigResp != null) {
|
||||
invokeAutopilotCarConfigData(carConfigResp)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onRecordResult(
|
||||
header: MessagePad.Header,
|
||||
recordPanel: RecordPanelOuterClass.RecordPanel?
|
||||
) {
|
||||
if (recordPanel != null) {
|
||||
invokeAutopilotRecordResult(recordPanel)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onGlobalPathResp(
|
||||
header: MessagePad.Header,
|
||||
globalPathResp: MessagePad.GlobalPathResp?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotRotting(globalPathResp)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onWarn(header: MessagePad.Header, warn: MessagePad.Warn?) {
|
||||
invokeAutopilotWarnMessage(warn)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onArrivalNotification(
|
||||
header: MessagePad.Header,
|
||||
arrivalNotification: MessagePad.ArrivalNotification?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeArriveAtStation(arrivalNotification)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onUpgradeStateInfo(info: IPCUpgradeStateInfo) {
|
||||
if (info != null) {
|
||||
Logger.d(
|
||||
TAG, "onUpgradeStateInfo " +
|
||||
" upgrade mode=" + info.upgradeMode +
|
||||
" download status=" + info.downloadStatus +
|
||||
" download progress current=" + info.progress.current +
|
||||
" download progress total=" + info.progress.total +
|
||||
" download version=" + info.images +
|
||||
" upgrade status=" + info.upgradeStatus
|
||||
)
|
||||
showAdUpgradeStatus(
|
||||
info.upgradeMode, info.downloadStatus, info.progress.current,
|
||||
info.progress.total, info.images, info.upgradeStatus
|
||||
)
|
||||
} else {
|
||||
Logger.d(TAG, "onUpgradeStateInfo : upgrade state info is null")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSSHResult(info: SSHResult?) {
|
||||
if (info != null && "docker restart autocar_default_1" == info.cmd) {
|
||||
showDockerRebootResult(info.code, info.msg)
|
||||
} else {
|
||||
Logger.d(TAG, "onSSHResult : result info is null")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(status: ProtocolStatus, bytes: ByteArray) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.autopilot.network.AdasServiceModel
|
||||
@@ -10,11 +9,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
|
||||
import com.zhidao.support.adas.high.bean.BasicInfo
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
@@ -38,7 +37,7 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
Logger.d(TAG, "webSocket 连接成功")
|
||||
// 初始化自动驾驶状态信息
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectIP =
|
||||
AdasManager.getInstance().adasConfig.address
|
||||
AdasManager.getInstance().ipcConnectedIp
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatus = true
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
|
||||
@@ -50,7 +49,7 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.DISCONNECTED) {
|
||||
Logger.d(TAG, "webSocket 连接失败 reason:$reason")
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectIP =
|
||||
AdasManager.getInstance().adasConfig.address
|
||||
AdasManager.getInstance().ipcConnectedIp
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatus = false
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTING) {
|
||||
@@ -70,10 +69,10 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
syncBasicInfoToAutopilot()
|
||||
}
|
||||
|
||||
override fun onAutopilotArriveAtStation(autopilotWayArrive: AutopilotStationInfo?) {
|
||||
if (autopilotWayArrive != null) {
|
||||
val lon = autopilotWayArrive.lon
|
||||
val lat = autopilotWayArrive.lat
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
if (arrivalNotification != null && arrivalNotification.endLocation != null) {
|
||||
val lon = arrivalNotification.endLocation.longitude
|
||||
val lat = arrivalNotification.endLocation.latitude
|
||||
AdasServiceModel.getInstance().reportSite(lon, lat)
|
||||
}
|
||||
}
|
||||
@@ -90,12 +89,9 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
*/
|
||||
private fun syncBasicInfoToAutopilot() {
|
||||
Logger.d(TAG, "同步PAD的SN给工控机……")
|
||||
val info = BasicInfo()
|
||||
// 设置PAD-SN给工控
|
||||
info.setSn(MoGoAiCloudClientConfig.getInstance().sn)
|
||||
// 设置网络环境
|
||||
info.setNetEnvironment(DebugConfig.getNetMode())
|
||||
AdasManager.getInstance().setBasicInfo(info)
|
||||
// 设置PAD-SN给工控,网络环境
|
||||
AdasManager.getInstance()
|
||||
.sendBasicInfoResp(MoGoAiCloudClientConfig.getInstance().sn, DebugConfig.getNetMode())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,27 +2,25 @@ package com.mogo.eagle.core.function.autopilot.adapter;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.common.drawer.IdentifyDataDrawer;
|
||||
import com.zhidao.support.adas.high.bean.CarStateInfo;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
public class MoGoHandAdasMsgManager implements
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotCarStateListener {
|
||||
IMoGoAutopilotVehicleStateListener {
|
||||
|
||||
private final String TAG = "AdasEventManager";
|
||||
|
||||
@@ -30,7 +28,7 @@ public class MoGoHandAdasMsgManager implements
|
||||
|
||||
private MoGoHandAdasMsgManager() {
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
public static MoGoHandAdasMsgManager getInstance() {
|
||||
@@ -44,34 +42,25 @@ public class MoGoHandAdasMsgManager implements
|
||||
return moGoHandAdasMsgManager;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAutopilotCarStateData(@Nullable AutopilotCarStateInfo autoPilotCarStateInfo) {
|
||||
// 获取的自动驾驶车辆信息不是空的时候
|
||||
if (autoPilotCarStateInfo != null) {
|
||||
//can数据转发
|
||||
AutopilotCarStateInfo.ValuesBean bean = autoPilotCarStateInfo.getValues();
|
||||
|
||||
if (bean != null) {
|
||||
//转向灯状态 0是正常 1是左转 2是右转
|
||||
//turnLightOften 是sdk适配的字段,后期建议CarStateInfo和AutopilotCarStateInfo统一成一个
|
||||
int turnLight = bean.getTurnLightOften();
|
||||
AmiClientManager.getInstance().setTurnLightState(turnLight);
|
||||
int brakeLight = bean.getBrake_light();
|
||||
// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);
|
||||
//设置转向灯
|
||||
CallerHmiManager.INSTANCE.showTurnLight(turnLight);
|
||||
//设置刹车信息
|
||||
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
|
||||
} else {
|
||||
Logger.e(TAG, "bean == null ");
|
||||
}
|
||||
public void onAutopilotLightSwitchData(Chassis.LightSwitch lightSwitch) {
|
||||
//can数据转发 转向灯状态 0是正常 1是左转 2是右转
|
||||
if (lightSwitch != null) {
|
||||
int turnLightNum = lightSwitch.getNumber();
|
||||
AmiClientManager.getInstance().setTurnLightState(turnLightNum);
|
||||
//设置转向灯
|
||||
CallerHmiManager.INSTANCE.showTurnLight(turnLightNum);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrakeLightData(boolean brakeLight) {
|
||||
//设置刹车信息
|
||||
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight ? 1 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIdentifyDataUpdate(@Nullable ArrayList<TrafficData> trafficData) {
|
||||
public void onAutopilotIdentifyDataUpdate(@Nullable ArrayList<MessagePad.TrackedObject> trafficData) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawIdentifyData) {
|
||||
ThreadUtils.getSinglePool().execute(() ->
|
||||
@@ -86,13 +75,13 @@ public class MoGoHandAdasMsgManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotWarnMessage(@Nullable AutopilotWarnMessage autopilotWarnMessage) {
|
||||
public void onAutopilotWarnMessage(MessagePad.Warn warn) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAutopilotRecordResult(AutoPilotRecordResult result) {
|
||||
public void onAutopilotRecordResult(RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,12 +5,12 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_DEVA_TOOLS)
|
||||
class DevaToolsProvider : IDevaToolsProvider {
|
||||
@@ -52,7 +52,7 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
BadCaseManager.init(view, onShow, onHide)
|
||||
}
|
||||
|
||||
override fun onReceiveBadCaseRecord(record: AutoPilotRecordResult) {
|
||||
override fun onReceiveBadCaseRecord(record: RecordPanelOuterClass.RecordPanel) {
|
||||
BadCaseManager.onReceiveBadCaseRecord(record)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
@@ -24,6 +23,7 @@ import com.zhjt.mogo_core_function_devatools.badcase.mvp.BadCaseView
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.repository.db.entity.AutoPilotRecord
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@@ -164,7 +164,7 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
return oldT == 0L || newT == 0L || (newT - oldT >= 0 && (newT - oldT) < CASE_EXPIRE_DURATION)
|
||||
}
|
||||
|
||||
fun onReceiveBadCaseRecord(record: AutoPilotRecordResult) {
|
||||
fun onReceiveBadCaseRecord(record: RecordPanelOuterClass.RecordPanel) {
|
||||
scope?.launch {
|
||||
val newRecord = record.toRecord()
|
||||
withContext(Dispatchers.IO) {
|
||||
@@ -267,15 +267,15 @@ fun <T: View> T.toggle(show: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun AutoPilotRecordResult.toRecord(): AutoPilotRecord = AutoPilotRecord().also {
|
||||
internal fun RecordPanelOuterClass.RecordPanel.toRecord(): AutoPilotRecord = AutoPilotRecord().also {
|
||||
it.id = this.id
|
||||
it.stat = this.stat
|
||||
it.key = this.key
|
||||
it.key = this.key.toString()
|
||||
it.note = this.note
|
||||
it.type = this.type
|
||||
it.total = this.total
|
||||
it.fileName = this.fileName
|
||||
it.duration = this.duration
|
||||
it.total = this.totalSize
|
||||
it.fileName = this.filename
|
||||
it.duration = this.duration.toDouble()
|
||||
it.diskFree = this.diskFree
|
||||
it.consumed = false
|
||||
}
|
||||
@@ -170,7 +170,6 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(LogLevel.DEBUG)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true
|
||||
CallerAutoPilotManager.setEnableLog(true)
|
||||
CallerAutoPilotManager.setIsWriteLog(true)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,7 +180,6 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotManager.setIsWriteLog(false)
|
||||
}
|
||||
|
||||
override fun onError(errorCount: Int) {
|
||||
|
||||
@@ -40,6 +40,9 @@ import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIR
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_TIMER_CANCEL;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
//负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗
|
||||
public class DispatchAutoPilotManager implements IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>
|
||||
, IDispatchRemindClickListener, IMogoCarLocationChangedListener2,
|
||||
@@ -282,11 +285,18 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(AutopilotRouteInfo autopilotRoute) {
|
||||
if (autopilotRoute == null || autopilotRoute.getModels() == null || autopilotRoute.getModels().size() == 0) {
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {
|
||||
if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) {
|
||||
return;
|
||||
}
|
||||
DispatchServiceModel.getInstance().uploadAutopilotRoute(autopilotRoute.getModels());
|
||||
List<AutopilotRouteInfo.RouteModels> list = new ArrayList<>();
|
||||
for (MessagePad.Location location : globalPathResp.getWayPointsList()) {
|
||||
AutopilotRouteInfo.RouteModels routeModels = new AutopilotRouteInfo.RouteModels();
|
||||
routeModels.setLat(location.getLatitude());
|
||||
routeModels.setLon(location.getLongitude());
|
||||
list.add(routeModels);
|
||||
}
|
||||
DispatchServiceModel.getInstance().uploadAutopilotRoute(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -296,7 +306,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification autopilotWayArrive) {
|
||||
if (!isDispatch) {
|
||||
return;
|
||||
}
|
||||
@@ -304,8 +314,11 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
double endLat = autopilotWayArrive.getLat();
|
||||
double endLon = autopilotWayArrive.getLon();
|
||||
if (autopilotWayArrive.getEndLocation() == null) {
|
||||
return;
|
||||
}
|
||||
double endLat = autopilotWayArrive.getEndLocation().getLatitude();
|
||||
double endLon = autopilotWayArrive.getEndLocation().getLongitude();
|
||||
// 计算是不是到了终点
|
||||
float distanceFromSelf = CoordinateUtils.calculateLineDistance(receiverBean.getEndLon(), receiverBean.getEndLat()
|
||||
, endLon, endLat);
|
||||
@@ -323,7 +336,8 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(@Nullable AutopilotGuardianStatusInfo guardianInfo) {
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.autopilot.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
@@ -46,6 +45,7 @@ import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.coroutines.*
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@@ -129,13 +129,13 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
override fun onAutopilotRecordResult(record: AutoPilotRecordResult?) {
|
||||
override fun onAutopilotRecordResult(record: RecordPanelOuterClass.RecordPanel) {
|
||||
record ?: return
|
||||
if (HmiBuildConfig.isShowBadCaseView && record.type == 1 && record.stat == 100) {
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(record)
|
||||
}
|
||||
if (record.type == 2 && (record.stat == 101 || record.stat == 100)) {
|
||||
CallerMapDataCollectorManager.finish(record.id, record.stat, "", record.fileName ?: "", record.note ?: "")
|
||||
CallerMapDataCollectorManager.finish(record.id, record.stat, "", record.filename ?: "", record.note ?: "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,7 @@ import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
@@ -53,6 +50,7 @@ import com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@@ -62,13 +60,13 @@ import java.util.*
|
||||
* 展示 本机、网络、工控机、OBU等状态信息,支持设置IP,等参数进行调试
|
||||
*/
|
||||
class DebugSettingView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener,
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotPlanningListener {
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener,
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotPlanningListener, IMoGoAutopilotCarConfigListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -76,7 +74,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
private var logViewAttach = false
|
||||
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
private var mAutoPilotCarStateInfo: AutopilotCarStateInfo? = null
|
||||
private var mGnssInfo: MessagePad.GnssInfo? = null
|
||||
|
||||
// 感知识别「已知类型」数据个数
|
||||
private var mIdentifyDataSize = 0
|
||||
@@ -127,6 +125,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
// 添加 规划路径相关回调 监听
|
||||
CallerAutopilotPlanningListenerManager.addListener(TAG, this)
|
||||
// 添加 工控机基础信息回调 监听
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
@@ -251,14 +251,14 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
tvAutopilotInfo.text =
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
|
||||
// 绘制应用基本信息
|
||||
drawAppInfo()
|
||||
|
||||
// 初始化OBU IP信息
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
|
||||
|
||||
etObuIP.setText(ipAddress)
|
||||
etObuIP.text?.let { etObuIP.setSelection(it.length) }
|
||||
@@ -274,8 +274,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
// 初始化工控机 IP信息
|
||||
val autoPilotIpAddress =
|
||||
SharedPrefsMgr.getInstance(context)
|
||||
.getString(MoGoConfig.AUTOPILOT_IP, FunctionBuildConfig.adasConnectIP)
|
||||
SharedPrefsMgr.getInstance(context)
|
||||
.getString(MoGoConfig.AUTOPILOT_IP, FunctionBuildConfig.adasConnectIP)
|
||||
|
||||
etAutopilotIP.setText(autoPilotIpAddress)
|
||||
etAutopilotIP.text?.let { etAutopilotIP.setSelection(it.length) }
|
||||
@@ -296,18 +296,18 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
// 初始化 GSP数据源 数据
|
||||
rgGpsProvider.check(
|
||||
when (FunctionBuildConfig.gpsProvider) {
|
||||
0 -> {
|
||||
R.id.rbGpsProviderAndroid
|
||||
}
|
||||
1 -> {
|
||||
R.id.rbGpsProviderRTK
|
||||
}
|
||||
2 -> {
|
||||
R.id.rbGpsProviderOBU
|
||||
}
|
||||
else -> R.id.rbGpsProviderAndroid
|
||||
when (FunctionBuildConfig.gpsProvider) {
|
||||
0 -> {
|
||||
R.id.rbGpsProviderAndroid
|
||||
}
|
||||
1 -> {
|
||||
R.id.rbGpsProviderRTK
|
||||
}
|
||||
2 -> {
|
||||
R.id.rbGpsProviderOBU
|
||||
}
|
||||
else -> R.id.rbGpsProviderAndroid
|
||||
}
|
||||
)
|
||||
rgGpsProvider.setOnCheckedChangeListener { group, checkedId ->
|
||||
when (checkedId) {
|
||||
@@ -380,10 +380,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbADASLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
CallerAutoPilotManager.setEnableLog(true)
|
||||
CallerAutoPilotManager.setIsWriteLog(true)
|
||||
} else {
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotManager.setIsWriteLog(false)
|
||||
}
|
||||
}
|
||||
tbControlView.setOnCheckedChangeListener { _, isChecked ->
|
||||
@@ -395,11 +393,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
tbLogCatch.isChecked =
|
||||
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CATCH_LOG, false)
|
||||
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CATCH_LOG, false)
|
||||
tbLogCatch.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
var logTimeStr = etLogCatch.text?.toString()
|
||||
if(logTimeStr.isNullOrEmpty()){
|
||||
if (logTimeStr.isNullOrEmpty()) {
|
||||
logTimeStr = "10"
|
||||
}
|
||||
val logCatchTime = logTimeStr.toInt()
|
||||
@@ -414,20 +412,20 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
CallerDevaToolsListenerManager.registerDevaToolsLogCatchListener(TAG,
|
||||
object : IMoGoDevaToolsListener {
|
||||
override fun onLogCatchClose() {
|
||||
super.onLogCatchClose()
|
||||
tbLogCatch.isChecked = false
|
||||
}
|
||||
object : IMoGoDevaToolsListener {
|
||||
override fun onLogCatchClose() {
|
||||
super.onLogCatchClose()
|
||||
tbLogCatch.isChecked = false
|
||||
}
|
||||
|
||||
override fun onLogCatch(lineLog: String) {
|
||||
logInfoView?.let {
|
||||
if (logViewAttach) {
|
||||
it.onLogCatch(lineLog)
|
||||
}
|
||||
override fun onLogCatch(lineLog: String) {
|
||||
logInfoView?.let {
|
||||
if (logViewAttach) {
|
||||
it.onLogCatch(lineLog)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
tbLogDebugView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
logInfoView = LogInfoView()
|
||||
@@ -486,7 +484,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
AppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
}
|
||||
if (AppConfigInfo.widevineIDMd5.isNullOrEmpty()) {
|
||||
AppConfigInfo.widevineIDMd5 = DeviceIdUtils.getWidevineIDWithMd5(AbsMogoApplication.getApp())
|
||||
AppConfigInfo.widevineIDMd5 =
|
||||
DeviceIdUtils.getWidevineIDWithMd5(AbsMogoApplication.getApp())
|
||||
}
|
||||
AppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
@@ -495,7 +494,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
|
||||
when (FunctionBuildConfig.appIdentityMode) {
|
||||
when (FunctionBuildConfig.appIdentityMode) {
|
||||
0x00 -> {// 司机端
|
||||
AppConfigInfo.isDriver = true
|
||||
AppConfigInfo.isConnectedNetty = CallerTelematicManager.getServerStarted()
|
||||
@@ -513,16 +512,16 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${mAutoPilotCarStateInfo?.values?.satelliteTime}\n" +
|
||||
"自车经纬度:\n${mAutoPilotCarStateInfo?.values?.lon}\n${mAutoPilotCarStateInfo?.values?.lat}\n"
|
||||
"GPS时间:${mGnssInfo?.satelliteTime}\n" +
|
||||
"自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n"
|
||||
|
||||
tvIdentifyInfo.text =
|
||||
"「有效类型」感知数据个数:${mIdentifyDataSize}\n" +
|
||||
"「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n"
|
||||
"「有效类型」感知数据个数:${mIdentifyDataSize}\n" +
|
||||
"「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n"
|
||||
tvTrajectoryInfoSize.text =
|
||||
"引导线点个数:${mTrajectoryInfoSize}"
|
||||
"引导线点个数:${mTrajectoryInfoSize}"
|
||||
tvRouteInfoSize.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
|
||||
// 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况
|
||||
mIdentifyDataSize = 0
|
||||
@@ -551,34 +550,17 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
}
|
||||
|
||||
override fun onAutopilotArriveAtStation(autopilotWayArrive: AutopilotStationInfo?) {
|
||||
|
||||
override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {
|
||||
mGnssInfo = gnssInfo
|
||||
}
|
||||
|
||||
override fun onAutopilotCarStateData(autoPilotCarStateInfo: AutopilotCarStateInfo?) {
|
||||
//Logger.d(TAG, "autoPilotCarStateInfo:$autoPilotCarStateInfo")
|
||||
mAutoPilotCarStateInfo = autoPilotCarStateInfo
|
||||
}
|
||||
|
||||
override fun onAutopilotSNRequest() {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: AutopilotGuardianStatusInfo?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?) {
|
||||
//Logger.d(TAG, "location:$location")
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList<TrafficData>?) {
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList<MessagePad.TrackedObject>?) {
|
||||
// 重制数据
|
||||
mIdentifyDataSize = 0
|
||||
mUnknownIdentifyDataSize = 0
|
||||
// 遍历计数
|
||||
trafficData?.forEach {
|
||||
if (it.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) {
|
||||
if (it.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type) {
|
||||
mUnknownIdentifyDataSize++
|
||||
} else {
|
||||
mIdentifyDataSize++
|
||||
@@ -586,19 +568,22 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotRecordResult(record: AutoPilotRecordResult?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotTrajectory(trajectoryInfos: ArrayList<ADASTrajectoryInfo>) {
|
||||
mTrajectoryInfoSize = trajectoryInfos.size
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(routeList: AutopilotRouteInfo?) {
|
||||
mRouteInfoSize = routeList?.models?.size ?: 0
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
mRouteInfoSize = globalPathResp?.wayPointsList?.size ?: 0
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
//todo pb : 工控机基础信息回调 详见 message CarConfigResp proto
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
@@ -140,9 +139,22 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
* @param downloadVersion 下载版本
|
||||
* @param upgradeStatus 升级状态
|
||||
*/
|
||||
fun showAdUpgradeStatus(upgradeMode: Int,downloadStatus : Int,currentProgress : Int,totalProgress : Int
|
||||
,downloadVersion : String,upgradeStatus : Int){
|
||||
systemVersionView?.showAdUpgradeStatus(upgradeMode,downloadStatus,currentProgress, totalProgress, downloadVersion, upgradeStatus)
|
||||
fun showAdUpgradeStatus(
|
||||
upgradeMode: Int,
|
||||
downloadStatus: Int,
|
||||
currentProgress: Int,
|
||||
totalProgress: Int,
|
||||
downloadVersion: String,
|
||||
upgradeStatus: Int
|
||||
) {
|
||||
systemVersionView?.showAdUpgradeStatus(
|
||||
upgradeMode,
|
||||
downloadStatus,
|
||||
currentProgress,
|
||||
totalProgress,
|
||||
downloadVersion,
|
||||
upgradeStatus
|
||||
)
|
||||
checkSystemView?.setAdUpgradeStatus(downloadStatus, upgradeStatus)
|
||||
}
|
||||
|
||||
@@ -160,10 +172,6 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
connectStatus = autoPilotStatusInfo.connectStatus
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: AutopilotGuardianStatusInfo?) {
|
||||
|
||||
}
|
||||
|
||||
interface ClickListener {
|
||||
fun go2CheckPage()
|
||||
fun onClose(v: View)
|
||||
|
||||
@@ -128,9 +128,4 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
setAutoPilotStatus(autoPilotStatusInfo.state)
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: AutopilotGuardianStatusInfo?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,9 +8,6 @@ import android.view.View;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
@@ -22,11 +19,13 @@ import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 2021/5/19 10:50 上午
|
||||
@@ -137,13 +136,35 @@ public class SmallMapFragment extends BaseFragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(AutopilotRouteInfo routeList) {
|
||||
if (routeList.getModels() == null || routeList.getModels().size() == 0) {
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
if (autoPilotStatusInfo.getPilotmode() != 1) {
|
||||
clearPolyline();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {
|
||||
if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) {
|
||||
return;
|
||||
}
|
||||
List<MogoLatLng> latLngList = new ArrayList<>();
|
||||
for (AutopilotRouteInfo.RouteModels routeModel : routeList.getModels()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude()));
|
||||
}
|
||||
Log.e(TAG, "routeResult:" + latLngList.size());
|
||||
if (latLngList.size() > 0) {
|
||||
@@ -152,27 +173,4 @@ public class SmallMapFragment extends BaseFragment
|
||||
clearPolyline();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
if (autoPilotStatusInfo.getControl_pilotmode() != 1){
|
||||
clearPolyline();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(@Nullable AutopilotGuardianStatusInfo guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,8 +155,6 @@ class MogoPrivateObuManager private constructor() {
|
||||
data.putOpt("acceleration", info.acceleration_set.lateral)
|
||||
data.putOpt("yawRate", info.acceleration_set.yaw_rate)
|
||||
}
|
||||
|
||||
data.putOpt("gpsProvider", 2)
|
||||
try {
|
||||
data.putOpt("systemTime", System.currentTimeMillis())
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user