将工控机感知数据回调与状态信息回调分离
CallerAutoPilotManager增加开启、停止自动驾驶方法 Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
@@ -13,9 +13,11 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.adas.model.AdasServiceModel;
|
||||
@@ -40,7 +42,8 @@ import io.reactivex.schedulers.Schedulers;
|
||||
public class AdasEventManager implements
|
||||
OnAdasMsgConnectStatusListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoAutopilotPlanningListener {
|
||||
IMoGoAutopilotPlanningListener,
|
||||
IMoGoAutopilotIdentifyListener {
|
||||
|
||||
private final String TAG = "AdasEventManager";
|
||||
|
||||
@@ -63,6 +66,7 @@ public class AdasEventManager implements
|
||||
gson = GsonUtil.getGson();
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
public static AdasEventManager getInstance() {
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
@@ -43,7 +44,7 @@ public class OnAdasListenerAdapter implements OnAdasListener {
|
||||
@Override
|
||||
public void onRectData(RectInfo rectInfo) {
|
||||
ArrayList<TrafficData> recognizedListResults = AdasObjectUtils.INSTANCE.regroupTrafficDataData(rectInfo.getModels());
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutopilotIdentifyDataUpdate(recognizedListResults);
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotIdentifyDataUpdate(recognizedListResults);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -156,7 +157,7 @@ public class OnAdasListenerAdapter implements OnAdasListener {
|
||||
@Override
|
||||
public void onWarnMessage(WarnMessageInfo warnMessageInfo) {
|
||||
final AutopilotWarnMessage warnMessage = AdasObjectUtils.INSTANCE.fromAdasObject(warnMessageInfo);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutopilotWarnMessage(warnMessage);
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotWarnMessage(warnMessage);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user