This commit is contained in:
zhongchao
2022-03-14 14:11:29 +08:00
parent 3ffcb4bd27
commit d35700cb08
32 changed files with 332 additions and 1874 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.call.autopilot
import android.os.SystemClock
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotProvider
import com.mogo.eagle.core.function.call.base.CallerBase
import kotlin.random.Random
@@ -17,8 +18,8 @@ object CallerAutoPilotManager {
private val providerApi: IMoGoAutopilotProvider?
get() = CallerBase.getApiInstance(
IMoGoAutopilotProvider::class.java,
MogoServicePaths.PATH_AUTO_PILOT
IMoGoAutopilotProvider::class.java,
MogoServicePaths.PATH_AUTO_PILOT
)
/**
@@ -44,11 +45,10 @@ object CallerAutoPilotManager {
}
/**
* 发送json数据给 Autopilot 自动驾驶控制器
* 具体的json格式需要与@宋克难 进行沟通
* 发送红绿灯数据至工控机
*/
fun sendDataToAutopilot(jsonString: String) {
providerApi?.sendMessageToAutopilot(jsonString)
fun sendTrafficLightData(trafficLightResult: TrafficLightResult) {
providerApi?.sendTrafficLightData(trafficLightResult)
}
/**

View File

@@ -5,25 +5,25 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
object CallerLogger {
fun i(tag: String, message: String, any: Any) {
fun i(tag: String, message: String, any: Any? = null) {
if (scene.check(tag)) {
Logger.i(tag, message, any)
}
}
fun d(tag: String, message: String, any: Any) {
fun d(tag: String, message: String, any: Any? = null) {
if (scene.check(tag)) {
Logger.d(tag, message, any)
}
}
fun w(tag: String, message: String, any: Any) {
fun w(tag: String, message: String, any: Any? = null) {
if (scene.check(tag)) {
Logger.w(tag, message, any)
}
}
fun e(tag: String, message: String, any: Any) {
fun e(tag: String, message: String, any: Any? = null) {
if (scene.check(tag)) {
Logger.e(tag, message, any)
}