merge
This commit is contained in:
@@ -6,12 +6,12 @@ import android.content.IntentFilter
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings.System
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.network.ParamsUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
@@ -56,7 +57,6 @@ import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.TOP_CONTAINER_READY
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.v2x.V2XManager
|
||||
import com.mogo.v2x.callback.IV2XCallback
|
||||
@@ -176,12 +176,11 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
*/
|
||||
private fun isAccOn(): Boolean {
|
||||
val accState = System.getInt(context().contentResolver, "mcu_state", -0x02)
|
||||
//Logger.d(MODULE_NAME, "状态发生改变\ndescriptor:ACC_STSTUS" + "\nisTrue:" + accState);
|
||||
//CallerLogger.d("$M_V2X$TAG", "状态发生改变\ndescriptor:ACC_STSTUS" + "\nisTrue:" + accState);
|
||||
return accState == 1
|
||||
}
|
||||
|
||||
private fun handleRoadConditionMarkerClick(marker: IMogoMarker?) {
|
||||
Log.d(TAG, "onMarkerClicked2222") //点击的marker的具体数据
|
||||
//点击的marker的具体数据
|
||||
val exploreWay = extractFromMarker(marker)
|
||||
exploreWay?.let {
|
||||
@@ -238,7 +237,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
|
||||
Logger.d(MODULE_NAME, "状态发生改变\ndescriptor:$descriptor\nisTrue:$isTrue") // 记录状态更改
|
||||
CallerLogger.d("$M_V2X$TAG", "状态发生改变\ndescriptor:$descriptor\nisTrue:$isTrue") // 记录状态更改
|
||||
// 记录状态更改
|
||||
SharedPrefsMgr.getInstance(Utils.getApp()).putBoolean("descriptor_$descriptor", isTrue)
|
||||
if (descriptor == ACC_STATUS) {
|
||||
@@ -280,13 +279,13 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
* 刷新自车求助状态
|
||||
*/
|
||||
private fun initCarForHelpStatus() {
|
||||
Logger.d(MODULE_NAME, "刷新自车求助状态……") //本地查询是否超时
|
||||
CallerLogger.d("$M_V2X$TAG", "刷新自车求助状态……") //本地查询是否超时
|
||||
BridgeApi.refreshModel().getHelpSignal(object : V2XRefreshCallback<V2XSeekHelpRes?> {
|
||||
override fun onSuccess(result: V2XSeekHelpRes?) {
|
||||
if (result != null) {
|
||||
val resultBean = result.result
|
||||
if (resultBean != null) {
|
||||
Logger.d(MODULE_NAME, "刷新自车求助状态 resultBean:$resultBean")
|
||||
CallerLogger.d("$M_V2X$TAG", "刷新自车求助状态 resultBean:$resultBean")
|
||||
val vehicleType: Int = resultBean.vehicleType //故障车
|
||||
if (vehicleType == 4) {
|
||||
refreshMeSeekHelp(true)
|
||||
@@ -304,9 +303,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
|
||||
private fun refreshStrategyConfig() {
|
||||
Logger.w(MODULE_NAME, "刷新V2X中的配置文件")
|
||||
CallerLogger.w("$M_V2X$TAG", "刷新V2X中的配置文件")
|
||||
BridgeApi.refreshModel().getStrategyPush(object : V2XRefreshCallback<V2XStrategyPushRes> {
|
||||
override fun onSuccess(result: V2XStrategyPushRes?) { //Logger.w(MODULE_NAME, "V2X疲劳驾驶配置数据更新:" + GsonUtil.jsonFromObject(result));
|
||||
override fun onSuccess(result: V2XStrategyPushRes?) { //CallerLogger.w("$M_V2X$TAG", "V2X疲劳驾驶配置数据更新:" + GsonUtil.jsonFromObject(result));
|
||||
val resultBean = result?.result
|
||||
if (resultBean != null) { // 更新本地的v2x提醒策略
|
||||
SharedPrefsMgr.getInstance(Utils.getApp()).putString(V2X_STRATEGY_PUSH, GsonUtil.jsonFromObject(resultBean))
|
||||
@@ -341,9 +340,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
pointsOdl[0] = MogoLatLng(location.latitude, location.longitude)
|
||||
v2xPolyline.points = pointsOdl
|
||||
|
||||
//Logger.d(V2XConst.MODULE_NAME, "当前地图的缩放比例为:" + zoomLevel);
|
||||
//CallerLogger.d("$M_V2X$TAG", "当前地图的缩放比例为:" + zoomLevel);
|
||||
val zoomLevel: Float = BridgeApi.mapUiController()?.zoomLevel ?: 0.0f
|
||||
//Logger.d(V2XConst.MODULE_NAME, "当前地图的缩放比例为:" + zoomLevel);
|
||||
//CallerLogger.d("$M_V2X$TAG", "当前地图的缩放比例为:" + zoomLevel);
|
||||
if (zoomLevel > 0 && zoomLevel <= 17 && BridgeApi.v2xStatus()?.isRoadEventWindowShow == false) { // 缩放地图
|
||||
val context: Context = context()
|
||||
MapUtils.zoomMap(v2xStatusManager.targetMoGoLatLng, context)
|
||||
@@ -354,7 +353,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
// // 只有自研车机才有疲劳驾驶检测
|
||||
// if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
|
||||
// V2XAlarmServer.getFatigueDrivingShow(location) { drivingShowEntity ->
|
||||
// Logger.i(V2XConst.MODULE_NAME, "疲劳驾驶POI查询结果为: " + GsonUtil.jsonFromObject(drivingShowEntity))
|
||||
// CallerLogger.i("$M_V2X$TAG", "疲劳驾驶POI查询结果为: " + GsonUtil.jsonFromObject(drivingShowEntity))
|
||||
// val style = if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) "1" else "2"
|
||||
// com.mogo.module.v2x.listener.V2XLocationListener.trackWithType(ALERT_FATIGUE_DRIVING.poiType, drivingShowEntity.getLon(), drivingShowEntity.getLat(), style)
|
||||
// val v2XMessageEntity = V2XMessageEntity<V2XPushMessageEntity>()
|
||||
@@ -370,12 +369,12 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
// 巡航处理
|
||||
val v2XRoadEventEntity = V2XAlarmServer.getDriveFrontAlarmEvent(BridgeApi.v2xMarker()?.v2XRoadEventEntityList, V2XStatusManager.getInstance().location) // 距离是否大于10米 && 消息是否不为空
|
||||
// 距离是否大于10米 && 消息是否不为空
|
||||
if (v2XRoadEventEntity != null && v2XRoadEventEntity.distance >= 5) { // Logger.w(MODULE_NAME,
|
||||
if (v2XRoadEventEntity != null && v2XRoadEventEntity.distance >= 5) { // CallerLogger.w("$M_V2X$TAG",
|
||||
// //"\nV2X预警--当前导航状态:" + V2XServiceManager.getNavi().isNaviing() +
|
||||
// //"\nV2X预警--roadEventIsNullCount:" + roadEventIsNullCount +
|
||||
// "\nV2X预警--当前预警事件:" + v2XRoadEventEntity
|
||||
// );
|
||||
// Logger.w(MODULE_NAME, "V2X预警--前方数据距离:" + v2XRoadEventEntity.getDistance());
|
||||
// CallerLogger.w("$M_V2X$TAG", "V2X预警--前方数据距离:" + v2XRoadEventEntity.getDistance());
|
||||
// 触发展示操作
|
||||
TrackUtils.trackV2xRoadProduceEvent(1)
|
||||
val v2XMessageEntity = V2XMessageEntity<V2XRoadEventEntity>()
|
||||
@@ -401,7 +400,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
V2XSQLiteUtils.saveLocalStory(scenarioType, v2XRoadEventEntity, v2XRoadEventEntity.hashCode())
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Logger.e(TAG, e.message)
|
||||
CallerLogger.e("$M_V2X$TAG", "$e")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,12 +415,12 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
if (historyPath[1] != null && historyPath[0] != null) {
|
||||
val carAngle: Double = DrivingDirectionUtils.getCarAngle(historyPath[1]!!.latitude, historyPath[1]!!.longitude, historyPath[0]!!.latitude, historyPath[0]!!.longitude).toDouble()
|
||||
|
||||
//Logger.d(MODULE_NAME,
|
||||
//CallerLogger.d("$M_V2X$TAG",
|
||||
// "\n车辆经纬度:" + Arrays.toString(historyPath) +
|
||||
// "\n车辆角度:" + carAngle);
|
||||
// 这里是真实的车辆角度
|
||||
location.bearing = carAngle.toFloat()
|
||||
} else { //Logger.e(MODULE_NAME,
|
||||
} else { //CallerLogger.e("$M_V2X$TAG",
|
||||
// "\n首次获取经纬度,默认车头朝北:" + Arrays.toString(historyPath));
|
||||
location.bearing = 0.0f
|
||||
}
|
||||
@@ -438,7 +437,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
override fun onAck(event: V2XEvent) {
|
||||
Logger.d(TAG, "OK->:$event")
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->:$event")
|
||||
when (event) {
|
||||
is V2XEvent.ForwardsWarning -> {
|
||||
handleAdvanceWarningEvent(event)
|
||||
@@ -587,7 +586,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
|
||||
override fun onFail(msg: String) {
|
||||
Logger.e(TAG, "Error: $msg")
|
||||
CallerLogger.e("$M_V2X$TAG", "Error: $msg")
|
||||
}
|
||||
|
||||
override fun onError(code: Int, msg: String?) {}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class V2XAlarmServer {
|
||||
String lastTime = mAlertRoadEventList.get(v2XRoadEventEntity);
|
||||
if (!TextUtils.isEmpty(lastTime)) {
|
||||
long timeSpan = Math.abs(TimeUtils.getTimeSpanByNow(lastTime, TimeConstants.MIN));
|
||||
// Logger.w(MODULE_NAME,
|
||||
// CallerLogger.INSTANCE.w(M_V2X + "V2XAlarmServer",
|
||||
// "V2X预警--事件ID:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n上一次预警时间:" + lastTime +
|
||||
// "\n距离当前时间:" + timeSpan);
|
||||
@@ -81,7 +81,7 @@ public class V2XAlarmServer {
|
||||
}
|
||||
// 进行提醒
|
||||
if (!isAlreadyAlert) {
|
||||
// Logger.w(MODULE_NAME, "V2X预警--车辆与事件信息:" +
|
||||
// CallerLogger.INSTANCE.w(M_V2X + "V2XAlarmServer", "V2X预警--车辆与事件信息:" +
|
||||
// "\n事件详情ID:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n事件详情:" + GsonUtil.jsonFromObject(v2XRoadEventEntity.getNoveltyInfo()) +
|
||||
// "\n距离:" + v2XRoadEventEntity.getDistance() + "米" +
|
||||
@@ -99,7 +99,7 @@ public class V2XAlarmServer {
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
// Logger.w(MODULE_NAME, "V2X预警--事件与车头角度夹角过大:" +
|
||||
// CallerLogger.INSTANCE.w(M_V2X + "V2XAlarmServer", "V2X预警--事件与车头角度夹角过大:" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n当前车辆-经度:" + currentLocation.getLongitude() +
|
||||
// "\n当前车辆-经度:" + currentLocation.getLatitude() +
|
||||
@@ -111,7 +111,7 @@ public class V2XAlarmServer {
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
// Logger.w(MODULE_NAME,
|
||||
// CallerLogger.INSTANCE.w(M_V2X + "V2XAlarmServer",
|
||||
// "V2X预警--车头方向与事件方向角度不一致:" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n车头方向: " + carBearing +
|
||||
@@ -120,13 +120,13 @@ public class V2XAlarmServer {
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
// Logger.w(MODULE_NAME, "V2X预警--车辆距离事件距离大于500米了:" +
|
||||
// CallerLogger.INSTANCE.w(M_V2X + "V2XAlarmServer", "V2X预警--车辆距离事件距离大于500米了:" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n距离:" + v2XRoadEventEntity.getDistance() + "米"
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
// Logger.e(MODULE_NAME,
|
||||
// CallerLogger.INSTANCE.e(M_V2X + "V2XAlarmServer",
|
||||
// "V2X预警--道路事件没有角度信息" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId()
|
||||
// );
|
||||
|
||||
@@ -52,7 +52,7 @@ public class V2XEarlyWarningServer {
|
||||
|
||||
// 封路、施工、拥堵、拥堵 才会有UGC提示
|
||||
if (EventTypeEnum.isNeedRoadEventUgc(v2XRoadEventEntity.getPoiType())) {
|
||||
// Logger.w(MODULE_NAME,
|
||||
// CallerLogger.INSTANCE.d(M_V2X + TAG,
|
||||
// "V2X预警--UGC检测:" +
|
||||
// "\n事件详情:" + roadInfoId +
|
||||
// "\n事件详情:" + EventTypeUtils.getPoiTypeStr(v2XRoadEventEntity.getPoiType()) +
|
||||
@@ -64,7 +64,7 @@ public class V2XEarlyWarningServer {
|
||||
if (!alertMessageId.contains(roadInfoId)) {
|
||||
// 判断车辆行驶角度是否与事件相反,相反的话表示已经行驶过去了
|
||||
if (80 <= eventAngle) {
|
||||
// Logger.w(MODULE_NAME + "_" + TAG, "V2X预警UGC--事件与车头角度夹角过大:" +
|
||||
// CallerLogger.INSTANCE.d(M_V2X + TAG, "V2X预警UGC--事件与车头角度夹角过大:" +
|
||||
// "\n角度:" + eventAngle + " 度" +
|
||||
// "\n事件详情:" + roadInfoId +
|
||||
// "\n库存事件:" + V2XAlarmServer.mAlertRoadEventList.size()
|
||||
|
||||
@@ -52,7 +52,6 @@ public class V2XStatusManager {
|
||||
if (mLocation == null) {
|
||||
mLocation = new MogoLocation();
|
||||
}
|
||||
//Logger.d(V2XConst.MODULE_NAME, "当前车辆位置:" + mLocation.toString());
|
||||
return mLocation;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.manager.impl;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
@@ -45,7 +47,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan
|
||||
colors.add(0x0DE32F46);
|
||||
|
||||
// 线条粗细,渐变,渐变色值
|
||||
Log.d(V2XConst.LOG_NAME_WARN, "MoGoPersonWarnPolylineManager width = " + info.getWidth());
|
||||
CallerLogger.INSTANCE.d(M_V2X + V2XConst.LOG_NAME_WARN, "MoGoPersonWarnPolylineManager width = " + info.getWidth());
|
||||
options.width(info.getWidth()).useGradient(true).colorValues(colors);
|
||||
List<MogoLatLng> locations = info.getLocations();
|
||||
for (int i = 0; i < locations.size(); i++) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.manager.impl;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
@@ -23,7 +25,6 @@ import java.util.List;
|
||||
public class MoGoStopPolylineManager implements IMoGoStopPolylineManager {
|
||||
private static IMogoPolyline mMogoPolyline;
|
||||
|
||||
|
||||
@Override
|
||||
public void drawStopPolyline(Context context, DrawLineInfo info) {
|
||||
if (info == null) {
|
||||
@@ -43,7 +44,7 @@ public class MoGoStopPolylineManager implements IMoGoStopPolylineManager {
|
||||
colors.add(0xD9E32F46);
|
||||
colors.add(0x0DE32F46);
|
||||
|
||||
Log.d(V2XConst.LOG_NAME_WARN, "MoGoStopPolylineManager roadWidth = " + info.getWidth());
|
||||
CallerLogger.INSTANCE.d(M_V2X + V2XConst.LOG_NAME_WARN, "MoGoStopPolylineManager roadWidth = " + info.getWidth());
|
||||
// 线条粗细,渐变,渐变色值
|
||||
// 当前车辆位置
|
||||
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.manager.impl;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_EVENT_ALARM_POI;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -9,6 +9,7 @@ import android.graphics.Bitmap;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
@@ -19,7 +20,6 @@ import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.marker.V2XMarkerAdapter;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.EntityUtilsKt;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ViewUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
@@ -60,14 +60,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
private static final String TAG = "MoGoV2XMarkerManager";
|
||||
|
||||
// 记录所有的:新鲜事儿的道路事件点、探路事件
|
||||
private static CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
||||
private static final CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
||||
// 上次的道路事件的预警Marker
|
||||
private static IMogoMarker mAlarmInfoMarker;
|
||||
private static IMogoMarker m3DMarker;
|
||||
|
||||
@Override
|
||||
public void drawableLastAllPOI() {
|
||||
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||
// 清除连接线
|
||||
IMoGoV2XPolylineManager polylineManager = BridgeApi.INSTANCE.v2xPolyline();
|
||||
if (polylineManager != null) {
|
||||
@@ -114,9 +113,8 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
}
|
||||
}
|
||||
//输出日志查看结果
|
||||
// Log.w(TAG, "V2X===============================");
|
||||
// for (int i = 0; i < roadEventEntities.size(); i++) {
|
||||
// Log.w(TAG, "V2X===" +
|
||||
// CallerLogger.INSTANCE.w(M_V2X + TAG, "V2X===" +
|
||||
// "事件名称:" + roadEventEntities.get(i).getNoveltyInfo() +
|
||||
// "\t 事件距离:" + roadEventEntities.get(i).getDistance());
|
||||
// }
|
||||
@@ -241,7 +239,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
if (v2xStatus != null) {
|
||||
v2xStatus.setRoadEventPOIShow(TAG, true);
|
||||
}
|
||||
//Logger.i(MODULE_NAME, "绘制道路事件====drawableAlarmPOI:");
|
||||
// 清除原来的大而全的新鲜事儿
|
||||
clearALLPOI();
|
||||
if (roadEventEntity.getLocation() != null) {
|
||||
@@ -296,7 +293,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
roadEventEntity.getLocation().getLon()
|
||||
), context);
|
||||
} else {
|
||||
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.manager.impl;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
@@ -12,6 +14,7 @@ import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,7 +24,7 @@ import java.util.List;
|
||||
@Route(path = MoGoV2XServicePaths.PATH_V2X_WARN_POLYLINE_MANAGER)
|
||||
public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
private static IMogoPolyline mMogoPolyline;
|
||||
|
||||
private static final String TAG = "V2XWarningMarker";
|
||||
|
||||
@Override
|
||||
public void drawWarnPolyline(Context context, DrawLineInfo info) {
|
||||
@@ -39,7 +42,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
.setGps(true);
|
||||
List<Integer> colors = new ArrayList<>();
|
||||
|
||||
if (info.isHasStopLines() == true) {
|
||||
if (info.isHasStopLines()) {
|
||||
colors.add(0x0D3036FF);
|
||||
colors.add(0xD93036FF);
|
||||
colors.add(0x0D3036FF);
|
||||
@@ -49,7 +52,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
colors.add(0x0DE32F46);
|
||||
}
|
||||
|
||||
Log.d("V2XWarningMarker", "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
|
||||
// 线条粗细,渐变,渐变色值
|
||||
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
|
||||
List<MogoLatLng> locations = info.getLocations();
|
||||
@@ -76,7 +79,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
mMogoPolyline.remove();
|
||||
mMogoPolyline = null;
|
||||
} else {
|
||||
Log.d("V2XWarningMarker", "mMogoPolyline==null");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "mMogoPolyline==null");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
|
||||
* @see EventTypeEnum
|
||||
*/
|
||||
private fun updateIcon(alarmInfo: V2XRoadEventEntity) {
|
||||
//Logger.d(MODULE_NAME, alarmInfo.toString())
|
||||
// 道路施工、积水、路面结冰、浓雾、事故、拥堵
|
||||
val iconResId = EventTypeEnum.getUpdateIconRes(alarmInfo.poiType)
|
||||
if (iconResId != 0) {
|
||||
|
||||
@@ -5,14 +5,12 @@ import android.text.TextUtils;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XLiveCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XUserInfoRes;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -57,7 +55,6 @@ public class V2XRefreshModel {
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void giveLikeLiveVideo(final V2XRefreshCallback callback, String snStr) {
|
||||
Logger.d(V2XConst.MODULE_NAME, "点赞车机:" + snStr);
|
||||
final Map<String, Object> query = new ParamsProvider.Builder(mContext).build();
|
||||
query.put("data", "{\"sn\":" + snStr + "}");
|
||||
V2XApiServiceFactory.getGeoFenceCarServiceApiService(mContext).giveLikeLiveVideo(query)
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
@@ -38,7 +37,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
try {
|
||||
this.mContext = context;
|
||||
int sceneType = intent.getIntExtra(V2XConst.BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0);
|
||||
Logger.d(TAG, "textPanelOpenType:" + sceneType);
|
||||
|
||||
// 分发场景
|
||||
dispatchSceneTest(sceneType);
|
||||
@@ -54,7 +52,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
* @param sceneType 场景类型
|
||||
*/
|
||||
private void dispatchSceneTest(int sceneType) {
|
||||
Logger.d(TAG, "sceneType=" + sceneType);
|
||||
if (sceneType == 0) {//打开用户信息
|
||||
CallerChatManager.INSTANCE.call(Utils.getApp(), "X20202111230C01");
|
||||
} else if (sceneType == 1) {// 触发道路事件
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.impl;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButton;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XWindow;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.impl;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenarioManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.V2XRoadEventScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.route.V2XOptimalRouteVREventScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.warning.V2XFrontWarningScenario;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
@@ -30,6 +30,7 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
*/
|
||||
public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
private static V2XScenarioManager mV2XScenarioManager;
|
||||
private static final String TAG = "V2XScenarioManager";
|
||||
private AbsV2XScenario mV2XScenario = null;
|
||||
|
||||
private V2XScenarioManager() {
|
||||
@@ -49,7 +50,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
|
||||
@Override
|
||||
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {
|
||||
Logger.d(MODULE_NAME, "处理V2X场景:" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "处理V2X场景:" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
try {
|
||||
synchronized (V2XScenarioManager.class) {
|
||||
// 展示
|
||||
@@ -83,7 +84,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
break;
|
||||
default:
|
||||
mV2XScenario = null;
|
||||
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "当前V2X消息类型未定义。");
|
||||
TipToast.tip("当前V2X消息类型未定义");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.RelativeLayout;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
@@ -27,13 +30,13 @@ public class V2XBasWindow extends RelativeLayout {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
Logger.w(TAG, "onAttachedToWindow……");
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "onAttachedToWindow……");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
Logger.w(TAG, "onDetachedFromWindow……");
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "onDetachedFromWindow……");
|
||||
release();
|
||||
}
|
||||
|
||||
@@ -41,6 +44,6 @@ public class V2XBasWindow extends RelativeLayout {
|
||||
* 这里释放资源
|
||||
*/
|
||||
protected void release() {
|
||||
Logger.w(TAG, "release……");
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "release……");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
|
||||
@@ -12,7 +15,6 @@ import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -34,7 +36,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
@Override
|
||||
public void init(V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity) {
|
||||
try {
|
||||
Logger.d(V2XConst.MODULE_NAME, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent();
|
||||
if (v2XRoadEventEntity != null) {
|
||||
if (v2XMessageEntity.isShowState()) {
|
||||
@@ -115,7 +117,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
Logger.d(V2XConst.MODULE_NAME, "弹窗展示");
|
||||
CallerHmiManager.INSTANCE.showWarning(WarningDirectionEnum.ALERT_WARNING_TOP, TimeUnit.HOURS.toMillis(1));
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
if (entity != null && entity.isNeedAddLine()) {
|
||||
@@ -125,7 +126,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
Logger.d(V2XConst.MODULE_NAME, "弹窗消失");
|
||||
CallerHmiManager.INSTANCE.dismissWarning(WarningDirectionEnum.ALERT_WARNING_TOP);
|
||||
clearPOI();
|
||||
release();
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.route;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.observer.V2XOptimalRouteObserver;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -21,7 +22,7 @@ public class V2XOptimalRouteVREventMarker implements IV2XMarker<V2XOptimalRouteD
|
||||
|
||||
@Override
|
||||
public void drawPOI(V2XOptimalRouteDataRes entity) {
|
||||
Logger.d(V2XConst.MODULE_NAME + "_" + TAG, "drawPOI 绘制VR Marker");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "drawPOI 绘制VR Marker");
|
||||
|
||||
try {
|
||||
// 清除道路事件
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.route;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -33,14 +36,14 @@ public class V2XOptimalRouteVREventScenario
|
||||
|
||||
@Override
|
||||
public void init(@Nullable V2XMessageEntity<V2XOptimalRouteDataRes> v2XMessageEntity) {
|
||||
Logger.w(V2XConst.MODULE_NAME + "_" + TAG, "处理推送VR:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "处理推送VR:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
if (!isSameScenario(v2XMessageEntity)) {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
show();
|
||||
} else {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
show();
|
||||
Logger.w(V2XConst.MODULE_NAME + "_" + TAG, "要处理的场景已经存在,丢弃这次初始化");
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "要处理的场景已经存在,丢弃这次初始化");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
@@ -12,6 +14,7 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
@@ -26,10 +29,10 @@ import java.util.concurrent.TimeUnit;
|
||||
* @description 车路云—场景预警-V1.0 前车/行人/摩托车/盲区碰撞预警
|
||||
* @since: 2021/3/24
|
||||
*/
|
||||
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapLocationListener, IMoGoWarningStatusListener {
|
||||
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapLocationListener, IMoGoWarningStatusListener {
|
||||
private static final String TAG = "V2XWarningMarker";
|
||||
private static final V2XWarningMarker sV2XWarningMarker = new V2XWarningMarker();
|
||||
private V2XWarningEntity mMarkerEntity;
|
||||
static private V2XWarningMarker sV2XWarningMarker = new V2XWarningMarker();
|
||||
|
||||
private WarningDirectionEnum mDirection;
|
||||
|
||||
@@ -39,7 +42,7 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
|
||||
@Override
|
||||
public void init(@Nullable V2XMessageEntity v2XMessageEntity) {
|
||||
Log.d(TAG, "----- init -----:\n" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- init -----:\n" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
try {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
if (v2XMessageEntity != null && v2XMessageEntity.getContent() instanceof V2XWarningEntity) {
|
||||
@@ -53,9 +56,9 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
Log.d(TAG, "----- show --- 1 --:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- show --- 1 --:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
|
||||
if (mMarkerEntity != null) {
|
||||
Log.d(TAG, "----- show --- 2 --:\n" + mMarkerEntity);
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- show --- 2 --:\n" + mMarkerEntity);
|
||||
int v2xType = getV2XTypeForFrontWarning(mMarkerEntity);
|
||||
V2XMessageEntity entity = getV2XMessageEntity();
|
||||
if (v2xType != 0) {
|
||||
@@ -93,13 +96,13 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
IV2XMarker marker = getV2XMarker();
|
||||
if (marker != null && mMarkerEntity != null) {
|
||||
marker.drawPOI(mMarkerEntity);
|
||||
Log.d(TAG, "drawPOI");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "drawPOI");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
Log.d(TAG, "----- clearPOI -----");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- clearPOI -----");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_FRONT_WARNING_MARKER;
|
||||
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
|
||||
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
|
||||
@@ -24,6 +23,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.drawer.V2XWarnDataDrawer;
|
||||
import com.mogo.module.common.entity.V2XWarningEntity;
|
||||
import com.mogo.module.common.utils.Trigonometric;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -35,10 +35,10 @@ import java.util.List;
|
||||
*/
|
||||
public class V2XWarningMarker implements IV2XMarker {
|
||||
private static final String TAG = "V2XWarningMarker";
|
||||
private static String WARNING_ARROWS = "WARNING_ARROWS";
|
||||
private static final String WARNING_ARROWS = "WARNING_ARROWS";
|
||||
private V2XWarningEntity mCloundWarningInfo;
|
||||
private boolean isSelfLineClear = true;//绘制线是否已被清除
|
||||
private List fillPoints = new ArrayList();//停止线经纬度合集
|
||||
private final List fillPoints = new ArrayList();//停止线经纬度合集
|
||||
private boolean isFirstLocation = false;
|
||||
private MogoLatLng carLocation = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
@@ -56,12 +56,12 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
@Override
|
||||
public void drawPOI(Object entity) {
|
||||
try {
|
||||
Log.d(TAG, "===drawPOI");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "===drawPOI");
|
||||
mCloundWarningInfo = (V2XWarningEntity) entity;
|
||||
drawLineWithEntity();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, e.toString());
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -112,14 +112,14 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
|
||||
//handleStopLine();
|
||||
}, 0);
|
||||
Log.d(TAG, "显示时间为++" + String.valueOf(showTime) + "识别物类型:" +
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "显示时间为++" + showTime + "识别物类型:" +
|
||||
String.valueOf(mCloundWarningInfo.getType()));
|
||||
|
||||
} else { //无停止线
|
||||
Log.d(TAG, "无停止线");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "无停止线");
|
||||
WorkThreadHandler.getInstance().postDelayed(() -> {
|
||||
/* 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
|
||||
Log.d(TAG, "无停止线" + mCloundWarningInfo.toString());
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "无停止线" + mCloundWarningInfo.toString());
|
||||
//绘制识别物与交汇点连线,并且更新连线数据
|
||||
drawOtherObjectLine(mCloundWarningInfo);
|
||||
//二轮车和行人的渲染和移动
|
||||
@@ -127,7 +127,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
if (carLocation.lat != 0 && carLocation.lon != 0) {
|
||||
drawSelfCarLine(carLocation.lon, carLocation.lat, bearing);
|
||||
} else {
|
||||
Log.d(TAG, "数据为空carLocation == null");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "数据为空carLocation == null");
|
||||
}
|
||||
*/
|
||||
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo);
|
||||
@@ -145,7 +145,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
MogoLatLng startLatLng = new MogoLatLng(carLocation.lat, carLocation.lon);
|
||||
MogoLatLng endLatLng = new MogoLatLng(middleLocationInStopLine.lat, middleLocationInStopLine.lon);
|
||||
double angle = Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat);
|
||||
Log.d(TAG, "angle==" + String.valueOf(angle));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "angle==" + String.valueOf(angle));
|
||||
return angle;
|
||||
}
|
||||
|
||||
@@ -158,14 +158,14 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
startLatLng, MogoLatLng mogoLatLng) {
|
||||
if (info != null) {
|
||||
double angle = Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, mogoLatLng.lon, mogoLatLng.lat);
|
||||
Log.d(TAG, "angle==drawRedWarningLineFrontOfStopLine:" + String.valueOf(angle));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "angle==drawRedWarningLineFrontOfStopLine:" + String.valueOf(angle));
|
||||
IMoGoStopPolylineManager stopPolyLineMnager = BridgeApi.INSTANCE.v2xStopPolyline();
|
||||
if (stopPolyLineMnager != null) {
|
||||
IMogoPolyline polyLine = stopPolyLineMnager.getMogoStopPolyline();
|
||||
MogoLatLng endLatlng = new MogoLatLng(mogoLatLng.lat, mogoLatLng.lon);
|
||||
MogoLatLng addMiddleLoc = Trigonometric.getNewLocation(startLatLng, 25, angle);
|
||||
if (polyLine != null) {
|
||||
Log.d(TAG, "drawStopLine polyLine != null");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "drawStopLine polyLine != null");
|
||||
polyLine.setPoints(Arrays.asList(startLatLng, addMiddleLoc, endLatlng));
|
||||
polyLine.setTransparency(0.5f);
|
||||
} else {
|
||||
@@ -176,11 +176,11 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
locations.add(endLatlng);
|
||||
lineInfo.setLocations(locations);
|
||||
lineInfo.setHeading(info.heading);
|
||||
Log.d(TAG, "drawStopLine width = " + info.getRoadwidth());
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "drawStopLine width = " + info.getRoadwidth());
|
||||
lineInfo.setWidth(info.getRoadwidth() * 14 + 5);
|
||||
stopPolyLineMnager.drawStopPolyline(BridgeApi.INSTANCE.context(), lineInfo);
|
||||
}
|
||||
Log.d(TAG, "停止线前方50m区域的三个坐标点是:" + startLatLng.lon + "," + startLatLng.lat +
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "停止线前方50m区域的三个坐标点是:" + startLatLng.lon + "," + startLatLng.lat +
|
||||
"中间点坐标:" + addMiddleLoc.lon + "," + addMiddleLoc.lat
|
||||
+ "终点" + endLatlng.lon + "," + endLatlng.lat);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
|
||||
public void clearAllLine() {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
Log.d(TAG, "清除所有预警线的时间是:" + String.valueOf(showTime));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "清除所有预警线的时间是:" + String.valueOf(showTime));
|
||||
//清除识别物到碰撞点预警线
|
||||
IMoGoPersonWarnPolylineManager personStopPolyLineManager = BridgeApi.INSTANCE.v2xPersonWarnPolyline();
|
||||
if (personStopPolyLineManager != null) {
|
||||
@@ -243,10 +243,10 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
}
|
||||
fillPoints.add(y);
|
||||
} else {
|
||||
Log.d(TAG, "停止线数据不存在");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "停止线数据不存在");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, "Exception");
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "exception : " + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
* */
|
||||
private MogoLatLng getMiddleLocationInStopLine() {
|
||||
if (carLocation.lat == 0 || carLocation.lon == 0) {
|
||||
Log.d(TAG, "获取不到车的位置");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "获取不到车的位置");
|
||||
}
|
||||
MogoLatLng newLocation = new MogoLatLng(0, 0);
|
||||
if (mCloundWarningInfo != null && mCloundWarningInfo.getStopLines() != null && mCloundWarningInfo.getStopLines().size() > 1) {
|
||||
@@ -296,7 +296,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
double angle = Trigonometric.getAngle(x.lon, x.lat, y.lon, y.lat);
|
||||
newLocation = Trigonometric.getNewLocation(x, distance * 0.5, angle);
|
||||
} else {
|
||||
Log.d(TAG, "停止线返回坐标点数量不正确" + String.valueOf(mCloundWarningInfo.getStopLines().size()));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "停止线返回坐标点数量不正确" + mCloundWarningInfo.getStopLines().size());
|
||||
}
|
||||
return newLocation;
|
||||
}
|
||||
@@ -308,7 +308,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
* lat 自车纬度
|
||||
*/
|
||||
public void drawSelfCarLine(double lon, double lat, float bearing) {
|
||||
Log.d(TAG, "drawSelfCarLine");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "drawSelfCarLine");
|
||||
if (!isSelfLineClear) {
|
||||
if (mCloundWarningInfo != null) {
|
||||
IMoGoWarnPolylineManager warnPolyLineManager = BridgeApi.INSTANCE.v2xWarnPolyline();
|
||||
@@ -334,7 +334,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
//扩展点为了渐变色添加
|
||||
addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2,
|
||||
Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat));
|
||||
Log.d(TAG, "angle==扩展点为了渐变色添加:" +
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "angle==扩展点为了渐变色添加:" +
|
||||
String.valueOf(Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat)));
|
||||
if (mogoPolyline != null) {
|
||||
mogoPolyline.setPoints(Arrays.asList(startLatlng, addMiddleLoc, endLatlng));
|
||||
@@ -352,9 +352,9 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
info.setHasStopLines(mCloundWarningInfo.getStopLines().size() > 0);
|
||||
}
|
||||
warnPolyLineManager.drawWarnPolyline(BridgeApi.INSTANCE.context(), info);
|
||||
Log.d(TAG, "自车前方第一条线" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "自车前方第一条线" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
|
||||
}
|
||||
Log.d(TAG, "自车为起点绘制 自车;" + startLatlng.lon + "," + startLatlng.lat +
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "自车为起点绘制 自车;" + startLatlng.lon + "," + startLatlng.lat +
|
||||
"中间扩展点" + addMiddleLoc.lon + "," + addMiddleLoc.lat + "终点:" + endLatlng.lon + "," + endLatlng.lat);
|
||||
} else {
|
||||
clearAllLine();
|
||||
@@ -367,7 +367,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
*/
|
||||
private void drawOtherObjectLine(V2XWarningEntity info) {
|
||||
if (info != null) {
|
||||
Log.d(TAG, "info != null");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "info != null");
|
||||
IMoGoPersonWarnPolylineManager personWarnPolylineManager = BridgeApi.INSTANCE.v2xPersonWarnPolyline();
|
||||
if (personWarnPolylineManager == null) {
|
||||
return;
|
||||
@@ -379,7 +379,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
MogoLatLng addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2,
|
||||
Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat));//补点
|
||||
if (polyLine != null) {
|
||||
Log.d(TAG, "目标物与碰撞点连线 != null");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "目标物与碰撞点连线 != null");
|
||||
polyLine.setPoints(Arrays.asList(startLatlng, addMiddleLoc, endLatlng));
|
||||
polyLine.setTransparency(0.5f);
|
||||
} else {
|
||||
@@ -394,10 +394,10 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
lineInfo.setHeading(info.heading);
|
||||
lineInfo.setWidth(info.getRoadwidth() * 14 + 5);
|
||||
personWarnPolylineManager.drawPersonWarnPolyline(BridgeApi.INSTANCE.context(), lineInfo);
|
||||
Log.d(TAG, "目标物与预碰撞点画线点为" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "目标物与预碰撞点画线点为" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "info == null");
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "info == null");
|
||||
clearAllLine();
|
||||
}
|
||||
}
|
||||
@@ -407,14 +407,14 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
float distance = CoordinateUtils.calculateLineDistance(
|
||||
startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat);
|
||||
double rotate = Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat);
|
||||
Log.d(TAG, "添加小箭头--目标物与预碰撞点之间的距离是" + String.valueOf(distance));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "添加小箭头--目标物与预碰撞点之间的距离是" + String.valueOf(distance));
|
||||
if (distance > 5) {
|
||||
int count = (int) (distance / 5);
|
||||
for (int i = 0; i < count; i++) {
|
||||
MogoLatLng newLo = Trigonometric.getNewLocation(
|
||||
startLatLng, 5 * (i + 1), Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat));
|
||||
V2XWarnDataDrawer.getInstance().drawerArrowsMarkerWithLocation(newLo, WARNING_ARROWS, 10, new Double(rotate).intValue());
|
||||
Log.d(TAG, "小箭头位置" + newLo);
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "小箭头位置" + newLo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
|
||||
//drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
|
||||
}
|
||||
Log.d(TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -11,12 +11,11 @@ import androidx.annotation.Nullable;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -54,7 +53,7 @@ public class ADASUtils {
|
||||
try {
|
||||
Intent intent = new Intent("com.mogo.launcher.v2x");
|
||||
intent.putExtra("v2x_warning_type", alarmMessage.getSceneId());
|
||||
intent.putExtra("v2x_warining_timeout", alarmMessage.getExpireTime());
|
||||
intent.putExtra("v2x_warning_timeout", alarmMessage.getExpireTime());
|
||||
intent.putExtra("v2x_warning_tts", alarmMessage.getTts());
|
||||
intent.putExtra("v2x_warning_info", alarmMessage.getAlarmContent());
|
||||
context.sendBroadcast(intent);
|
||||
@@ -64,7 +63,7 @@ public class ADASUtils {
|
||||
speakTTSVoice(alarmMessage.getTts(), null);
|
||||
}
|
||||
|
||||
Logger.i(MODULE_NAME, "向ADAS分发服务器下发的事件," + alarmMessage.toString());
|
||||
CallerLogger.INSTANCE.i(M_V2X + "ADASUtils", "向ADAS分发服务器下发的事件," + alarmMessage.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class ADASUtils {
|
||||
|
||||
public static void speakTTSVoice(@Nullable String msg, IMogoVoiceCmdCallBack callBack) {
|
||||
if (!TextUtils.isEmpty(msg)) {
|
||||
Logger.w(V2XConst.MODULE_NAME, "调用TTS播放语音:" + msg);
|
||||
CallerLogger.INSTANCE.w(M_V2X + "ADASUtils", "调用TTS播放语音:" + msg);
|
||||
AIAssist.getInstance(Utils.getApp()).speakTTSVoice(msg, VoicePreemptType.PREEMPT_TYPE_IMMEADIATELY, callBack);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ public class DrivingDirectionUtils {
|
||||
int poiAngle = 0;
|
||||
// 以子午线作为y轴 计算两点的余切 再将余切值转化为角度
|
||||
double _angle = Math.atan2(Math.abs(carLon - poiLon), Math.abs(carLat - poiLat)) * (180 / PI);
|
||||
//Log.w(MODULE_NAME, "getDegreeOfCar2Poi_计算车辆行驶方向 与 poi点到车辆的连线 间的夹角_angle===" + _angle);
|
||||
if (poiLon > carLon) {
|
||||
// poi 在 车辆位置的第1象限
|
||||
if (poiLat > carLat) {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
@@ -9,7 +12,6 @@ import com.mogo.eagle.core.utilcode.constant.TimeConstants;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -46,7 +48,7 @@ public class FatigueDrivingUtils {
|
||||
// 获取 ACC ON 时间
|
||||
String localAccONTime = SharedPrefsMgr.getInstance(Utils.getApp())
|
||||
.getString(V2XConst.V2X_ACC_ON_TIME_STR);
|
||||
Logger.d(V2XConst.MODULE_NAME, "ACC ON时间:" + localAccONTime);
|
||||
CallerLogger.INSTANCE.d(M_V2X + "FatigueDrivingUtils", "ACC ON时间:" + localAccONTime);
|
||||
|
||||
// 如果本地没有记录时间则记录
|
||||
if (!TextUtils.isEmpty(localAccONTime)) {
|
||||
@@ -63,7 +65,7 @@ public class FatigueDrivingUtils {
|
||||
if (!TextUtils.isEmpty(accOFFTime)) {
|
||||
// 比较开关机时间,如果acc of 比 acc on 时间还要靠近说明acc on 时间记录有问题,需要更新同步
|
||||
long timeSpan = TimeUtils.getTimeSpan(accOnTime, accOFFTime, TimeConstants.MIN);
|
||||
Logger.d(V2XConst.MODULE_NAME, "开关机时间间隔:" + timeSpan);
|
||||
CallerLogger.INSTANCE.d(M_V2X + "FatigueDrivingUtils", "开关机时间间隔:" + timeSpan);
|
||||
if (timeSpan >= strategyPushEntity.getRestIgnoreMinutes()) {
|
||||
// 记录开机时间
|
||||
SharedPrefsMgr.getInstance(Utils.getApp())
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import android.util.Log;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
@@ -61,10 +62,10 @@ public class LocationUtils {
|
||||
carLon, carLat, poiLon, poiLat, (int) carAngle);
|
||||
|
||||
if (diffAngle <= 90) {
|
||||
Log.i(TAG, "目标点在车辆--前方");
|
||||
CallerLogger.INSTANCE.i(M_V2X + TAG, "目标点在车辆--前方");
|
||||
return true;
|
||||
} else {
|
||||
Log.i(TAG, "目标点在车辆--后方");
|
||||
CallerLogger.INSTANCE.i(M_V2X + TAG, "目标点在车辆--后方");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ class MapUtils {
|
||||
if (latLng == null) {
|
||||
return
|
||||
}
|
||||
//Logger.d(V2XConst.MODULE_NAME, "重新调整地图缩放比:" + latLng);
|
||||
val mBoundRect = Rect()
|
||||
val paddingTop: Int
|
||||
val paddingBottom: Int
|
||||
@@ -46,9 +45,7 @@ class MapUtils {
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon
|
||||
)
|
||||
// 调整自适应的地图镜头
|
||||
carLocation?.let {
|
||||
BridgeApi.mapUiController()?.showBounds("MapUtils", it, listOf(latLng), mBoundRect, true)
|
||||
}
|
||||
BridgeApi.mapUiController()?.showBounds("MapUtils", carLocation, listOf(latLng), mBoundRect, true)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
@@ -190,7 +188,6 @@ public class TestOnLineCarUtils {
|
||||
|
||||
// 加载数据源
|
||||
V2XWarningEntity warningEntity = GsonUtil.objectFromJson(baos.toString(), V2XWarningEntity.class);
|
||||
Log.d("XXX", GsonUtil.jsonFromObject(warningEntity));
|
||||
V2XMessageEntity messageEntity = new V2XMessageEntity();
|
||||
messageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS);
|
||||
messageEntity.setContent(warningEntity);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.sqlite.SQLIDao;
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
@@ -93,7 +94,6 @@ public class V2XSQLiteUtils {
|
||||
public static void updateScenarioHistoryData(V2XHistoryScenarioData oldScenarioData, V2XHistoryScenarioData newScenarioData) {
|
||||
try {
|
||||
int result = getScenarioHistoryDao().update(oldScenarioData, newScenarioData);
|
||||
Logger.d(V2XConst.MODULE_NAME, "修改数据成功:" + result);
|
||||
//V2XEventPanelFragment.Companion.getInstance().changeEventCount();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -133,7 +133,7 @@ public class V2XSQLiteUtils {
|
||||
if (!TimeUtils.isToday(triggerTime)) {
|
||||
int result = getScenarioHistoryDao().delete(historyScenarioDatum);
|
||||
if (result > 0) {
|
||||
Logger.d(V2XConst.MODULE_NAME, "删除过期数据成功");
|
||||
CallerLogger.INSTANCE.d(M_V2X + "V2XSQLiteUtils", "删除过期数据成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ public class V2XSQLiteUtils {
|
||||
public static void saveLocalStory(int scenarioType, Object markerExploreWay, int hashCode) {
|
||||
try {
|
||||
|
||||
Logger.d(V2XConst.MODULE_NAME, "saveLocalStory:" + markerExploreWay);
|
||||
CallerLogger.INSTANCE.d(M_V2X + "V2XSQLiteUtils", "saveLocalStory:" + markerExploreWay);
|
||||
|
||||
// 进行数据库存储
|
||||
V2XHistoryScenarioData v2XHistoryScenarioData = new V2XHistoryScenarioData();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.view;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PorterDuff;
|
||||
@@ -16,6 +18,7 @@ import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
@@ -24,7 +27,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.eagle.core.widget.RoundLayout;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
@@ -82,13 +84,12 @@ public class CarZegoLiveVideoView extends RoundLayout {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoice(AbsMogoApplication.getApp().getString(R.string.v2x_voice_see_front_car_live));
|
||||
playLiveVideo();
|
||||
mClLoadError.setVisibility(GONE);
|
||||
Logger.d(TAG, "startLive");
|
||||
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "startLive");
|
||||
} else {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoice(AbsMogoApplication.getApp().getString(R.string.v2x_voice_see_front_car_live_error));
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
Logger.d(TAG, "没有找到可直播车机");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "没有找到可直播车机");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +108,7 @@ public class CarZegoLiveVideoView extends RoundLayout {
|
||||
MoGoAiCloudTrafficLive.viewFrontVehicleLive(mogoLocation.getLatitude(), mogoLocation.getLongitude(), ((int) mogoLocation.getBearing()), mSurfaceView, new ITrafficCarLiveCallBack() {
|
||||
@Override
|
||||
public void onLive(String liveSn) {
|
||||
Logger.d(TAG, "onLive");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "onLive");
|
||||
if (!TextUtils.isEmpty(liveSn)) {
|
||||
CarZegoLiveVideoView.this.liveSn = liveSn;
|
||||
}
|
||||
@@ -118,7 +119,7 @@ public class CarZegoLiveVideoView extends RoundLayout {
|
||||
|
||||
@Override
|
||||
public void onDisConnect() {
|
||||
Logger.d(TAG, "失去连接onDisConnect");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "失去连接onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,11 +143,11 @@ public class CarZegoLiveVideoView extends RoundLayout {
|
||||
|
||||
public void stopLive() {
|
||||
try {
|
||||
Logger.w(TAG, "心跳:关闭直播...");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "心跳:关闭直播...");
|
||||
if (!TextUtils.isEmpty(liveSn)) {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn);
|
||||
} else {
|
||||
Logger.e(TAG, "直播 liveSn is null");
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "直播 liveSn is null");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.mogo.module.v2x.view
|
||||
package com.mogo.eagle.core.function.v2x.events.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
@@ -10,7 +9,6 @@ import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.mogo.eagle.core.function.v2x.R
|
||||
import com.mogo.module.common.glide.SkinAbleBitmapTarget
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
@@ -162,14 +160,12 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
|
||||
@Suppress("DEPRECATION")
|
||||
mAudioManager.abandonAudioFocus(onAudioFocusChangeListener)
|
||||
} catch (e: Exception) {
|
||||
Logger.e(TAG, e, "onDetachedFromWindow - abandonAudioFocus")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
super.onClick(v)
|
||||
Log.d("kl", "onClick160" + mCurrentState)
|
||||
if (mCurrentState == CURRENT_STATE_PAUSE) {
|
||||
onVideoResume()
|
||||
} else if (mCurrentState == CURRENT_STATE_PLAYING) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.view;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer.PLAY_EVT_PLAY_BEGIN;
|
||||
import static com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer.PLAY_EVT_PLAY_LOADING;
|
||||
import android.content.Context;
|
||||
@@ -19,6 +19,7 @@ import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
|
||||
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
@@ -29,7 +30,6 @@ import com.mogo.eagle.core.widget.RoundLayout;
|
||||
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.module.common.entity.MarkerCarInfo;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory;
|
||||
@@ -84,7 +84,7 @@ public class V2XCrossRoadVideoView extends RoundLayout {
|
||||
|
||||
public V2XCrossRoadVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
Logger.d(TAG, "constructor invoke initView");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "constructor invoke initView");
|
||||
initView(context);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class V2XCrossRoadVideoView extends RoundLayout {
|
||||
if (init) {
|
||||
return;
|
||||
}
|
||||
Logger.d("V2XCrossRoadVideoView", "V2X===初始化语音呼叫路口直播视图");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "V2X===初始化语音呼叫路口直播视图");
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.view_video_layout_see_crossroad, this);
|
||||
//mPlayerView 即 step1 中添加的界面 view
|
||||
@@ -178,13 +178,13 @@ public class V2XCrossRoadVideoView extends RoundLayout {
|
||||
setCarLiveInfo(carLiveInfo);
|
||||
playLiveVideo(carLiveInfo);
|
||||
} else {
|
||||
Logger.d(MODULE_NAME, "startLive 路口实况直播地址为空");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "startLive 路口实况直播地址为空");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.d(MODULE_NAME, "获取路口实况失败");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "获取路口实况失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class V2XCrossRoadVideoView extends RoundLayout {
|
||||
private void playLiveVideo(MarkerCarInfo.CarLiveInfo carLiveInfo) {
|
||||
if (mTxcVideoView != null) {
|
||||
mTxcVideoView.setPlayListener(event -> {
|
||||
Logger.w(MODULE_NAME, "播放器:onPlayEvent==" + event);
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "播放器:onPlayEvent==" + event);
|
||||
if (event == PLAY_EVT_PLAY_LOADING) {
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
@@ -226,7 +226,7 @@ public class V2XCrossRoadVideoView extends RoundLayout {
|
||||
|
||||
public void stopLive() {
|
||||
try {
|
||||
Logger.w(MODULE_NAME, "关闭直播...");
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "关闭直播...");
|
||||
GSYVideoManager.releaseAllVideos();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.view;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -16,6 +16,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
|
||||
@@ -24,7 +25,6 @@ import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.eagle.core.widget.RoundLayout;
|
||||
import com.mogo.module.common.entity.MarkerCarInfo;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.tencent.rtmp.ITXLivePlayListener;
|
||||
import com.tencent.rtmp.TXLiveConstants;
|
||||
import com.tencent.rtmp.TXLivePlayConfig;
|
||||
@@ -139,7 +139,7 @@ public class V2XLiveGSYVideoView extends RoundLayout {
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
// Logger.i(MODULE_NAME,
|
||||
// CallerLogger.INSTANCE.i(M_V2X + TAG,
|
||||
// "直播信息= " + GsonUtil.jsonFromObject(carLiveInfo) +
|
||||
// "\n播放器:onPlayEvent==" + event +
|
||||
// "\nbundle===" + bundle);
|
||||
@@ -165,7 +165,7 @@ public class V2XLiveGSYVideoView extends RoundLayout {
|
||||
|
||||
@Override
|
||||
public void onNetStatus(Bundle bundle) {
|
||||
// Logger.i(MODULE_NAME, "播放器:onNetStatus===bundle===" + bundle);
|
||||
// CallerLogger.INSTANCE.i(M_V2X + TAG, "播放器:onNetStatus===bundle===" + bundle);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -173,13 +173,13 @@ public class V2XLiveGSYVideoView extends RoundLayout {
|
||||
e.printStackTrace();
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
Logger.e(MODULE_NAME, "直播发生异常:carLiveInfo= " + GsonUtil.jsonFromObject(carLiveInfo));
|
||||
CallerLogger.INSTANCE.e(M_V2X + TAG, "直播发生异常:carLiveInfo= " + GsonUtil.jsonFromObject(carLiveInfo));
|
||||
}
|
||||
}
|
||||
|
||||
public void stopLive(MarkerCarInfo.CarLiveInfo carLiveInfo) {
|
||||
try {
|
||||
//Logger.i(MODULE_NAME, "心跳:关闭直播...");
|
||||
//CallerLogger.INSTANCE.i(M_V2X + TAG, "心跳:关闭直播...");
|
||||
// 暂停
|
||||
mLivePlayer.pause();
|
||||
// true 代表清除最后一帧画面
|
||||
@@ -196,12 +196,12 @@ public class V2XLiveGSYVideoView extends RoundLayout {
|
||||
// .livePush(new V2XRefreshCallback<V2XLivePushVoRes>() {
|
||||
// @Override
|
||||
// public void onSuccess(V2XLivePushVoRes result) {
|
||||
// Logger.d(MODULE_NAME, "播放器:" + result);
|
||||
// CallerLogger.INSTANCE.d(M_V2X + TAG, "播放器:" + result);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail(String msg) {
|
||||
// Logger.e(MODULE_NAME, "播放器:" + msg);
|
||||
// CallerLogger.INSTANCE.e(M_V2X + TAG, "播放器:" + msg);
|
||||
// }
|
||||
// }, carLiveInfo.getVideoSn(), 1);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -6,9 +6,7 @@ import android.text.TextUtils
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME
|
||||
import com.mogo.service.intent.IMogoIntentListener
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@@ -118,12 +116,10 @@ object V2XVoiceManager : IMogoVoiceCmdCallBack, IMogoIntentListener {
|
||||
}
|
||||
|
||||
override fun onIntentReceived(command: String?, intent: Intent?) {
|
||||
Logger.d(MODULE_NAME, "v2x voice command= $command")
|
||||
voiceCallbackMap[command]?.onCallback(command, intent)
|
||||
}
|
||||
|
||||
override fun onCmdSelected(cmd: String?) {
|
||||
Logger.d(MODULE_NAME, "v2x voice command== onCmdSelected $cmd")
|
||||
voiceCallbackMap[cmd]?.onCallback(cmd, null)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
package com.mogo.eagle.core.function.v2x.redlightwarning
|
||||
|
||||
import android.location.Location
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrentRoadTrafficLight
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
@@ -44,9 +45,9 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
// 到路口100m时回调
|
||||
Logger.d(TAG, "处理路口交通数据:是否是第一次处理:${isFirst}是否进入路口:${isEnter}")
|
||||
CallerLogger.d("$M_V2X$TAG", "处理路口交通数据:是否是第一次处理:${isFirst}是否进入路口:${isEnter}")
|
||||
if (trafficLightResult.currentRoadIsRight()) {
|
||||
Logger.d(TAG,"当前道路右转,不处理")
|
||||
CallerLogger.d("$M_V2X$TAG","当前道路右转,不处理")
|
||||
return
|
||||
}
|
||||
if (isFirst && !isEnter) {
|
||||
@@ -58,7 +59,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
}
|
||||
|
||||
override fun onEnterCrossRoad(enter: Boolean) {
|
||||
Logger.d(TAG, "回调是否进入路口:$enter")
|
||||
CallerLogger.d("$M_V2X$TAG", "回调是否进入路口:$enter")
|
||||
isEnter = enter
|
||||
if (enter) {
|
||||
isFirst = true
|
||||
@@ -85,7 +86,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
) {
|
||||
// 如果是Vip则不处理
|
||||
if (vip) {
|
||||
Logger.w(TAG, "Vip用户不处理闯红灯、绿灯通行预警逻辑!")
|
||||
CallerLogger.w("$M_V2X$TAG", "Vip用户不处理闯红灯、绿灯通行预警逻辑!")
|
||||
return
|
||||
}
|
||||
// 路口100m闯红灯预警
|
||||
@@ -93,7 +94,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
// 单位m/s
|
||||
val speed = it.speed
|
||||
// 车停止或者速度非常慢,可能返回负数或者很小的值,需要过滤
|
||||
Logger.d(TAG, "speed is:$speed")
|
||||
CallerLogger.d("$M_V2X$TAG", "speed is:$speed")
|
||||
if (speed <= 2.5f) return// 小于等于9km/h不处理
|
||||
// 由于到路口100m时回调不准,手动计算直线距离
|
||||
val distance = MogoApisHandler.getInstance().apis.mapServiceApi
|
||||
@@ -101,20 +102,20 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
MogoLatLng(it.latitude, it.longitude),
|
||||
MogoLatLng(trafficLightResult.lat, trafficLightResult.lon)
|
||||
)
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"路口经度为:${trafficLightResult.lon},纬度为:${trafficLightResult.lat};车的经度为:${it.longitude},纬度为:${it.latitude};两点距离为:${distance}"
|
||||
)
|
||||
val remainTime = trafficLightStatus.remain
|
||||
val arriveTime = distance / speed
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"speed is:$speed,remainTime is:$remainTime,arriveTime is:$arriveTime,yellowTime is:${trafficLightResult.flashYellow}"
|
||||
)
|
||||
|
||||
when {
|
||||
trafficLightStatus.isRed() -> {
|
||||
Logger.d(TAG, "=====当前为红灯=====")
|
||||
CallerLogger.d("$M_V2X$TAG", "=====当前为红灯=====")
|
||||
// 到达路口时红灯还没走完(由于多个数据有偏差,红灯预警延长1s,绿灯提示条件延长1.5s,多报出错不如少报且准)
|
||||
if (arriveTime <= remainTime + 1) {
|
||||
redLightWarning()
|
||||
@@ -129,7 +130,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
}
|
||||
}
|
||||
trafficLightStatus.isYellow() -> {
|
||||
Logger.d(TAG, "=====当前为黄灯=====")
|
||||
CallerLogger.d("$M_V2X$TAG", "=====当前为黄灯=====")
|
||||
// 到达路口时黄灯还没走完(由于多个数据有偏差,红灯预警延长1s,绿灯提示延长1.5s,多报出错不如少报且准)
|
||||
if (arriveTime <= remainTime + 1) {
|
||||
redLightWarning()
|
||||
@@ -143,7 +144,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
}
|
||||
}
|
||||
trafficLightStatus.isGreen() -> {
|
||||
Logger.d(TAG, "=====当前为绿灯=====")
|
||||
CallerLogger.d("$M_V2X$TAG", "=====当前为绿灯=====")
|
||||
// 到达路口时绿灯已经走完(由于多个数据有偏差,多报出错不如少报且准,绿灯时间减少一点)
|
||||
if (arriveTime >= remainTime - 1) {
|
||||
redLightWarning()
|
||||
@@ -158,7 +159,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
}
|
||||
}
|
||||
} ?: run {
|
||||
Logger.e(TAG, "CurrentLocation is null!")
|
||||
CallerLogger.e("$M_V2X$TAG", "CurrentLocation is null!")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
* 闯红灯预警
|
||||
*/
|
||||
private fun redLightWarning() {
|
||||
Logger.d(TAG, "=====闯红灯预警=====")
|
||||
CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt(), EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
|
||||
}
|
||||
@@ -176,7 +177,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
* 绿灯通行提示
|
||||
*/
|
||||
private fun greenLightWarning(speed: String = "50") {
|
||||
Logger.d(TAG, "=====绿灯通行预警=====")
|
||||
CallerLogger.d("$M_V2X$TAG", "=====绿灯通行预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
val content = String.format(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
|
||||
@@ -4,10 +4,12 @@ import android.content.Context
|
||||
import android.location.Location
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.trafficlight.RoadIDResult
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightDetail
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.trafficlight.isInRange
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightHMIManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
|
||||
@@ -15,7 +17,6 @@ import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHand
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
|
||||
@@ -61,7 +62,7 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
|
||||
roadIDResult = it
|
||||
},
|
||||
{
|
||||
//Logger.w(TAG, "request road id error : $it")
|
||||
//CallerLogger.w(M_V2X + TAG, "request road id error : $it")
|
||||
})
|
||||
}
|
||||
}, {
|
||||
@@ -82,7 +83,7 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
|
||||
},
|
||||
{ errorMsg ->
|
||||
//如果没有获取到正确的红绿灯数据,则取消读灯,继续读路口,防止出现一直读灯的情况
|
||||
Logger.e(TAG, "request Traffic Light error : $errorMsg")
|
||||
CallerLogger.e(M_V2X + TAG, "request Traffic Light error : $errorMsg")
|
||||
//stop loop traffic light
|
||||
trafficLightNetWorkModel.cancelRequestTrafficLight()
|
||||
//未查到红绿灯,加入2秒延时请求路口ID
|
||||
@@ -120,12 +121,12 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
|
||||
// 检测是否开过路口,开过路口则停止读灯。并重置 trafficLightResult 值为 null
|
||||
if (trafficLightResult != null && it.isInRange(loc.latitude, loc.longitude)) {
|
||||
inRange = true
|
||||
// Logger.d(TAG, "进入路口")
|
||||
// CallerLogger.d(M_V2X + TAG, "进入路口")
|
||||
CallTrafficLightListenerManager.invokeEnterCrossRoad(true)
|
||||
return
|
||||
}
|
||||
if (inRange) {
|
||||
// Logger.d(TAG, "离开路口")
|
||||
// CallerLogger.d(M_V2X + TAG, "离开路口")
|
||||
CallTrafficLightListenerManager.invokeEnterCrossRoad(false)
|
||||
inRange = false
|
||||
trafficLightResult = null
|
||||
|
||||
@@ -6,16 +6,17 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.data.v2x.VipMessage
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.core.function.v2x.vip.network.VipNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
@@ -78,15 +79,15 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
}
|
||||
|
||||
override fun onMsgReceived(vipMessage: VipMessage?) {
|
||||
Logger.d(TAG, "onMsgReceived vipMessage : ${vipMessage.toString()}")
|
||||
CallerLogger.d("$M_V2X$TAG", "onMsgReceived vipMessage : ${vipMessage.toString()}")
|
||||
vipMessage?.let {
|
||||
when (it.vipType) {
|
||||
0 -> { //取消VIP
|
||||
cancelVip()
|
||||
}
|
||||
1 -> { //设置VIP
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"设置handler超时时间 " + ", time : ${System.currentTimeMillis() - vipMessage.timeOut}"
|
||||
)
|
||||
setVip(vipMessage.timeOut)
|
||||
@@ -101,15 +102,15 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
}
|
||||
|
||||
if (exit) {
|
||||
Logger.d(TAG, "驶离路口,返回 , then resetConditions")
|
||||
CallerLogger.d("$M_V2X$TAG", "驶离路口,返回 , then resetConditions")
|
||||
resetConditions()
|
||||
exit = false
|
||||
return
|
||||
}
|
||||
|
||||
if (trafficLightResult.currentRoadTrafficLight() == null) {
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"vip 获取到灯态,但没找到对应车道数据 result : $trafficLightResult , then resetConditions"
|
||||
)
|
||||
resetConditions()
|
||||
@@ -118,8 +119,8 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
|
||||
val currentResult = trafficLightResult.currentRoadTrafficLight()
|
||||
lastResult = result?.currentRoadTrafficLight()
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"检查是否变灯 last.remain : ${lastResult?.remain} , color : ${lastResult?.color} , current.remain : ${currentResult?.remain} , color : ${currentResult?.color}, turnLightFirst : $turnLightFirst"
|
||||
)
|
||||
|
||||
@@ -128,12 +129,12 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
lastResult?.let {
|
||||
//如果上次结果和本次灯态结果变化比较大,则已变灯,控制HMI展示弹窗
|
||||
if (abs(currentResult!!.remain - it.remain) > 5 && currentResult.isGreen()) {
|
||||
Logger.d(TAG, "调用showWarningV2X to show")
|
||||
CallerLogger.d("$M_V2X$TAG", "调用showWarningV2X to show")
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(), EventTypeEnum.TYPE_VIP_IDENTIFICATION.content, EventTypeEnum.TYPE_VIP_IDENTIFICATION.tts, EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType, object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {}
|
||||
override fun onDismiss() {
|
||||
Logger.d(
|
||||
TAG,
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"showWarningV2X vip dismiss , resetConditions"
|
||||
)
|
||||
resetConditions()
|
||||
@@ -147,7 +148,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
// 首次判断,变灯
|
||||
turnLightFirst = true
|
||||
val controlTime = if (currentResult!!.isGreen()) 45 - currentResult.remain else 45
|
||||
Logger.d(TAG, "触发变灯 , controlTime : $controlTime")
|
||||
CallerLogger.d("$M_V2X$TAG", "触发变灯 , controlTime : $controlTime")
|
||||
turnLight(controlTime)
|
||||
}
|
||||
|
||||
@@ -220,7 +221,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
cancelVip()
|
||||
}
|
||||
}, {
|
||||
Logger.e(TAG, "获取VIP信息失败, 准备间隔5秒重新获取")
|
||||
CallerLogger.e("$M_V2X$TAG", "获取VIP信息失败, 准备间隔5秒重新获取")
|
||||
handler.sendEmptyMessageDelayed(MSG_WHAT_VIP_SEARCH, 5_000L)
|
||||
})
|
||||
}
|
||||
@@ -236,14 +237,14 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
result?.let {
|
||||
val bearing =
|
||||
MogoApisHandler.getInstance().apis.mapServiceApi.getSingletonLocationClient(mContext).lastKnowLocation.bearing.toDouble()
|
||||
Logger.d(TAG, "turnLight -- bearing : $bearing")
|
||||
CallerLogger.d("$M_V2X$TAG", "turnLight -- bearing : $bearing")
|
||||
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
|
||||
it.lightId, it.crossId, bearing, controlTime,
|
||||
{
|
||||
Logger.d(TAG, "变灯请求成功")
|
||||
CallerLogger.d("$M_V2X$TAG", "变灯请求成功")
|
||||
},
|
||||
{ errorMsg ->
|
||||
Logger.e(TAG, "变灯请求失败 msg : $errorMsg")
|
||||
CallerLogger.e("$M_V2X$TAG", "变灯请求失败 msg : $errorMsg")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user