Merge remote-tracking branch 'origin/dev2_aiSdk' into dev2_aiSdk

# Conflicts:
#	modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data.json
#	modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json
#	modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_pedestrians.json
This commit is contained in:
董宏宇
2021-04-25 16:56:27 +08:00
15 changed files with 201 additions and 11 deletions

View File

@@ -95,7 +95,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180);
IMogoMarker marker = drawMarker(markerShowEntity);
Log.d("liyz", "renderWarnData marker != null direction = " + data.getDirection());
//识别物
marker.addDynamicAnchorPosition(new MogoLatLng(
data.getDirection() == 1 ? data.getStopLines().get(1).lat : data.getCollisionLat(),

View File

@@ -271,8 +271,6 @@ public class MediaWindow implements MediaView{
}
} else {
if (mWindowPlayPause != null){
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_pause);
}

View File

@@ -662,6 +662,7 @@ public class MockIntentHandler implements IntentHandler {
mLocationMockHandler.sendEmptyMessageDelayed( 101, 100L );
}
public void onAdasCarDataCallback( ADASCarStateInfo stateInfo ) {
if ( stateInfo != null && stateInfo.getValues() != null ) {
JSONObject data = new JSONObject();

View File

@@ -2,9 +2,11 @@ package com.mogo.module.service.marker;
import android.content.Context;
import android.graphics.Rect;
import android.location.Location;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
@@ -12,9 +14,14 @@ import com.mogo.map.MogoLatLng;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.ModuleNames;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.api.CallChatApi;
import com.mogo.module.common.constants.AdasRecognizedType;
import com.mogo.module.common.drawer.AdasRecognizedResultDrawer;
import com.mogo.module.common.drawer.MarkerDrawer;
import com.mogo.module.common.drawer.OnlineCarDrawer;
@@ -25,6 +32,7 @@ import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
import com.mogo.module.common.drawer.marker.OnlineCarMarkerView;
import com.mogo.module.common.entity.MarkerCardResult;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerOnlineCar;
import com.mogo.module.common.entity.MarkerResponse;
import com.mogo.module.common.entity.MarkerShowEntity;
@@ -35,6 +43,7 @@ import com.mogo.module.service.ServiceConst;
import com.mogo.module.service.network.RefreshCallback;
import com.mogo.module.service.network.RefreshModel;
import com.mogo.realtime.api.MoGoAiCloudRealTime;
import com.mogo.realtime.entity.ADASRecognizedResult;
import com.mogo.realtime.entity.MogoSnapshotSetData;
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
@@ -45,6 +54,7 @@ import com.mogo.utils.ThreadPoolService;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.ViewUtils;
import com.mogo.utils.WorkThreadHandler;
import com.mogo.utils.network.utils.GsonUtil;
import com.zhidao.carchattingprovider.ICallChatResponse;
import org.json.JSONArray;
@@ -56,6 +66,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
@@ -153,10 +165,16 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
MarkerServiceHandler.getApis().getAdasControllerApi().addAdasRecognizedDataCallback( resultList -> {
// 绘制近景识别到的车辆
AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( resultList );
//绘制他车的线 lixp TODO
//添加自车的定位图标 TODO
//绘制他车的线 liyz
//添加自车的定位图标,碰撞只有一个预警 TODO
// ADASRecognizedResult result = null;
// for (int i = 0; i < resultList.size(); i++) {
// result = resultList.get(i);
// }
//
// //通过这个传值 ADASRecognizedResult
// MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().setAdasRecognizedResult(GsonUtil.jsonFromObject(result));
} );
}

View File

@@ -80,8 +80,7 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
break;
}
distance.setText(String.valueOf(mV2XWarningEntity.getDistance()) + "");
warningTextView.setText(mV2XWarningEntity.getWarningContent());
mV2XWarningEntity.setTts(0);
warningTextView.setText(mV2XWarningEntity.getWarningContent());//验证云端数据是否
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(mV2XWarningEntity.getTts());
}
//3秒后移除提示弹框