add chain log of startAutopilot(bus and taxi), add new func of upload map log:

This commit is contained in:
zhongchao
2022-05-12 19:21:50 +08:00
parent 629cefa455
commit 26b6066393
18 changed files with 244 additions and 62 deletions

View File

@@ -11,6 +11,9 @@ import com.mogo.eagle.core.data.autopilot.toRouteInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.deva.chain.ChainConstant
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_AUTOPILOT
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.trafficlight.toTrafficLightDetail
@@ -43,6 +46,8 @@ import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
import com.zhidao.support.adas.high.common.CupidLogUtils
import com.zhidao.support.adas.high.common.MogoReport
import com.zhjt.service.chain.ChainLog
import com.zhjt.service.chain.TracingConstants
import io.netty.channel.Channel
import mogo.telematics.pad.MessagePad
import java.util.concurrent.TimeUnit
@@ -95,13 +100,17 @@ class MoGoAutopilotProvider :
platNumberArray.size, platNumberArray
), channel
) {
CallerLogger.d("$M_ADAS_IMPL$TAG", "司机端发送车牌号到乘客端是否成功:${it.isSuccess}")
CallerLogger.d(
"$M_ADAS_IMPL$TAG",
"司机端发送车牌号到乘客端是否成功:${it.isSuccess}"
)
}
} else {
CallerAutoPilotManager.getCarConfig()
}
}
else -> {}
else -> {
}
}
}
}
@@ -241,12 +250,26 @@ class MoGoAutopilotProvider :
override fun startAutoPilot(controlParameters: AutopilotControlParameters) {
if (AdasManager.getInstance().ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
AdasManager.getInstance().sendAutoPilotModeReq(1, 1, controlParameters.toRouteInfo())
val invokeResult = AdasManager.getInstance().sendAutoPilotModeReq(1, 1, controlParameters.toRouteInfo())
invokeAutoPilotResult(if (invokeResult) "自动驾驶调用成功" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
} else {
invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶")
CallerLogger.e("$M_ADAS_IMPL$TAG", "车机与工控机链接失败,无法开启自动驾驶")
}
}
@ChainLog(
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
linkCode = CHAIN_LINK_ADAS,
endpoint = TracingConstants.Endpoint.PAD,
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_EAGLE_START_AUTOPILOT_RESULT,
paramIndexes = [0],
clientPkFileName = "sn"
)
private fun invokeAutoPilotResult(status: String) {
CallerLogger.e("$M_ADAS_IMPL$TAG", status)
}
override fun sendTrafficLightData(trafficLightResult: TrafficLightResult) {
AdasManager.getInstance().sendTrafficLightData(
trafficLightResult.crossId,
@@ -463,7 +486,8 @@ class MoGoAutopilotProvider :
REQ_CAR_NUMBER -> {
AppConfigInfo.plateNumber = String(msg.body)
}
else -> {}
else -> {
}
}
}
} catch (e: Exception) {

View File

@@ -31,6 +31,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListen
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.showAdUpgradeStatus
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.OnAdasListener