add adas aidl new interface
This commit is contained in:
@@ -11,7 +11,7 @@ import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedListResult;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -36,7 +36,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
}
|
||||
|
||||
private Map< String, ADASRecognizedListResult > mLastPositions = new ConcurrentHashMap<>();
|
||||
private Map< String, ADASRecognizedResult > mLastPositions = new ConcurrentHashMap<>();
|
||||
|
||||
public static AdasRecognizedResultDrawer getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
@@ -65,13 +65,13 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
return mAdasRecognizedMarkersCaches.containsKey( uniqueKey );
|
||||
}
|
||||
|
||||
public void renderAdasRecognizedResult( List< ADASRecognizedListResult > resultList, boolean machineVision, double curSpeed ) {
|
||||
public void renderAdasRecognizedResult( List< ADASRecognizedResult > resultList, boolean machineVision, double curSpeed ) {
|
||||
if ( resultList == null || resultList.isEmpty() ) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).removeMarkers( DataTypes.TYPE_MARKER_ADAS );
|
||||
return;
|
||||
}
|
||||
purgeAdasRecognizedData( resultList );
|
||||
for ( ADASRecognizedListResult recognizedListResult : resultList ) {
|
||||
for ( ADASRecognizedResult recognizedListResult : resultList ) {
|
||||
if ( recognizedListResult == null ) {
|
||||
continue;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
mAdasRecognizedMarkersCaches.put( uniqueKey, marker );
|
||||
mLastPositions.put( uniqueKey, recognizedListResult );
|
||||
} else {
|
||||
ADASRecognizedListResult lastPosition = mLastPositions.get( uniqueKey );
|
||||
ADASRecognizedResult lastPosition = mLastPositions.get( uniqueKey );
|
||||
mLastPositions.put( uniqueKey, recognizedListResult );
|
||||
if ( lastPosition != null ) {
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
@@ -133,7 +133,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
*
|
||||
* @param resultList
|
||||
*/
|
||||
private void purgeAdasRecognizedData( List< ADASRecognizedListResult > resultList ) {
|
||||
private void purgeAdasRecognizedData( List< ADASRecognizedResult > resultList ) {
|
||||
if ( resultList == null || resultList.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
return;
|
||||
}
|
||||
Map< String, IMogoMarker > existMarker = new HashMap<>();
|
||||
for ( ADASRecognizedListResult recognizedListResult : resultList ) {
|
||||
for ( ADASRecognizedResult recognizedListResult : resultList ) {
|
||||
if ( recognizedListResult == null ) {
|
||||
continue;
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
}
|
||||
}
|
||||
|
||||
private IMogoMarker drawAdasRecognizedDataMarker( ADASRecognizedListResult recognizedListResult,
|
||||
private IMogoMarker drawAdasRecognizedDataMarker( ADASRecognizedResult recognizedListResult,
|
||||
boolean machineVision,
|
||||
double curSpeed ) {
|
||||
if ( recognizedListResult == null ) {
|
||||
|
||||
Reference in New Issue
Block a user