[2.13.2]fix bug of ai cloud data clear and change the color of ai cloud

This commit is contained in:
zhongchao
2023-01-11 21:25:52 +08:00
parent cd80420605
commit 2811116325
10 changed files with 32 additions and 30 deletions

View File

@@ -31,7 +31,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -43,6 +45,7 @@ import com.mogo.och.common.module.utils.AnimatorDrawableUtil;
import com.mogo.och.taxi.R;
import java.util.Arrays;
import java.util.Objects;
import mogo.telematics.pad.MessagePad;
import record_cache.RecordPanelOuterClass;
@@ -176,18 +179,18 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
try {
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
// 2.11.0去掉
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
// 2.11.0去掉
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, TaxiConst.TYPE_MARKER_TAXI_ORDER);
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
} else {
// 2.11.0去掉
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
}

View File

@@ -86,7 +86,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener {
}
else -> {
showAiCloud = false
CallerMapIdentifyManager.clearAiCloudRoma()
MapIdentifySubscriber.instance.clearAiCloudRoma()
}
}
}

View File

@@ -1,16 +1,14 @@
package com.mogo.eagle.core.function.business.identify
import android.annotation.SuppressLint
import android.util.Log
import androidx.collection.ArraySet
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
import com.mogo.map.MogoMarkerManager
import mogo.telematics.pad.MessagePad.PlanningObject
import mogo.telematics.pad.MessagePad.TrackedObject
import mogo.yycp.api.proto.SocketDownData
import java.util.concurrent.ConcurrentHashMap
import mogo.yycp.api.proto.SocketDownData
class IdentifyAiCloudDataDrawer : Identify {
@@ -86,6 +84,7 @@ class IdentifyAiCloudDataDrawer : Identify {
val uuid = "" + data.uuid
mMarkersCaches[uuid] = data
trafficDataUuidList.add(uuid)
Log.d("emArrow","add uuid:${uuid.hashCode()}")
mFilterTrafficData[uuid] = data
}
return mFilterTrafficData
@@ -93,14 +92,14 @@ class IdentifyAiCloudDataDrawer : Identify {
@SuppressLint("NewApi")
override fun clearAiMarker() {
if(trafficDataUuidList.size == 0){
return
}
for (uuid in trafficDataUuidList) {
trafficDataUuidList.clear()
mMarkersCaches.forEach { (uuid, _) ->
mMarkersCaches.remove(uuid)
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
.removeMarker(uuid.hashCode().toString())
Log.d("emArrow","remove uuid:${uuid.hashCode()}")
}
trafficDataUuidList.clear()
mFilterTrafficData.clear()
}
}

View File

@@ -63,8 +63,8 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
try {
if (FunctionBuildConfig.isDrawIdentifyData) {
ThreadUtils.getSinglePool().execute {
aiCloudDataDrawer.renderAiCloudResult(cloudData)
// IdentifyFactory.renderAiCloudResult(cloudData)
// aiCloudDataDrawer.renderAiCloudResult(cloudData)
IdentifyFactory.renderAiCloudResult(cloudData)
}
} else {
clearAiCloudRoma()
@@ -74,9 +74,9 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
}
}
override fun clearAiCloudRoma() {
aiCloudDataDrawer.clearAiMarker()
// IdentifyFactory.clearAiMarker()
fun clearAiCloudRoma() {
// aiCloudDataDrawer.clearAiMarker()
IdentifyFactory.clearAiMarker()
}
override fun onAutopilotIdentifyPlanningObj(planningObjects: List<MessagePad.PlanningObject>?) {

View File

@@ -7,5 +7,4 @@ interface IMoGoIdentifyListener :IProvider{
fun getIdentifyObj(uuid: String): MessagePad.TrackedObject?
fun clearAiCloudRoma()
}

View File

@@ -16,7 +16,4 @@ object CallerMapIdentifyManager : CallerBase() {
return identifyApi.getIdentifyObj(uuid)
}
fun clearAiCloudRoma(){
identifyApi.clearAiCloudRoma()
}
}

View File

@@ -242,11 +242,20 @@ object CallerVisualAngleManager {
PriorityQueue<Record>()
}
private var mLevel:Boolean = false
fun updateLongSightLevel(level:Boolean){
mLevel = level
}
fun changeVisualAngle(current: Scene) {
val appIdentityMode = FunctionBuildConfig.appIdentityMode
if (AppIdentityModeUtils.isBus(appIdentityMode) && AppIdentityModeUtils.isPassenger(appIdentityMode)) {
return
}
if(mLevel){
return
}
val triggerTime = SystemClock.elapsedRealtime()
scope.launch {
Log.d("${M_DEVA}${TAG}", "--- 1 ---")

View File

@@ -1129,7 +1129,7 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void setLockMode(boolean isLock) {
if (checkAMapView()) {
mMapView.getMapAutoViewHelper().setLockMode(true);
mMapView.getMapAutoViewHelper().setLockMode(isLock);
}
}

View File

@@ -122,14 +122,10 @@ public class AMapWrapper implements IMogoMap {
markerOptionsArrayList.add(markerOptions);
}
});
// markerOptionsArrayList.addAll(cwList);
long time = markerOptionsArrayList.get(0).getTime();
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);
// cwList.clear();
}
// private final CopyOnWriteArrayList<MarkerSimpleData> cwList = new CopyOnWriteArrayList<>();
@SuppressLint("NewApi")
@Override
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
@@ -143,7 +139,6 @@ public class AMapWrapper implements IMogoMap {
markerOptionsArrayList.add(markerOptions);
}
});
// cwList.addAll(markerOptionsArrayList);
long time = markerOptionsArrayList.get(0).getTime();
//todo 最后一个参数,是否管理锚点的删除
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);

View File

@@ -156,7 +156,7 @@ public class ObjectUtils {
markerOptions.setLat(aiData.getWgslat());
markerOptions.setLon(aiData.getWgslon());
markerOptions.setTime(Double.valueOf(aiData.getSatelliteTime()).longValue());
markerOptions.setColor("#00000000");
markerOptions.setColor("#00ffd8FF");
} catch (Exception e) {
e.printStackTrace();
}