抽离自车状态回调监听

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-11-02 14:21:03 +08:00
parent 246998e46c
commit 7fd5b7e9d6
9 changed files with 115 additions and 39 deletions

View File

@@ -13,10 +13,12 @@ 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.IMoGoAutopilotCarStateListener;
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.CallerAutopilotCarStatusListenerManager;
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;
@@ -43,7 +45,8 @@ public class AdasEventManager implements
OnAdasMsgConnectStatusListener,
IMoGoAutopilotStatusListener,
IMoGoAutopilotPlanningListener,
IMoGoAutopilotIdentifyListener {
IMoGoAutopilotIdentifyListener ,
IMoGoAutopilotCarStateListener {
private final String TAG = "AdasEventManager";
@@ -67,6 +70,7 @@ public class AdasEventManager implements
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, this);
}
public static AdasEventManager getInstance() {

View File

@@ -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.CallerAutopilotCarStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.utils.logger.Logger;
@@ -50,7 +51,7 @@ public class OnAdasListenerAdapter implements OnAdasListener {
@Override
public void onCarStateData(CarStateInfo carStateInfo) {
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
//can数据转发
CarStateInfo.ValuesBean bean = carStateInfo.getValues();