add new func of send data to adas

This commit is contained in:
zhongchao
2021-11-10 11:40:28 +08:00
parent b35a79f44c
commit 8580551598
4 changed files with 9 additions and 7 deletions

View File

@@ -1,9 +1,12 @@
package com.mogo.eagle.core.function.autopilot.server
import com.mogo.eagle.core.data.autopilot.AutopilotControlCmdParameter
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.GsonUtils
/**
* @author xiaoyuzhou
@@ -27,7 +30,7 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
}
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
// TODO 这里替换成与克难沟通的JSON格式 @钟超
// CallerAutoPilotManager.sendDataToAutopilot()
val autopilotControlCmdParameter = AutopilotControlCmdParameter("light", trafficLightResult)
CallerAutoPilotManager.sendDataToAutopilot(GsonUtils.toJson(autopilotControlCmdParameter))
}
}