[620][adas] 更换无法启动自驾原因提示文本
This commit is contained in:
@@ -46,14 +46,14 @@ public class AutopilotAbility230 {
|
||||
float brake = chassisStates.getBrakeSystemStates().getBrakePedalResponsePosition();
|
||||
if (brake > 0) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, "制动踏板被踩下");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, AutopilotAbilityManager.REASON_CHASSIS_BRAKE);
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, "档位异常");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, AutopilotAbilityManager.REASON_CHASSIS_GEAR);
|
||||
}
|
||||
}
|
||||
//TODO 关于手刹:不同车型的实现不同所以目前没法使用此字段
|
||||
|
||||
@@ -146,14 +146,14 @@ public class AutopilotAbility250 {
|
||||
float brake = chassisStates.getBrakeSystemStates().getBrakePedalResponsePosition();
|
||||
if (brake > 0) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, "制动踏板被踩下");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, AutopilotAbilityManager.REASON_CHASSIS_BRAKE);
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, "档位异常");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, AutopilotAbilityManager.REASON_CHASSIS_GEAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ public class AutopilotAbility250 {
|
||||
boolean isBrake = vehicleState.getParkingBrake();
|
||||
if (isBrake) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.PARKING_BRAKE, "施加驻车");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.PARKING_BRAKE, AutopilotAbilityManager.REASON_CHASSIS_PARKING_BRAKE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,14 +121,14 @@ public class AutopilotAbility350And360 {
|
||||
float brake = chassisStates.getBrakeSystemStates().getBrakePedalResponsePosition();
|
||||
if (brake > 0) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, "制动踏板被踩下");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.BRAKE, AutopilotAbilityManager.REASON_CHASSIS_BRAKE);
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, "档位异常");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.GEAR, AutopilotAbilityManager.REASON_CHASSIS_GEAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class AutopilotAbility350And360 {
|
||||
boolean isBrake = vehicleState.getParkingBrake();
|
||||
if (isBrake) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.PARKING_BRAKE, "施加驻车");
|
||||
unableAutopilotReasons = AutopilotAbilityManager.getInstance().addUnableAutopilotReason(unableAutopilotReasons, UnableLaunchReason.SourceType.CHASSIS, UnableLaunchReason.UnableType.PARKING_BRAKE, AutopilotAbilityManager.REASON_CHASSIS_PARKING_BRAKE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ public class AutopilotAbilityManager implements AutopilotAbility230.OnAutopilotA
|
||||
protected static final long DEFAULT_DETECTION_TIME = 3 * 1000L;//默认检测周期
|
||||
protected static final String[] NODE_INFO_STATE = {"未知状态", "依赖未就绪", "启动中", "运行", "停止", "无法启动状态", "人为启动状态", "人为关闭状态"};
|
||||
protected static final String[] NODE_INFO_STATE_FIXED_FREQUENCY = {"未知状态", "依赖未就绪", "启动中", "运行", "停止", "无法启动状态", "非自动启动状态", "非自动关闭状态"};
|
||||
protected static final String REASON_CHASSIS_BRAKE = "请检查刹车踏板";
|
||||
protected static final String REASON_CHASSIS_GEAR = "当前档位无法启动";
|
||||
protected static final String REASON_CHASSIS_PARKING_BRAKE = "请检查手刹";
|
||||
private static volatile AutopilotAbilityManager INSTANCE;
|
||||
private OnAdasListener listener;
|
||||
private Handler handler;
|
||||
|
||||
Reference in New Issue
Block a user