[change]相工控机发送红绿灯接口添加时间字段
This commit is contained in:
@@ -298,6 +298,7 @@ message TrafficLightData
|
||||
int32 arrowNo = 8; //当前车道对应地面要素转向
|
||||
int32 flashYellow = 9; //黄灯总时间
|
||||
TrafficLightDetail laneDetail = 10; //灯态具体信息
|
||||
uint64 timestamp =11;//当前卫星时间, 单位: ms
|
||||
}
|
||||
|
||||
// message definition for MsgTypeWarn
|
||||
|
||||
@@ -794,12 +794,13 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude,
|
||||
@NonNull String heading, @NonNull String direction, int lightId, int laneNo,
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail) {
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp) {
|
||||
if (crossID == null) {
|
||||
crossID = "";
|
||||
}
|
||||
@@ -821,6 +822,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
builder.setFlashYellow(flashYellow);
|
||||
if (laneDetail != null)
|
||||
builder.setLaneDetail(laneDetail);
|
||||
builder.setTimestamp(timestamp);
|
||||
MessagePad.TrafficLightData req = builder.build();
|
||||
return sendWsMessage(MessageType.TYPE_SEND_TRAFFIC_LIGHT_DATA.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
@@ -365,11 +365,12 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude, @NonNull String heading, @NonNull String direction, int lightId, int laneNo, int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail) {
|
||||
return mChannel != null && mChannel.sendTrafficLightData(crossID, latitude, longitude, heading, direction, lightId, laneNo, arrowNo, flashYellow, laneDetail);
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude, @NonNull String heading, @NonNull String direction, int lightId, int laneNo, int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp) {
|
||||
return mChannel != null && mChannel.sendTrafficLightData(crossID, latitude, longitude, heading, direction, lightId, laneNo, arrowNo, flashYellow, laneDetail, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -157,11 +157,12 @@ public interface IAdasNetCommApi {
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude,
|
||||
@NonNull String heading, @NonNull String direction, int lightId, int laneNo,
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail);
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp);
|
||||
|
||||
/**
|
||||
* 自动驾驶路径请求
|
||||
|
||||
Reference in New Issue
Block a user