Merge branch 'release_sweeper-d_230614_3.1.4.1' into 'master'
[Publish]Sweeper driver 230614 V3.1.4 See merge request SCA/L4HA/AndroidApp/MoGoEagleEye!796
This commit is contained in:
@@ -10,30 +10,29 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.toAutoPilotLine
|
||||
import com.mogo.eagle.core.data.autopilot.toRouteInfo
|
||||
import com.mogo.eagle.core.data.deva.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.toTrafficLightDetail
|
||||
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.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_MULTI_CONNECT
|
||||
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_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.toTrafficLightDetail
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasListenerImpl
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.server.AsyncDataToAutopilotServer
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.EventListener
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.IMsgHandler
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.TeleMsgHandler
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
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.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
@@ -320,14 +319,41 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
override fun startAutoPilot(controlParameters: AutopilotControlParameters) {
|
||||
startAutoPilot(controlParameters, Constants.AUTOPILOT_SOURCE.PAD)
|
||||
}
|
||||
|
||||
override fun startAutoPilotByMoFang(controlParameters: AutopilotControlParameters?) {
|
||||
if (controlParameters==null){
|
||||
startAutoPilotWithNoParameter(Constants.AUTOPILOT_SOURCE.MO_FANG)
|
||||
}else{
|
||||
startAutoPilot(controlParameters, Constants.AUTOPILOT_SOURCE.MO_FANG)
|
||||
}
|
||||
}
|
||||
private fun startAutoPilotWithNoParameter(source: Int) {
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
val invokeResult = AdasManager.getInstance()
|
||||
.sendAutoPilotModeReq(1, 1, controlParameters.toRouteInfo())
|
||||
.sendAutoPilotModeReq(1, source, null)
|
||||
invokeAutoPilotResult(if (invokeResult) "无参自动驾驶调用成功" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
|
||||
} else {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
val invokeResult = AdasManager.getInstance()
|
||||
.sendAutoPilotModeReq(1, source, null)
|
||||
invokeAutoPilotResult(if (invokeResult) "无参自动驾驶调用成功" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
|
||||
} else {
|
||||
invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶 无参")
|
||||
CallerLogger.e("$M_ADAS_IMPL$TAG", "车机与工控机链接失败,无法开启自动驾驶")
|
||||
}
|
||||
}
|
||||
}
|
||||
private fun startAutoPilot(controlParameters: AutopilotControlParameters, source: Int) {
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
val invokeResult = AdasManager.getInstance()
|
||||
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo())
|
||||
invokeAutoPilotResult(if (invokeResult) "自动驾驶调用成功" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
|
||||
} else {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
val invokeResult = AdasManager.getInstance()
|
||||
.sendAutoPilotModeReq(1, 1, controlParameters.toRouteInfo())
|
||||
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo())
|
||||
invokeAutoPilotResult(if (invokeResult) "自动驾驶调用成功" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
|
||||
} else {
|
||||
invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶")
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.view.KeyEvent
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangListener
|
||||
@@ -17,9 +18,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetAcceleratedSpeed
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetHorn
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilot
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilotByMoFang
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager.invokeMoFangStatus
|
||||
import com.mogo.eagle.core.function.call.mofang.CallerMofangListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_F
|
||||
@@ -319,7 +322,12 @@ class MoFangManager private constructor() : IMoGoMoFangListener {
|
||||
if (HmiBuildConfig.isShowMfToastView) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 timeInterval: ${pressEUpTime - startPressTime}ms")
|
||||
}
|
||||
startAutoPilot(getAutoPilotStatusInfo().autopilotControlParameters)
|
||||
//清扫车有FSM模块,魔方启动自驾时需要将Source修改为魔方,以便telamatics做区分并在转发时增加flag标记
|
||||
if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
startAutoPilotByMoFang(getAutoPilotStatusInfo().autopilotControlParameters)
|
||||
} else{
|
||||
startAutoPilot(getAutoPilotStatusInfo().autopilotControlParameters)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user