[change] 点云接口 移除Header,只保留点云byte[]
This commit is contained in:
@@ -308,11 +308,14 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*/
|
||||
@Override
|
||||
public void onDispatchRaw(String threadName, RawData raw) {
|
||||
//分发点云原始数据
|
||||
if (THREAD_NAME_DISPATCH_POINT_CLOUD.equals(threadName)) {
|
||||
mAdasListener.onPointCloud(raw.originalData.toByteArray());
|
||||
} else {
|
||||
try {
|
||||
try {
|
||||
//分发点云原始数据
|
||||
if (THREAD_NAME_DISPATCH_POINT_CLOUD.equals(threadName)) {
|
||||
int len = raw.getPackageLengthValue() - raw.getOffsetValue();
|
||||
byte[] bytes = new byte[len];
|
||||
System.arraycopy(raw.originalData.toByteArray(), raw.getOffsetValue(), bytes, 0, len);
|
||||
mAdasListener.onPointCloud(bytes);
|
||||
} else {
|
||||
if (rawUnpack != null) {
|
||||
if (raw.getProtocolStatus() == ProtocolStatus.SUCCEED) {
|
||||
MessagePad.Header header = raw.getHeader();
|
||||
@@ -327,10 +330,10 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
callError(raw.getProtocolStatus(), raw.originalData.toByteArray());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
callError(ProtocolStatus.BUSINESS_DATA_PARSE_FAILED, raw.originalData.toByteArray());
|
||||
CupidLogUtils.e(TAG, "原始数据:" + ByteUtil.byteArrToHex(raw.originalData.toByteArray()), e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
callError(ProtocolStatus.BUSINESS_DATA_PARSE_FAILED, raw.originalData.toByteArray());
|
||||
CupidLogUtils.e(TAG, "原始数据:" + ByteUtil.byteArrToHex(raw.originalData.toByteArray()), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ public interface OnAdasListener {
|
||||
/**
|
||||
* 透传的点云数据
|
||||
*
|
||||
* @param pointCloud 原始数据 包括Header+pointCloud
|
||||
* @param pointCloud 原始数据 只包含PointCloud数据
|
||||
*/
|
||||
void onPointCloud(byte[] pointCloud);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user