[6.1.0] 去除请求平行驾驶监听

This commit is contained in:
wangmingjun
2023-09-22 16:13:01 +08:00
parent 839f0ca7a1
commit f50663e8b6

View File

@@ -6,7 +6,6 @@ import androidx.annotation.Nullable;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
@@ -24,7 +23,7 @@ import java.util.ArrayList;
* 工控机状态信息回调(判断是否能否启动自动驾驶的回调)
* 目前定的是3秒回调一次
*/
public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMoGoAutopilotStatisticsListener, IMoGoParallelDrivingActionsListener {
public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMoGoAutopilotStatisticsListener {
private static final String TAG = OCHAdasAbilityManager.class.getSimpleName();
@@ -89,8 +88,6 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
//2022.10.9 工控机状态信息回调(判断是否能否启动自动驾驶的回调), 目前定的是3秒回调一次
CallerAutopilotActionsListenerManager.INSTANCE.addListener(TAG, this);
CallerAutopilotStatisticsListenerManager.INSTANCE.addListener(TAG,this);
//map3.6.0且是东风或者红旗的时候返回
CallerParallelDrivingActionsListenerManager.INSTANCE.addListener(TAG,this);
}
private void releaseListeners() {
@@ -115,7 +112,6 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
}
}
@Override
public void onAutopilotStatistics(@Nullable AutopilotStatistics statistics) {
if (statistics == null) return;
@@ -129,20 +125,6 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
}
}
@Override
public void onParallelDrivingAbility(boolean isParallelDrivingAbility, @Nullable ArrayList<UnableLaunchReason> unableParallelDrivingReasons) {
if (unableParallelDrivingReasons != null && getMapVersion() >= 30600) {
//刹车变化回调
Logger.d(TAG,"onParallelDrivingAbility = " + isParallelDrivingAbility +
" unableParallelDrivingReasons =" + unableParallelDrivingReasons.toString());
if (unableParallelDrivingReasons.toString().contains(UnableLaunchReason.SourceType.CHASSIS.name())
&& unableParallelDrivingReasons.toString().contains(UnableLaunchReason.UnableType.BRAKE.name())) {
failureCallback.brakeStatusChanged(isParallelDrivingAbility);
}
}
}
private int getMapVersion(){
return ParseVersionUtils.parseVersion(true, CallerAutoPilotStatusListenerManager.INSTANCE.getDockerVersion());
}