fix bug of liveUrl limit

This commit is contained in:
zhongchao
2021-04-15 17:41:58 +08:00
parent 22cfff1a95
commit a4a91c2a7e
5 changed files with 48 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ public interface IRequestLiveListener {
default void onSuccess(String liveUrl) {
}
default void onSuccess(String liveSn, String liveUrl, double lat, double lon) {
default void onSuccess(String liveSn, double lat, double lon) {
}
void onError(Throwable e);

View File

@@ -121,9 +121,8 @@ public class RequestLiveManager {
public void onNext(@NonNull BaseData<LiveReceive> baseData) {
if (requestLiveListener != null) {
LiveReceive liveReceive = baseData.result;
if (liveReceive != null && liveReceive.getLive() != null && liveReceive.getSn() != null) {
requestLiveListener.onSuccess(liveReceive.getSn(), liveReceive.getLive(),
liveReceive.getLat(), liveReceive.getLon());
if (liveReceive != null && liveReceive.getSn() != null) {
requestLiveListener.onSuccess(liveReceive.getSn(), liveReceive.getLat(), liveReceive.getLon());
} else {
requestLiveListener.onError(new Throwable("liveReceiver msg is wrong : " + liveReceive.toString()));
}

View File

@@ -1,10 +1,9 @@
package com.mogo.realtime.entity;
public
/**
/*
* adas 识别物体参数
*/
class ADASRecognizedResult {
public class ADASRecognizedResult {
/**
* 识别物体类型
@@ -78,4 +77,29 @@ class ADASRecognizedResult {
* 1高精定位
*/
public int dataAccuracy;
/**
* 道路ID
*/
private String roadId;
/**
* 车道ID-2D路段
*/
private String laneId;
/**
* 车道号中心线编号为0中心线右侧编号为负数3车道通行Road的车道编号0-1-2-3
*/
private int laneNum;
/**
* 限速
*/
private double rateLimiting;
/**
* 车道宽度
*/
private double roadWidth;
}

View File

@@ -73,6 +73,11 @@ public class CloudLocationInfo implements Parcelable {
*/
private double rateLimiting;
/**
* 车道宽度
*/
private double roadWidth;
public CloudLocationInfo() {
}
@@ -89,6 +94,7 @@ public class CloudLocationInfo implements Parcelable {
this.laneId = info.laneId;
this.laneNum = info.laneNum;
this.rateLimiting = info.rateLimiting;
this.roadWidth = info.roadWidth;
}
protected CloudLocationInfo(Parcel in) {
@@ -104,6 +110,7 @@ public class CloudLocationInfo implements Parcelable {
laneId = in.readString();
laneNum = in.readInt();
rateLimiting = in.readDouble();
roadWidth = in.readDouble();
}
@Override
@@ -120,6 +127,7 @@ public class CloudLocationInfo implements Parcelable {
dest.writeString(laneId);
dest.writeInt(laneNum);
dest.writeDouble(rateLimiting);
dest.writeDouble(roadWidth);
}
@Override
@@ -235,6 +243,14 @@ public class CloudLocationInfo implements Parcelable {
this.rateLimiting = rateLimiting;
}
public double getRoadWidth() {
return roadWidth;
}
public void setRoadWidth(double roadWidth) {
this.roadWidth = roadWidth;
}
@Override
public String toString() {
return "CloudLocationInfo{" +
@@ -250,6 +266,7 @@ public class CloudLocationInfo implements Parcelable {
", laneId='" + laneId + '\'' +
", laneNum=" + laneNum +
", rateLimiting=" + rateLimiting +
", roadWidth=" + roadWidth +
'}';
}

View File

@@ -62,7 +62,7 @@ public class TrafficLiveCurrentManager
this.trafficLiveCallBack = callBack;
requestLiveManager.requestFrontVehicleLive(lat, lon, bearing, new IRequestLiveListener() {
@Override
public void onSuccess(String liveSn, String liveUrl, double lat, double lon) {
public void onSuccess(String liveSn, double lat, double lon) {
onVehicleLiveSuccess(liveSn, surfaceView);
}