add chain log of startAutopilot(bus and taxi), add new func of upload map log:
This commit is contained in:
@@ -51,7 +51,6 @@ dependencies {
|
||||
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.mogochainbase
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
implementation rootProject.ext.dependencies.mogoaicloudtelematic
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,7 +72,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.mogologlib
|
||||
implementation rootProject.ext.dependencies.mogochainbase
|
||||
|
||||
implementation rootProject.ext.dependencies.androidx_datastore
|
||||
implementation rootProject.ext.dependencies.androidxroomruntime
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -11,8 +12,10 @@ import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.function.api.map.deva.IMoGoMapDevaProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
@@ -20,7 +23,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.zhidao.loglib.bean.RemoteLogPushContent
|
||||
import com.zhidao.loglib.call.LogInfoManagerFactory
|
||||
import com.zhidao.loglib.core.ILogListener
|
||||
@@ -30,10 +32,11 @@ import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companio
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOG_PUSH_TYPE
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.START_CATCH_LOG
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.STOP_CATCH_LOG
|
||||
import java.io.File
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handler.Callback,
|
||||
ILogListener {
|
||||
ILogListener, IMoGoMapDevaProvider {
|
||||
|
||||
private const val TAG = "MogoLogCatchManager"
|
||||
private const val MSG_TRY_CLOSE_LOG = 1001
|
||||
@@ -50,6 +53,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
mContext = context
|
||||
MogoAiCloudSocketManager.getInstance(AbsMogoApplication.getApp().applicationContext)
|
||||
.registerOnMessageListener(LOG_PUSH_TYPE, this)
|
||||
CallerMapDevaListenerManager.addListener(TAG, this)
|
||||
manualContent.pkgName = context.packageName
|
||||
logCheck(context)
|
||||
}
|
||||
@@ -107,7 +111,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
}
|
||||
|
||||
override fun handleMessage(msg: Message): Boolean {
|
||||
when(msg.what){
|
||||
when (msg.what) {
|
||||
MSG_TRY_CLOSE_LOG -> {
|
||||
CallerDevaToolsListenerManager.invokeDevaToolsLogCatchClose()
|
||||
closeLoggerLevel()
|
||||
@@ -225,10 +229,20 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
}
|
||||
}
|
||||
|
||||
override fun uploadFile(filePath: String) {
|
||||
val file = File(filePath)
|
||||
if (file.isFile) {
|
||||
CallerLogger.d("$M_DEVA$TAG", "uploadFile path : $filePath")
|
||||
// LogInfoManagerFactory.handleSingleUploadFile(filePath)
|
||||
}else{
|
||||
CallerLogger.d("$M_DEVA$TAG", "file absPath : ${file.absolutePath}")
|
||||
}
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
MogoAiCloudSocketManager.getInstance(AbsMogoApplication.getApp().applicationContext)
|
||||
.unregisterLifecycleListener(LOG_PUSH_TYPE)
|
||||
|
||||
CallerMapDevaListenerManager.removeListener(this)
|
||||
if (handler.hasMessages(MSG_TRY_CLOSE_LOG)) {
|
||||
handler.removeMessages(MSG_TRY_CLOSE_LOG)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ dependencies {
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
|
||||
implementation rootProject.ext.dependencies.mogochainbase
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogoaicloudservicesdk
|
||||
|
||||
Reference in New Issue
Block a user