[BadCase]代码提交
This commit is contained in:
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
object CallerAutoPilotManager {
|
||||
private val TAG = "CallerAutoPilotManager"
|
||||
|
||||
private val providerApi: IMoGoAutopilotProvider
|
||||
private val providerApi: IMoGoAutopilotProvider?
|
||||
get() = CallerBase.getApiInstance(
|
||||
IMoGoAutopilotProvider::class.java,
|
||||
MogoServicePaths.PATH_AUTO_PILOT
|
||||
@@ -25,7 +25,7 @@ object CallerAutoPilotManager {
|
||||
* @param autoPilotIp 指定与控制器IP
|
||||
*/
|
||||
fun resetIpAddress(autoPilotIp: String) {
|
||||
providerApi.resetIpAddress(autoPilotIp)
|
||||
providerApi?.resetIpAddress(autoPilotIp)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ object CallerAutoPilotManager {
|
||||
//LogUtils.eTag(TAG, "自动驾驶控制参数异常,请检查参数信息")
|
||||
return
|
||||
}
|
||||
providerApi.startAutoPilot(controlParameters)
|
||||
providerApi?.startAutoPilot(controlParameters)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,40 +46,44 @@ object CallerAutoPilotManager {
|
||||
* 具体的json格式需要与@宋克难 进行沟通
|
||||
*/
|
||||
fun sendDataToAutopilot(jsonString: String) {
|
||||
providerApi.sendMessageToAutopilot(jsonString)
|
||||
providerApi?.sendMessageToAutopilot(jsonString)
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
fun cancelAutoPilot() {
|
||||
providerApi.cancelAutoPilot()
|
||||
providerApi?.cancelAutoPilot()
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启域控制器录制bag包
|
||||
*/
|
||||
fun recordPackage() {
|
||||
providerApi.recordPackage()
|
||||
providerApi?.recordPackage()
|
||||
}
|
||||
|
||||
fun setEnableLog(isEnableLog: Boolean) {
|
||||
providerApi.setEnableLog(isEnableLog)
|
||||
providerApi?.setEnableLog(isEnableLog)
|
||||
}
|
||||
|
||||
fun setIsWriteLog(isWriteLog: Boolean) {
|
||||
providerApi.setIsWriteLog(isWriteLog)
|
||||
providerApi?.setIsWriteLog(isWriteLog)
|
||||
}
|
||||
|
||||
fun setAutoPilotSpeed(speed: Int): Boolean {
|
||||
return providerApi.setAutoPilotSpeed(speed)
|
||||
return providerApi?.setAutoPilotSpeed(speed) ?: false
|
||||
}
|
||||
|
||||
fun recordCause(key: String?, name: String?, reason: String?) {
|
||||
providerApi?.recordCause(key, name, reason)
|
||||
}
|
||||
|
||||
fun setIPCShutDown() {
|
||||
providerApi.setIPCShutDown()
|
||||
providerApi?.setIPCShutDown()
|
||||
}
|
||||
|
||||
fun setIPCReboot() {
|
||||
providerApi.setIPCReboot()
|
||||
providerApi?.setIPCReboot()
|
||||
}
|
||||
}
|
||||
@@ -149,4 +149,5 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
@@ -89,4 +90,17 @@ object CallerAutopilotIdentifyListenerManager : CallerBase() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 采集任务记录回调
|
||||
*/
|
||||
fun invokeAutopilotRecordResult(result: AutoPilotRecordResult) {
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
LogUtils.dTag(TAG, "tag:$tag listener:$listener")
|
||||
listener.onAutopilotRecordResult(result)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user