[2.15.0][mogo-adas] 添加限制绕障开关接口、停车让行线前避让等待开关接口、地图限速功能开关接口
This commit is contained in:
@@ -75,4 +75,28 @@ public class SendCmd<T> {
|
||||
cmds.add(new SendCmdOption<Integer>("关", SendCmdOption.TAG.AEB, 0));
|
||||
return new SendCmd<Integer>(Constants.TITLE.SEND_AEB, cmds);
|
||||
}
|
||||
|
||||
//限制绕障开关
|
||||
public static SendCmd<Integer> getSendLaneChangeRestrainVaild() {
|
||||
List<SendCmdOption<Integer>> cmds = new ArrayList<>();
|
||||
cmds.add(new SendCmdOption<Integer>("限制绕障", SendCmdOption.TAG.LANE_CHANGE_RESTRAIN_VAILD, 1));
|
||||
cmds.add(new SendCmdOption<Integer>("正常绕障", SendCmdOption.TAG.LANE_CHANGE_RESTRAIN_VAILD, 0));
|
||||
return new SendCmd<Integer>(Constants.TITLE.SEND_LANE_CHANGE_RESTRAIN_VAILD, cmds);
|
||||
}
|
||||
|
||||
//停车让行线前避让等待开关
|
||||
public static SendCmd<Integer> getSendStopYieldVaild() {
|
||||
List<SendCmdOption<Integer>> cmds = new ArrayList<>();
|
||||
cmds.add(new SendCmdOption<Integer>("停车让行线前需要避让等待", SendCmdOption.TAG.STOP_YIELD_VAILD, 1));
|
||||
cmds.add(new SendCmdOption<Integer>("停车让行线前无需避让等待", SendCmdOption.TAG.STOP_YIELD_VAILD, 0));
|
||||
return new SendCmd<Integer>(Constants.TITLE.SEND_STOP_YIELD_VAILD, cmds);
|
||||
}
|
||||
|
||||
//地图限速功能开关
|
||||
public static SendCmd<Integer> getSendHadmapSpeedLimitVaild() {
|
||||
List<SendCmdOption<Integer>> cmds = new ArrayList<>();
|
||||
cmds.add(new SendCmdOption<Integer>("使用地图限速功能", SendCmdOption.TAG.HADMAP_SPEED_LIMIT_VAILD, 1));
|
||||
cmds.add(new SendCmdOption<Integer>("不使用地图限速功能", SendCmdOption.TAG.HADMAP_SPEED_LIMIT_VAILD, 0));
|
||||
return new SendCmd<Integer>(Constants.TITLE.SEND_HADMAP_SPEED_LIMIT_VAILD, cmds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ public class SendCmdOption<T> {
|
||||
int DETOURING = 5;//绕障类功能
|
||||
int V2N_TO_PNC = 6;//V2N数据到PnC
|
||||
int AEB = 7;//AEB开关
|
||||
int LANE_CHANGE_RESTRAIN_VAILD = 8;//限制绕障开关
|
||||
int STOP_YIELD_VAILD = 9;//停车让行线前避让等待开关
|
||||
int HADMAP_SPEED_LIMIT_VAILD = 10;//地图限速功能开关
|
||||
}
|
||||
|
||||
public final String name;
|
||||
|
||||
@@ -851,14 +851,17 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleBtnData.add(Constants.TITLE.SEND_RECORD_CAUSE);
|
||||
titleBtnData.add(Constants.TITLE.SEND_SET_DEMO_MODE_REQ);
|
||||
titleBtnData.add(Constants.TITLE.SEND_SET_RAIN_MODE_REQ);
|
||||
titleBtnData.add(Constants.TITLE.SEND_DETOURING);
|
||||
titleBtnData.add(Constants.TITLE.SEND_SYSTEM_CMD_REQ_REBOOT);
|
||||
titleBtnData.add(Constants.TITLE.SEND_DETOURING);
|
||||
titleBtnData.add(Constants.TITLE.SEND_DETOURING_SPEED);
|
||||
titleBtnData.add(Constants.TITLE.SEND_AEB);
|
||||
titleBtnData.add(Constants.TITLE.SEND_LANE_CHANGE_RESTRAIN_VAILD);
|
||||
titleBtnData.add(Constants.TITLE.SEND_STOP_YIELD_VAILD);
|
||||
titleBtnData.add(Constants.TITLE.SEND_HADMAP_SPEED_LIMIT_VAILD);
|
||||
titleBtnData.add(Constants.TITLE.SEND_TRIP_INFO);
|
||||
titleBtnData.add(Constants.TITLE.SEND_PLANNING_CMD);
|
||||
titleBtnData.add(Constants.TITLE.SEND_BLIND_AREA);
|
||||
titleBtnData.add(Constants.TITLE.SEND_V2N_TO_PNC);
|
||||
titleBtnData.add(Constants.TITLE.SEND_AEB);
|
||||
}
|
||||
|
||||
private void initBtnRecyclerView() {
|
||||
@@ -1670,6 +1673,18 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
//AEB
|
||||
new SendCmdDialog(this, SendCmd.getSendAeb()).show();
|
||||
break;
|
||||
case Constants.TITLE.SEND_LANE_CHANGE_RESTRAIN_VAILD:
|
||||
//限制绕障开关
|
||||
new SendCmdDialog(this, SendCmd.getSendLaneChangeRestrainVaild()).show();
|
||||
break;
|
||||
case Constants.TITLE.SEND_STOP_YIELD_VAILD:
|
||||
//停车让行线前避让等待开关
|
||||
new SendCmdDialog(this, SendCmd.getSendStopYieldVaild()).show();
|
||||
break;
|
||||
case Constants.TITLE.SEND_HADMAP_SPEED_LIMIT_VAILD:
|
||||
//地图限速功能开关
|
||||
new SendCmdDialog(this, SendCmd.getSendHadmapSpeedLimitVaild()).show();
|
||||
break;
|
||||
case Constants.TITLE.SEND_DETOURING_SPEED:
|
||||
//绕障速度设置
|
||||
showDetouringSpeedDialog();
|
||||
|
||||
@@ -96,6 +96,18 @@ public class SendCmdDialog extends Dialog {
|
||||
if (data.tag == SendCmdOption.TAG.AEB) {
|
||||
AdasManager.getInstance().sendAebCmd((int) data.value);
|
||||
}
|
||||
} else if (Constants.TITLE.SEND_LANE_CHANGE_RESTRAIN_VAILD.equals(name)) {
|
||||
if (data.tag == SendCmdOption.TAG.LANE_CHANGE_RESTRAIN_VAILD) {
|
||||
AdasManager.getInstance().sendLaneChangeRestrainVaild((int) data.value);
|
||||
}
|
||||
} else if (Constants.TITLE.SEND_STOP_YIELD_VAILD.equals(name)) {
|
||||
if (data.tag == SendCmdOption.TAG.STOP_YIELD_VAILD) {
|
||||
AdasManager.getInstance().sendStopYieldVaild((int) data.value);
|
||||
}
|
||||
} else if (Constants.TITLE.SEND_HADMAP_SPEED_LIMIT_VAILD.equals(name)) {
|
||||
if (data.tag == SendCmdOption.TAG.HADMAP_SPEED_LIMIT_VAILD) {
|
||||
AdasManager.getInstance().sendHadmapSpeedLimitVaild((int) data.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -204,6 +204,9 @@ public class Constants {
|
||||
String SEND_BLIND_AREA = "盲区数据开关";
|
||||
String SEND_V2N_TO_PNC = "V2N数据到PnC";
|
||||
String SEND_AEB = "AEB开关";
|
||||
String SEND_LANE_CHANGE_RESTRAIN_VAILD = "限制绕障开关";
|
||||
String SEND_STOP_YIELD_VAILD = "停车让行线前避让等待开关";
|
||||
String SEND_HADMAP_SPEED_LIMIT_VAILD = "地图限速开关";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,6 +576,7 @@ message PlanningActionMsg
|
||||
message SetOneParam
|
||||
{
|
||||
uint32 type = 1; // 0:default 1:绕障类功能开关(bool) 2:变道绕障的目标障碍物速度阈值(double, m/s) 3:AEB开关(bool)
|
||||
// 4:限制绕障开关(bool) 5:停车让行线前避让等待开关(bool) 6:地图限速功能开关(bool)
|
||||
string value = 2; // 转成字符串的值
|
||||
}
|
||||
|
||||
|
||||
@@ -1245,7 +1245,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
|
||||
/**
|
||||
* 给Planning发送变道指令
|
||||
* TODO 目前此功能仅襄阳牌照考试支持
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策
|
||||
* @return boolean 是否加入发送队列
|
||||
@@ -1258,8 +1258,8 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
/**
|
||||
* 给Planning发送指令
|
||||
*
|
||||
* @param pullOverCmd 命令 0: default 1: 靠边停车 2:重新起步 3:紧急停车 TODO 值3 仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 仅襄阳牌照考试支持
|
||||
* @param pullOverCmd 命令 0: default 1: 靠边停车 2:重新起步 3:紧急停车 TODO 值3 目前仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 目前仅襄阳牌照考试支持
|
||||
* @return boolean 是否加入发送队列
|
||||
*/
|
||||
@Override
|
||||
@@ -1517,6 +1517,8 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* 设置参数命令
|
||||
*
|
||||
* @param type 0:default 1:绕障类功能开关(bool) 2:变道绕障的目标障碍物速度阈值(double, m/s)
|
||||
* 3:AEB开关(bool) 4:限制绕障开关(bool)
|
||||
* 5:停车让行线前避让等待开关(bool) 6:地图限速功能开关(bool)
|
||||
* @param value 转成字符串的值
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -1555,7 +1557,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
|
||||
/**
|
||||
* AEB开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:关闭,1:开启
|
||||
* @return boolean
|
||||
@@ -1565,6 +1567,43 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return sendSetParamReq(3, String.valueOf(enable));
|
||||
}
|
||||
|
||||
/**
|
||||
* 限制绕障开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:正常绕障 1:限制绕障
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendLaneChangeRestrainVaild(int enable) {
|
||||
return sendSetParamReq(4, String.valueOf(enable));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停车让行线前避让等待开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:停车让行线前无需避让等待 1:停车让行线前需要避让等待
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendStopYieldVaild(int enable) {
|
||||
return sendSetParamReq(5, String.valueOf(enable));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 地图限速功能开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:不使用地图限速功能 1:使用地图限速功能
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendHadmapSpeedLimitVaild(int enable) {
|
||||
return sendSetParamReq(6, String.valueOf(enable));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生行程相关
|
||||
* type=1或2的时 需要参数 lineName
|
||||
|
||||
@@ -621,7 +621,7 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 给Planning发送变道指令
|
||||
* TODO 目前此功能仅襄阳牌照考试支持
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策
|
||||
* @return boolean 是否加入发送队列
|
||||
@@ -634,8 +634,8 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
/**
|
||||
* 给Planning发送指令
|
||||
*
|
||||
* @param pullOverCmd 命令 0: default 1: 靠边停车 2:重新起步 3:紧急停车 TODO 值3 仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 仅襄阳牌照考试支持
|
||||
* @param pullOverCmd 命令 0: default 1: 靠边停车 2:重新起步 3:紧急停车 TODO 值3 目前仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 目前仅襄阳牌照考试支持
|
||||
* @return boolean 是否加入发送队列
|
||||
*/
|
||||
@Override
|
||||
@@ -846,6 +846,42 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendAebCmd(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 限制绕障开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:正常绕障 1:限制绕障
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendLaneChangeRestrainVaild(int enable) {
|
||||
return mChannel != null && mChannel.sendLaneChangeRestrainVaild(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停车让行线前避让等待开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:停车让行线前无需避让等待 1:停车让行线前需要避让等待
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendStopYieldVaild(int enable) {
|
||||
return mChannel != null && mChannel.sendStopYieldVaild(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图限速功能开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:不使用地图限速功能 1:使用地图限速功能
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendHadmapSpeedLimitVaild(int enable) {
|
||||
return mChannel != null && mChannel.sendHadmapSpeedLimitVaild(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生行程相关
|
||||
* type=1或2的时 需要参数 lineName
|
||||
|
||||
@@ -331,7 +331,7 @@ public interface IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 给Planning发送变道指令
|
||||
* TODO 目前此功能仅襄阳牌照考试支持
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策
|
||||
* @return boolean 是否加入发送队列
|
||||
@@ -342,7 +342,7 @@ public interface IAdasNetCommApi {
|
||||
* 给Planning发送指令
|
||||
*
|
||||
* @param pullOverCmd 命令 0: default 1: 靠边停车 2:重新起步 3:紧急停车 TODO 值3 目前仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 仅襄阳牌照考试支持
|
||||
* @param laneChangeCmd 命令 0: default 1: 左变道 2:右变道 3:超车 4:恢复自动决策 TODO laneChangeCmd 目前仅襄阳牌照考试支持
|
||||
* @return boolean 是否加入发送队列
|
||||
*/
|
||||
boolean sendPlanningCmd(int pullOverCmd, int laneChangeCmd);
|
||||
@@ -510,6 +510,34 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean sendAebCmd(int enable);
|
||||
|
||||
|
||||
/**
|
||||
* 限制绕障开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:正常绕障 1:限制绕障
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendLaneChangeRestrainVaild(int enable);
|
||||
|
||||
/**
|
||||
* 停车让行线前避让等待开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:停车让行线前无需避让等待 1:停车让行线前需要避让等待
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendStopYieldVaild(int enable);
|
||||
|
||||
/**
|
||||
* 地图限速功能开关
|
||||
* TODO 目前仅襄阳牌照考试支持
|
||||
*
|
||||
* @param enable 0:不使用地图限速功能 1:使用地图限速功能
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendHadmapSpeedLimitVaild(int enable);
|
||||
|
||||
/**
|
||||
* 发生行程相关
|
||||
* type=1或2的时 需要参数 lineName
|
||||
|
||||
Reference in New Issue
Block a user