[626][adas] 能否启动自驾检测接口新增原始数据字段
This commit is contained in:
@@ -14,6 +14,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -28,6 +29,7 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
private static final String TAG = OCHAdasAbilityManager.class.getSimpleName();
|
||||
|
||||
private boolean isAutopilotAbility;
|
||||
private UnableLaunchData unableLaunchData;
|
||||
private ArrayList<UnableLaunchReason> unableAutopilotReasons;
|
||||
private String startFailedCode = "";
|
||||
private String startFailedMessage = "";
|
||||
@@ -44,6 +46,7 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
|
||||
public void init(Context context) {
|
||||
this.isAutopilotAbility = CallerAutopilotActionsListenerManager.INSTANCE.isAutopilotAbility();
|
||||
this.unableLaunchData = CallerAutopilotActionsListenerManager.INSTANCE.getUnableLaunchData();
|
||||
this.unableAutopilotReasons = CallerAutopilotActionsListenerManager.INSTANCE.getUnableAutopilotReasons();
|
||||
initListeners();
|
||||
}
|
||||
@@ -56,6 +59,9 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
return isAutopilotAbility;
|
||||
}
|
||||
|
||||
public String getOriginalData() {
|
||||
return unableLaunchData == null ? "" : unableLaunchData.getJson();
|
||||
}
|
||||
public String getAutopilotUnAbilityReason(){
|
||||
try {
|
||||
if(unableAutopilotReasons==null||unableAutopilotReasons.isEmpty()){
|
||||
@@ -97,10 +103,11 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons) {
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility,@Nullable UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons) {
|
||||
this.isAutopilotAbility = isAutopilotAbility;
|
||||
this.unableLaunchData = unableLaunchData;
|
||||
this.unableAutopilotReasons = unableAutopilotReasons;
|
||||
Logger.d(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + (unableAutopilotReasons == null ? null : unableAutopilotReasons.toString()));
|
||||
Logger.d(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + (unableAutopilotReasons == null ? null : unableAutopilotReasons.toString()) + " 原始数据=" + (unableLaunchData == null ? null : unableLaunchData.getJson()));
|
||||
if (unableAutopilotReasons != null && getMapVersion() < 30600) {
|
||||
//刹车变化回调
|
||||
Logger.d(TAG,"onAutopilotAbility = " + isAutopilotAbility +
|
||||
|
||||
@@ -60,6 +60,7 @@ import com.zhjt.mogo.adas.data.bean.AdasParam
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.mogo.adas.data.AiCloudTask
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask
|
||||
@@ -914,12 +915,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
*/
|
||||
override fun onAutopilotAbility(
|
||||
isAutopilotAbility: Boolean,
|
||||
unableLaunchData: UnableLaunchData,
|
||||
unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (unableAutopilotReasons != null && unableAutopilotReasons.size > 0) {
|
||||
autopilotAbilityCheck(isAutopilotAbility, unableAutopilotReasons.toString())
|
||||
autopilotAbilityCheck(isAutopilotAbility, unableAutopilotReasons.toString(), unableLaunchData)
|
||||
}
|
||||
invokeAutopilotAbility(isAutopilotAbility, unableAutopilotReasons)
|
||||
invokeAutopilotAbility(isAutopilotAbility, unableLaunchData, unableAutopilotReasons)
|
||||
}
|
||||
|
||||
override fun onParallelDrivingAbility(
|
||||
@@ -934,7 +936,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
nodeAliasCode = CHAIN_CODE_ADAS_ABILITY,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
private fun autopilotAbilityCheck(isAutopilotAbility: Boolean, reason: String) {
|
||||
private fun autopilotAbilityCheck(isAutopilotAbility: Boolean, reason: String, unableLaunchData: UnableLaunchData) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
@@ -8,5 +9,5 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
*/
|
||||
interface IMoGoAutopilotActionsListener {
|
||||
|
||||
fun onAutopilotAbility(isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?)
|
||||
fun onAutopilotAbility(isAutopilotAbility: Boolean, unableLaunchData: UnableLaunchData?, unableAutopilotReasons: ArrayList<UnableLaunchReason>?)
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
@@ -11,7 +12,14 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsListener>() {
|
||||
@Volatile
|
||||
private var isConnected = false
|
||||
|
||||
@Volatile
|
||||
private var isAutopilotAbility: Boolean = false
|
||||
|
||||
@Volatile
|
||||
private var unableLaunchData: UnableLaunchData? = null
|
||||
|
||||
@Volatile
|
||||
private var unableAutopilotReasons: ArrayList<UnableLaunchReason>? = null
|
||||
|
||||
init {
|
||||
@@ -38,6 +46,15 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
return isAutopilotAbility
|
||||
}
|
||||
|
||||
//获取域控发的原始数据,目前包括新老SSM和FM数据
|
||||
fun getOriginalData(): String {
|
||||
return unableLaunchData?.json ?: ""
|
||||
}
|
||||
|
||||
fun getUnableLaunchData(): UnableLaunchData? {
|
||||
return unableLaunchData
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取不能启动自驾的原因
|
||||
* null:表示没有任何原因证,证明isAutopilotAbility为true
|
||||
@@ -57,7 +74,9 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
|
||||
@Synchronized
|
||||
fun invokeAutopilotAbility(
|
||||
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
isAutopilotAbility: Boolean,
|
||||
unableLaunchData: UnableLaunchData,
|
||||
unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (isConnected) {
|
||||
var isEquals: Boolean = true
|
||||
@@ -73,6 +92,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
!(unableAutopilotReasons != null || this.unableAutopilotReasons != null)
|
||||
if (this.isAutopilotAbility != isAutopilotAbility || !isEquals) {
|
||||
this.isAutopilotAbility = isAutopilotAbility
|
||||
this.unableLaunchData = unableLaunchData
|
||||
this.unableAutopilotReasons = unableAutopilotReasons
|
||||
notification()
|
||||
}
|
||||
@@ -82,7 +102,11 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
private fun notification() {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons)
|
||||
listener.onAutopilotAbility(
|
||||
isAutopilotAbility,
|
||||
unableLaunchData,
|
||||
unableAutopilotReasons
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.zhjt.mogo.adas.data.bean;
|
||||
|
||||
import com.google.protobuf.GeneratedMessageV3;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.google.protobuf.util.JsonFormat;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import function_state_management.FSMStatusReasonQueryOuterClass;
|
||||
import system_master.SsmInfo;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
/**
|
||||
* 检测到不能启动自动驾驶的数据
|
||||
* 此类目前主要用于启动自驾命令下发后的域控数据记录
|
||||
*/
|
||||
public class UnableLaunchData {
|
||||
/**
|
||||
* 所使用的检测版本
|
||||
*/
|
||||
public final String abilityVersion;
|
||||
|
||||
/**
|
||||
* 老底盘数据
|
||||
* null表示未用到此数据
|
||||
* TODO 不需要底盘数据,如果底盘数据存在不能启动自驾的原因会限制启动自驾命令的下发
|
||||
*/
|
||||
// public final VehicleStateOuterClass.VehicleState vehicleState;
|
||||
|
||||
/**
|
||||
* 新底盘数据
|
||||
* null表示未用到此数据
|
||||
* TODO 不需要底盘数据,如果底盘数据存在不能启动自驾的原因会限制启动自驾命令的下发
|
||||
*/
|
||||
// public final ChassisStatesOuterClass.ChassisStates chassisStates;
|
||||
|
||||
/**
|
||||
* 老SSM数据
|
||||
* null表示未用到此数据
|
||||
*/
|
||||
public final SystemStatusInfo.StatusInfo statusInfo;
|
||||
|
||||
/**
|
||||
* 新SSM数据
|
||||
* null表示未用到此数据
|
||||
*/
|
||||
public final SsmInfo.SsmStatusInf ssmInfo;
|
||||
public final FSMStatusReasonQueryOuterClass.FSMStatusReasonRespond fsmStatusReasonRespond;//FSM数据
|
||||
|
||||
public UnableLaunchData(String abilityVersion,
|
||||
SystemStatusInfo.StatusInfo statusInfo,
|
||||
SsmInfo.SsmStatusInf ssmInfo,
|
||||
FSMStatusReasonQueryOuterClass.FSMStatusReasonRespond fsmStatusReasonRespond) {
|
||||
this.abilityVersion = abilityVersion;
|
||||
this.statusInfo = statusInfo;
|
||||
this.ssmInfo = ssmInfo;
|
||||
this.fsmStatusReasonRespond = fsmStatusReasonRespond;
|
||||
}
|
||||
|
||||
public String getJson() {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
try {
|
||||
jsonObject.put("ability_version", abilityVersion);
|
||||
JSONArray array = new JSONArray();
|
||||
if (statusInfo != null) {
|
||||
arrayPut(array, statusInfo);
|
||||
}
|
||||
if (ssmInfo != null) {
|
||||
arrayPut(array, ssmInfo);
|
||||
}
|
||||
if (fsmStatusReasonRespond != null) {
|
||||
arrayPut(array, fsmStatusReasonRespond);
|
||||
}
|
||||
if (array.length() > 0) {
|
||||
jsonObject.put("data", array);
|
||||
}
|
||||
} catch (JSONException | InvalidProtocolBufferException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return jsonObject.toString();
|
||||
}
|
||||
|
||||
private void arrayPut(JSONArray array, GeneratedMessageV3 message) throws JSONException, InvalidProtocolBufferException {
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("name", message.getClass().getName());
|
||||
object.put("original", ByteUtil.byteArrToHex(message.toByteArray(), false));
|
||||
object.put("parse", new JSONObject(JsonFormat.printer().print(message)));
|
||||
array.put(object);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhjt.mogo.adas.utils;
|
||||
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class ByteUtil {
|
||||
private static final String TAG = ByteUtil.class.getSimpleName();
|
||||
@@ -23,7 +23,7 @@ import androidx.annotation.Nullable;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.AutopilotReview;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.Define;
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
import com.zhjt.mogo.adas.data.AiCloudTask;
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask;
|
||||
@@ -469,15 +470,16 @@ public interface OnAdasListener {
|
||||
* 是否有能力启动自动驾驶
|
||||
*
|
||||
* @param isAutopilotAbility 是否能启动自动驾驶
|
||||
* @param unableLaunchData 原始数据
|
||||
* @param unableAutopilotReasons 不能启动自动驾驶原因
|
||||
*/
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
|
||||
|
||||
/**
|
||||
* 是否有能力启动平行驾驶
|
||||
*
|
||||
* @param isParallelDrivingAbility 是否能启动平行驾驶
|
||||
* @param isParallelDrivingAbility 是否能启动平行驾驶
|
||||
*/
|
||||
void onParallelDrivingAbility(boolean isParallelDrivingAbility);
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -25,7 +27,7 @@ public class AutopilotAbility230 {
|
||||
private OnAutopilotAbilityListener listener;
|
||||
|
||||
protected interface OnAutopilotAbilityListener {
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
}
|
||||
|
||||
protected AutopilotAbility230() {
|
||||
@@ -68,7 +70,7 @@ public class AutopilotAbility230 {
|
||||
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, new UnableLaunchData(this.getClass().getSimpleName(), null, null, null), unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -36,7 +38,7 @@ public class AutopilotAbility250 {
|
||||
private OnAutopilotAbilityListener listener;
|
||||
|
||||
protected interface OnAutopilotAbilityListener {
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
|
||||
void onStatusQuery();
|
||||
|
||||
@@ -171,7 +173,7 @@ public class AutopilotAbility250 {
|
||||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, new UnableLaunchData(this.getClass().getSimpleName(), statusInfo, null, null), unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -34,7 +36,7 @@ public class AutopilotAbility330 {
|
||||
private OnAutopilotAbilityListener listener;
|
||||
|
||||
protected interface OnAutopilotAbilityListener {
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
|
||||
void onStatusQuery();
|
||||
|
||||
@@ -147,7 +149,7 @@ public class AutopilotAbility330 {
|
||||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, new UnableLaunchData(this.getClass().getSimpleName(), statusInfo, null, null), unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -31,7 +33,7 @@ public class AutopilotAbility350And360 {
|
||||
private OnAutopilotAbilityListener listener;
|
||||
|
||||
protected interface OnAutopilotAbilityListener {
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
|
||||
}
|
||||
|
||||
@@ -146,7 +148,7 @@ public class AutopilotAbility350And360 {
|
||||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, new UnableLaunchData(this.getClass().getSimpleName(), null, statusInfo, null), unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -27,7 +29,7 @@ public class AutopilotAbility360 {
|
||||
private OnAutopilotAbilityListener listener;
|
||||
|
||||
protected interface OnAutopilotAbilityListener {
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons);
|
||||
|
||||
|
||||
}
|
||||
@@ -119,7 +121,7 @@ public class AutopilotAbility360 {
|
||||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, new UnableLaunchData(this.getClass().getSimpleName(), null, statusInfo, fsmStatusReasonRespond), unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,14 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData;
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -151,9 +153,9 @@ public class AutopilotAbilityManager implements AutopilotAbility230.OnAutopilotA
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons) {
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, @NonNull UnableLaunchData unableLaunchData, @Nullable ArrayList<UnableLaunchReason> unableAutopilotReasons) {
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons);
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableLaunchData, unableAutopilotReasons);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.AdasChannel;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
import com.zhjt.mogo.adas.data.AiCloudTask;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidao.support.adas.high.protocol;
|
||||
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidao.support.adas.high.protocol;
|
||||
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidao.support.adas.high.protocol;
|
||||
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.AdasChannel;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhidao.support.adas.high.common.ReconnectManager;
|
||||
|
||||
Reference in New Issue
Block a user