将工控机感知数据回调与状态信息回调分离

CallerAutoPilotManager增加开启、停止自动驾驶方法

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-11-01 18:49:13 +08:00
parent 2561a5d38b
commit adc973bbfc
14 changed files with 213 additions and 115 deletions

View File

@@ -40,11 +40,7 @@ class MoGoAutopilotProvider :
override fun startAutoPilot(result: AutopilotControlParameters) {
if (AdasManager.getInstance().isSocketConnect) {
val parameter =
AutopilotControlCmdParameter(
TAG,
result
)
val parameter = AutopilotControlCmdParameter(TAG, result)
AdasManager.getInstance().aiCloudToAdasData(GsonUtils.toJson(parameter))
} else {
LogUtils.eTag(TAG, "车机与工控机链接失败,无法开启自动驾驶")
@@ -59,17 +55,6 @@ class MoGoAutopilotProvider :
}
}
override fun getAutopilotStatus(): Int {
// int status = IMoGoAutoPilotStatusListener.STATUS_AUTOPILOT_DISABLE;
// try {
// status = adasProvider.autopilotStateCall().getState();
// } catch (Exception e) {
// e.printStackTrace();
// }
return 0
}
override fun recordPackage(): Boolean {
return AdasManager.getInstance().recordPackage()
}

View File

@@ -44,14 +44,4 @@ public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusList
}
@Override
public void onAutopilotIdentifyDataUpdate(@Nullable ArrayList<TrafficData> trafficData) {
}
@Override
public void onAutopilotWarnMessage(@Nullable AutopilotWarnMessage autopilotWarnMessage) {
}
}