diff --git a/OCH/bus/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/bus/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index 657e6857d1..076371db78 100644 --- a/OCH/bus/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/bus/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -293,10 +293,6 @@ public class BusPresenter extends Presenter runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus()); } - @Override - public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) { - } - @Override public void onAutopilotDockerInfo(@NonNull String dockerVersion) { } diff --git a/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index 057d2948b9..300e9fe8f4 100644 --- a/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -11,7 +11,6 @@ import androidx.lifecycle.LifecycleOwner; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.mvp.Presenter; import com.mogo.commons.voice.AIAssist; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; @@ -34,7 +33,6 @@ import com.mogo.och.common.module.biz.constant.LoginStatusManager; import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager; import com.mogo.och.common.module.voice.VoiceNotice; -import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; @@ -55,7 +53,7 @@ public class BusPresenter extends Presenter private static final String TAG = "BusPresenter"; - private List mStationList = new ArrayList<>(); + private final List mStationList = new ArrayList<>(); private int mCurrentStation = 0; public BusPresenter(BusFragment view) { @@ -164,10 +162,6 @@ public class BusPresenter extends Presenter public void onAutopilotSNRequest() { } - @Override - public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) { - } - @Override public void onAutopilotStatusResponse(int state) { switch (state) { @@ -206,7 +200,7 @@ public class BusPresenter extends Presenter @Override public void onCarLocationChanged(MogoLocation location) { if (null != location) { - runOnUIThread(() -> mView.updateSpeedView((float) location.getGnssSpeed())); + runOnUIThread(() -> mView.updateSpeedView(location.getGnssSpeed())); } } @@ -237,9 +231,7 @@ public class BusPresenter extends Presenter * 测试使用 */ public void debugAutoPilotStatus(int status) { - AutopilotStatusInfo info = new AutopilotStatusInfo(); - info.setState(status); - onAutopilotStatusResponse(info); + onAutopilotStatusResponse(status); } @Override diff --git a/OCH/shuttle/passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/shuttle/passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index b996d96f58..7c0ee5d18f 100644 --- a/OCH/shuttle/passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/shuttle/passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -532,11 +532,6 @@ public class BusPassengerModel { private boolean arriveAtEnd = false; //乘客app专用字段 - @Override - public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) { - - } - @Override public void onAutopilotSNRequest() { diff --git a/OCH/sweeper/sweeper-cloud/src/main/java/com/mogo/och/sweepercloud/model/SweeperTaskModel.java b/OCH/sweeper/sweeper-cloud/src/main/java/com/mogo/och/sweepercloud/model/SweeperTaskModel.java index da9eb627c7..0779cb86a9 100644 --- a/OCH/sweeper/sweeper-cloud/src/main/java/com/mogo/och/sweepercloud/model/SweeperTaskModel.java +++ b/OCH/sweeper/sweeper-cloud/src/main/java/com/mogo/och/sweepercloud/model/SweeperTaskModel.java @@ -14,7 +14,6 @@ import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.module.status.IMogoStatusChangedListener; import com.mogo.commons.module.status.MogoStatusManager; import com.mogo.commons.module.status.StatusDescriptor; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; @@ -612,11 +611,6 @@ public class SweeperTaskModel implements IMoGoSweeperFutianCloudTaskListener, IM return MoGoAiCloudClientConfig.getInstance().getSn(); } - @Override - public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) { - - } - @Override public void onAutopilotArriveAtStation(@Nullable MessagePad.ArrivalNotification arrivalNotification) { diff --git a/OCH/sweeper/sweeper/src/main/java/com/mogo/och/sweeper/presenter/SweeperPresenter.java b/OCH/sweeper/sweeper/src/main/java/com/mogo/och/sweeper/presenter/SweeperPresenter.java index 1a2bf393d3..451cd91a1a 100644 --- a/OCH/sweeper/sweeper/src/main/java/com/mogo/och/sweeper/presenter/SweeperPresenter.java +++ b/OCH/sweeper/sweeper/src/main/java/com/mogo/och/sweeper/presenter/SweeperPresenter.java @@ -10,7 +10,6 @@ import androidx.lifecycle.LifecycleOwner; import com.amap.api.maps.model.LatLng; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; @@ -120,10 +119,6 @@ public class SweeperPresenter extends Presenter public void onAutopilotRouteLineId(long lineId) { } - @Override - public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) { - } - @Override public void onAutopilotStatusResponse(int state) { SweeperTaskModel.getInstance().setAutopilotState(state); @@ -178,7 +173,7 @@ public class SweeperPresenter extends Presenter @Override public void onCarLocationChanged(MogoLocation location) { if (null != location) { - ThreadUtils.runOnUiThread(() -> mView.updateSpeedView((float) location.getGnssSpeed())); + ThreadUtils.runOnUiThread(() -> mView.updateSpeedView(location.getGnssSpeed())); ThreadUtils.runOnUiThread(() -> mView.setCurrentLocation(location)); } } @@ -211,9 +206,7 @@ public class SweeperPresenter extends Presenter * 测试使用 */ public void debugAutoPilotStatus(int status) { - AutopilotStatusInfo info = new AutopilotStatusInfo(); - info.setState(status); - onAutopilotStatusResponse(info); + onAutopilotStatusResponse(status); } @Override diff --git a/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 97d23806fc..662e2aceaf 100644 --- a/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -1210,10 +1210,6 @@ public class TaxiModel { TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo); } - @Override - public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) { - } - @Override public void onAutopilotStatusResponse(int state) { if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt index c418329316..a0962857bd 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt @@ -113,7 +113,7 @@ class DispatchAutoPilotManager private constructor() : } @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_V2X, + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, nodeAliasCode = ChainConstant.CHAIN_CODE_DISPATCH_RECEIVE, paramIndexes = [0] @@ -140,7 +140,7 @@ class DispatchAutoPilotManager private constructor() : } @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_V2X, + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, nodeAliasCode = ChainConstant.CHAIN_CODE_DISPATCH_START, paramIndexes = [-1] @@ -348,7 +348,7 @@ class DispatchAutoPilotManager private constructor() : AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}") } }else{ - V2XBizTrace.onAck(M_BIZ + TAG, mapOf("arriveErrorMsg" to "不在到站距离范围内", "ArriveAtStation" to arrivalNotification, "distanceFromSelf" to distanceFromSelf)) + V2XBizTrace.onAck(M_BIZ + TAG, mapOf("arriveErrorMsg" to "不在到站距离范围内", "ArriveAtStation" to arrivalNotification, "distanceFromSelf" to distanceFromSelf), true) } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt index 5eec21a195..ff285e32a1 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt @@ -1,24 +1,45 @@ package com.mogo.eagle.function.biz.v2x import android.util.* +import com.mogo.eagle.core.data.deva.chain.ChainCommon import com.mogo.eagle.core.data.deva.chain.ChainConstant -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X -import com.mogo.eagle.core.utilcode.util.* +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.zhjt.service.chain.ChainLog class V2XBizTrace { companion object { + fun onAck(data: Any, data1: Any, param: Boolean = false) { + Log.d("V2X", "tag:$data, msg: $data1") + if (param) { + val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02() + val lineId = CallerAutoPilotStatusListenerManager.getLineId() + realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId)) + } else { + realAction(data, data1) + } + } + @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_V2X, + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG, paramIndexes = [0, 1] ) - fun onAck(data: Any, data1: Any) { - Log.d("V2X", "tag:$data, msg: $data1") + private fun realAction(data: Any, data1: Any) { + + } + + @ChainLog( + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, + linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, + nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG, + paramIndexes = [0, 1, 2] + ) + private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) { + } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt index a02c9210c8..3d79f2ef56 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt @@ -9,7 +9,7 @@ import com.mogo.eagle.core.data.config.* import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_V2X_MSG import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_CLOUD -import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_V2X +import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS import com.mogo.eagle.core.data.enums.* import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.enums.EventTypeEnumNew.Companion.isRoadEvent @@ -115,7 +115,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity) V2XBizTrace.onAck("巡航处理 handlerMessage v2XMessageEntity", " $v2XMessageEntity") }else{ - V2XBizTrace.onAck("事件未触发,巡航处理", mapOf("roadEvent" to v2XRoadEventEntity, "distance" to distance)) + V2XBizTrace.onAck("事件未触发,巡航处理", mapOf("roadEvent" to v2XRoadEventEntity, "distance" to distance), true) } } } @@ -147,7 +147,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, * V2XEvent事件回调 */ @ChainLog( - linkChainLog = CHAIN_TYPE_V2X, + linkChainLog = CHAIN_TYPE_STATUS, linkCode = CHAIN_SOURCE_CLOUD, nodeAliasCode = CHAIN_CODE_V2X_MSG, paramIndexes = [0] @@ -173,18 +173,18 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, if (!AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData) { handleRoadMarkerEvent(event.data.toRoadMarker()) }else{ - V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData)) + V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData), true) } } else -> { - V2XBizTrace.onAck("事件未触发,不识别的新事件",mapOf("roadEvent" to event)) + V2XBizTrace.onAck("事件未触发,不识别的新事件",mapOf("roadEvent" to event), true) } } } @RequiresApi(Build.VERSION_CODES.N) @ChainLog( - linkChainLog = CHAIN_TYPE_V2X, + linkChainLog = CHAIN_TYPE_STATUS, linkCode = CHAIN_SOURCE_ADAS, nodeAliasCode = CHAIN_CODE_V2X_MSG, paramIndexes = [0] diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/alarm/V2XAlarmServer.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/alarm/V2XAlarmServer.java index 0bc5ac915d..6c11973b88 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/alarm/V2XAlarmServer.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/alarm/V2XAlarmServer.java @@ -1,10 +1,12 @@ package com.mogo.eagle.function.biz.v2x.v2n.alarm; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BIZ; + import com.mogo.eagle.core.data.enums.EventTypeEnumNew; import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.data.map.entity.MarkerLocation; import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils; import com.mogo.eagle.function.biz.v2x.V2XBizTrace; @@ -39,7 +41,7 @@ public class V2XAlarmServer { CopyOnWriteArrayList v2XRoadEventEntityList, MogoLocation currentLocation) { try { - Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation ); + CallerLogger.d(M_BIZ + TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation ); if (!showedEvents.isEmpty()) { Iterator iterator = showedEvents.iterator(); while (iterator.hasNext()) { @@ -56,18 +58,18 @@ public class V2XAlarmServer { } } } - Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation); + CallerLogger.d(M_BIZ + TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation); if (currentLocation != null && v2XRoadEventEntityList != null) { // 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告 for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) { // 0、道路事件必须有朝向,角度>=0; - //Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation()); + //CallerLogger.d(M_BIZ + TAG, "entity:" + v2XRoadEventEntity.getLocation()); if (v2XRoadEventEntity.getLocation().getAngle() >= 0) { // 计算车辆距离指定气泡的距离 MarkerLocation eventLocation = v2XRoadEventEntity.getLocation(); // 1、判断是否到达了触发距离,20 ~ 500, double distance = v2XRoadEventEntity.getDistance(); - Logger.d(TAG, "distance:" + distance + ",poiType:" + v2XRoadEventEntity.getPoiType()); + CallerLogger.d(M_BIZ + TAG, "distance:" + distance + ",poiType:" + v2XRoadEventEntity.getPoiType()); if (distance <= 500) { if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) { if (distance > 25) { @@ -78,7 +80,7 @@ public class V2XAlarmServer { double carBearing = currentLocation.getHeading(); double eventBearing = eventLocation.getAngle(); double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing); - Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle); + CallerLogger.d(M_BIZ + TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle); if (diffAngle <= 30) { // 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方 double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi( @@ -89,31 +91,31 @@ public class V2XAlarmServer { (int) currentLocation.getHeading() ); - Logger.d(TAG, "eventAngle:" + eventAngle); + CallerLogger.d(M_BIZ + TAG, "eventAngle:" + eventAngle); if (0 <= eventAngle && eventAngle <= 25) { if (showedEvents.contains(v2XRoadEventEntity)) { return null; } - Logger.d(TAG, "showed---"); + CallerLogger.d(M_BIZ + TAG, "showed---"); showedEvents.add(v2XRoadEventEntity); return v2XRoadEventEntity; } }else{ HashMap map = new HashMap(); map.put("diffAngle",diffAngle); - V2XBizTrace.Companion.onAck("事件未触发,未达到触发角度",map); + V2XBizTrace.Companion.onAck("事件未触发,未达到触发角度",map,true); } }else{ HashMap map = new HashMap(); map.put("distance",distance); - V2XBizTrace.Companion.onAck("事件未触发,未达到触发距离",map); + V2XBizTrace.Companion.onAck("事件未触发,未达到触发距离",map,true); } } } } } catch (Exception e) { e.printStackTrace(); - Logger.w(TAG, "error: " + e.getMessage()); + CallerLogger.w(M_BIZ + TAG, "error: " + e.getMessage()); } return null; } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/network/V2XRefreshModel.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/network/V2XRefreshModel.kt index cbf3207f39..f722e49601 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/network/V2XRefreshModel.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/network/V2XRefreshModel.kt @@ -18,6 +18,8 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.DeviceUtils +import com.mogo.eagle.function.biz.v2x.V2XBizTrace +import com.mogo.eagle.function.biz.v2x.v2n.V2XPoiLoader import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.Disposable import io.reactivex.schedulers.Schedulers @@ -102,7 +104,7 @@ internal class V2XRefreshModel { CallerLogger.d(SceneConstant.M_V2X + TAG, "请求成功,size为:${it.result?.v2XEventList?.size}") return@map it.result?.v2XEventList } else { - CallerLogger.d(SceneConstant.M_V2X + TAG, "请求失败,code为:${it.code}") + V2XBizTrace.onAck("${SceneConstant.M_V2X}$TAG", mapOf("v2xEventsSummaryError" to it.code), true) return@map ArrayList() } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 3ba30d6dfe..f06b170ccf 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -1,26 +1,35 @@ package com.mogo.eagle.function.biz.v2x.v2n.pnc -import android.os.* -import androidx.core.util.* -import com.mogo.eagle.core.data.config.* -import com.mogo.eagle.core.data.enums.* +import android.os.Handler +import android.os.HandlerThread +import android.os.Message +import androidx.core.util.Pair +import com.mogo.eagle.core.data.config.FunctionBuildConfig +import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType +import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.enums.WarningDirectionEnum.ALERT_WARNING_TOP -import com.mogo.eagle.core.data.map.entity.* -import com.mogo.eagle.core.data.msgbox.* +import com.mogo.eagle.core.data.map.entity.MarkerExploreWay +import com.mogo.eagle.core.data.map.entity.MarkerLocation +import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity +import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType.V2X +import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.function.angle.scenes.Default import com.mogo.eagle.core.function.angle.scenes.RoadEvent -import com.mogo.eagle.core.function.api.autopilot.* -import com.mogo.eagle.core.function.api.hmi.warning.* -import com.mogo.eagle.core.function.call.autopilot.* -import com.mogo.eagle.core.function.call.hmi.* -import com.mogo.eagle.core.function.call.map.* +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener +import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager +import com.mogo.eagle.core.function.call.hmi.CallerHmiManager +import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox -import com.mogo.eagle.core.utilcode.mogo.* -import com.mogo.eagle.core.utilcode.util.* +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils +import com.mogo.eagle.core.utilcode.util.CoordinateTransform +import com.mogo.eagle.core.utilcode.util.CoordinateUtils +import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils import com.mogo.eagle.function.biz.v2x.V2XBizTrace -import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.* +import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker.Marker import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager import mogo.telematics.pad.MessagePad.Header @@ -36,22 +45,28 @@ internal object V2NIdentifyDrawer { private const val TAG = "V2NIdentifyDataSubscriber" private const val MSG_WHAT_DRAW_SHIGONE = 0x1010 // 道路施工 - private const val MSG_WHAT_DRAW_SHIGU = 0x1011 // 交通事故 - private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵 + private const val MSG_WHAT_DRAW_SHIGU = 0x1011 // 交通事故 + private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵 private val callback = Handler.Callback { msg -> if (msg.what == MSG_WHAT_DRAW_SHIGONE || msg.what == MSG_WHAT_DRAW_SHIGU) { val events = msg.obj as? List<*> if (events == null || events.isEmpty()) { - V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu" to "")) + V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu" to ""), true) return@Callback true } val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() val filtered = events.filterIsInstance(TrackedObject::class.java).filter { itx -> - DrivingDirectionUtils.getDegreeOfCar2Poi(car.longitude, car.latitude, itx.longitude, itx.latitude, car.heading.toInt()) < 90 + DrivingDirectionUtils.getDegreeOfCar2Poi( + car.longitude, + car.latitude, + itx.longitude, + itx.latitude, + car.heading.toInt() + ) < 90 } if (filtered.isEmpty()) { - V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu-filter" to "")) + V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu-filter" to ""), true) return@Callback true } filtered.forEach { itx -> @@ -60,68 +75,121 @@ internal object V2NIdentifyDrawer { AiRoadMarker().apply { val poiType = getPoiType(itx.type).poiType val polygon = itx.polygonList.map { Pair.create(it.longitude, it.latitude) } - marker(Marker(id, poiType, itx.latitude,itx.longitude, itx.heading, polygon, null, + marker(Marker(id, + poiType, + itx.latitude, + itx.longitude, + itx.heading, + polygon, + null, V2XRoadEventEntity().also { e -> e.poiType = poiType - e.location = MarkerLocation().also { l -> - val p = CoordinateTransform.WGS84ToGCJ02(itx.longitude, itx.latitude) - l.lon = p[0] - l.lat = p[1] - l.angle = itx.heading - } - e.noveltyInfo = MarkerExploreWay().also { - it.poiType = poiType - it.location = e.location - it.polygon = polygon - } - }), true, isDrawRoadLine(poiType)) + e.location = MarkerLocation().also { l -> + val p = CoordinateTransform.WGS84ToGCJ02( + itx.longitude, + itx.latitude + ) + l.lon = p[0] + l.lat = p[1] + l.angle = itx.heading + } + e.noveltyInfo = MarkerExploreWay().also { + it.poiType = poiType + it.location = e.location + it.polygon = polygon + } + }), true, isDrawRoadLine(poiType) + ) - val distance = CoordinateUtils.calculateLineDistance(itx.longitude, itx.latitude, car.longitude, car.latitude) + val distance = CoordinateUtils.calculateLineDistance( + itx.longitude, + itx.latitude, + car.longitude, + car.latitude + ) val alertContent = getAlertContent(poiType, distance.toDouble()) val ttsContent = getTtsContent(poiType, distance.toDouble()) - V2XBizTrace.onAck(TAG,"绘制poi事件:$poiType") - saveMsgBox(MsgBoxBean(V2X, V2XMsg(poiType, alertContent, ttsContent,CommunicationType.V2N.name))) - CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener { - override fun onShow() { - super.onShow() - CallerVisualAngleManager.changeAngle(RoadEvent(itx.longitude, itx.latitude, itx.angle)) - } + V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType") + saveMsgBox( + MsgBoxBean( + V2X, + V2XMsg( + poiType, + alertContent, + ttsContent, + CommunicationType.V2N.name + ) + ) + ) + CallerHmiManager.warningV2X( + poiType, + alertContent, + ttsContent, + object : IMoGoWarningStatusListener { + override fun onShow() { + super.onShow() + CallerVisualAngleManager.changeAngle( + RoadEvent( + itx.longitude, + itx.latitude, + itx.angle + ) + ) + } - override fun onDismiss() { - super.onDismiss() - CallerVisualAngleManager.changeAngle(Default()) - } - }, ALERT_WARNING_TOP, 10000, false) + override fun onDismiss() { + super.onDismiss() + CallerVisualAngleManager.changeAngle(Default()) + } + }, + ALERT_WARNING_TOP, + 10000, + false + ) //消息埋点 - V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent, - DataSourceType.AICLOUD,CommunicationType.V2N) + V2XEventAnalyticsManager.triggerV2XEvent( + poiType, alertContent, ttsContent, + DataSourceType.AICLOUD, CommunicationType.V2N + ) } }.receive() } } else if (msg.what == MSG_WHAT_DRAW_YONGDU) { val events = msg.obj as? List<*> if (events == null || events.isEmpty()) { - V2XBizTrace.onAck(TAG, mapOf("yongDu" to "")) + V2XBizTrace.onAck(TAG, mapOf("yongDu" to ""), true) return@Callback true } val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() val filtered = events.filterIsInstance(MogoV2X.RTEData_PB::class.java).filter { itx -> - val eventLon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } ?: 0.0 - val eventLat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } ?: 0.0 - DrivingDirectionUtils.getDegreeOfCar2Poi(car.longitude, car.latitude, eventLon, eventLat, car.heading.toInt()) < 90 + val eventLon = + itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } + ?: 0.0 + val eventLat = + itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } + ?: 0.0 + DrivingDirectionUtils.getDegreeOfCar2Poi( + car.longitude, + car.latitude, + eventLon, + eventLat, + car.heading.toInt() + ) < 90 } if (filtered.isEmpty()) { - V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to "")) + V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to ""), true) return@Callback true } filtered.forEach { itx -> val id = itx.rteId.toString() - val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } ?: 0.0 - val lat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } ?: 0.0 + val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } + ?: 0.0 + val lat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } + ?: 0.0 AiRoadMarker.aiMakers.getOrPut(id) { AiRoadMarker().apply { val poiType = getPoiType(itx.eventType).poiType - marker(Marker(id, poiType, lat, lon, car.heading, null, null, + marker(Marker(id, poiType, lat, lon, car.heading, null, null, V2XRoadEventEntity().also { e -> e.poiType = poiType e.location = MarkerLocation().also { l -> @@ -135,27 +203,59 @@ internal object V2NIdentifyDrawer { it.location = e.location it.polygon = emptyList() } - }), true, isDrawRoadLine(poiType)) + }), true, isDrawRoadLine(poiType) + ) - val distance = CoordinateUtils.calculateLineDistance(lon, lat, car.longitude, car.latitude) + val distance = CoordinateUtils.calculateLineDistance( + lon, + lat, + car.longitude, + car.latitude + ) val alertContent = getAlertContent(poiType, distance.toDouble()) val ttsContent = getTtsContent(poiType, distance.toDouble()) - V2XBizTrace.onAck(TAG,"绘制poi事件:$poiType") - saveMsgBox(MsgBoxBean(V2X, V2XMsg(poiType, alertContent, ttsContent,CommunicationType.V2N.name))) - CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener { - override fun onShow() { - super.onShow() - CallerVisualAngleManager.changeAngle(RoadEvent(lon, lat, car.heading)) - } + V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType") + saveMsgBox( + MsgBoxBean( + V2X, + V2XMsg( + poiType, + alertContent, + ttsContent, + CommunicationType.V2N.name + ) + ) + ) + CallerHmiManager.warningV2X( + poiType, + alertContent, + ttsContent, + object : IMoGoWarningStatusListener { + override fun onShow() { + super.onShow() + CallerVisualAngleManager.changeAngle( + RoadEvent( + lon, + lat, + car.heading + ) + ) + } - override fun onDismiss() { - super.onDismiss() - CallerVisualAngleManager.changeAngle(Default()) - } - }, ALERT_WARNING_TOP, 10000, false) + override fun onDismiss() { + super.onDismiss() + CallerVisualAngleManager.changeAngle(Default()) + } + }, + ALERT_WARNING_TOP, + 10000, + false + ) //消息埋点 - V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent, - DataSourceType.AICLOUD,CommunicationType.V2N) + V2XEventAnalyticsManager.triggerV2XEvent( + poiType, alertContent, ttsContent, + DataSourceType.AICLOUD, CommunicationType.V2N + ) } }.receive() } @@ -181,7 +281,7 @@ internal object V2NIdentifyDrawer { } private fun getAlertContent(poiType: String, distance: Double): String { - return when(poiType) { + return when (poiType) { EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType -> { "前方${distance.toInt()}米道路施工" } @@ -201,7 +301,10 @@ internal object V2NIdentifyDrawer { return EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType == poiType } - private fun getPoiType(type: Int): EventTypeEnumNew = if (type == 501 || type == 502) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG else if (type == 13) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU else if (type == 102) EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION else throw AssertionError("error!!!") + private fun getPoiType(type: Int): EventTypeEnumNew = + if (type == 501 || type == 502) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG else if (type == 13) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU else if (type == 102) EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION else throw AssertionError( + "error!!!" + ) private val handler by lazy { val thread = HandlerThread("v2n_identify_drawer") @@ -225,12 +328,7 @@ internal object V2NIdentifyDrawer { override fun onAutopilotV2nCongestionEvent(header: Header, rsi: RSI_PB) { super.onAutopilotV2nCongestionEvent(header, rsi) - try { - V2XBizTrace.onAck("onAutopilotV2nCongestionEvent", rsi) - } catch (t: Throwable) { - t.printStackTrace() - } - + V2XBizTrace.onAck("onAutopilotV2nCongestionEvent", rsi) rsi.rsiFrame?.rtes?.rteDataList?.filter { it.eventType == 102 }?.takeIf { @@ -242,7 +340,7 @@ internal object V2NIdentifyDrawer { } private fun drawShiGong(events: List) { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_SHIGONE) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events)) } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt index 82a986e606..a421d6ea73 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt @@ -136,11 +136,11 @@ class AiRoadMarker { return@post } if (l1 == null || l2 == null) { - V2XBizTrace.onAck("$TAG -marker-3-line null return ----", "") + V2XBizTrace.onAck("$TAG -marker-3-line null return ----", "", true) return@post } if (l1.points.isEmpty() || l2.points.isEmpty()) { - V2XBizTrace.onAck("$TAG -marker-3-line points null return ----", "") + V2XBizTrace.onAck("$TAG -marker-3-line points null return ----", "", true) return@post } V2XBizTrace.onAck("$TAG -marker-4-l2:", l2) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java index 5040ac2840..9e60f5fa38 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java @@ -36,10 +36,10 @@ public class V2XRoadEventMarker implements IV2XMarker { IMoGoOverlayManager overlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(); if (overlayManager != null) { if (entity != null) { - V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> poiType : ", entity.getPoiType()); + V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> poiType : ", entity.getPoiType(), false); if (isAiRoadEvent(entity.getPoiType())) { MarkerExploreWay noveltyInfo = entity.getNoveltyInfo(); - V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> noveltyInfo : ",noveltyInfo.toString()); + V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> noveltyInfo : ",noveltyInfo.toString(), false); Pair gpsLocation = noveltyInfo.getGpsLocation(); List> polygons = noveltyInfo.getPolygon(); if (gpsLocation != null && polygons != null) { @@ -57,7 +57,7 @@ public class V2XRoadEventMarker implements IV2XMarker { .set3DMode(true) .icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT); if (point != null) { - V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType()); + V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType(), false); ArrayList markers = new ArrayList<>(); markers.add(point); String id = entity.getLocation().getLon() + "_" + entity.getLocation().getLat(); diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java index fbc3095148..76074b309b 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java @@ -48,7 +48,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp @Override public void init(V2XMessageEntity v2XMessageEntity) { try { - V2XBizTrace.Companion.onAck("v2XMessageEntity",v2XMessageEntity); + V2XBizTrace.Companion.onAck("v2XMessageEntity",v2XMessageEntity,false); V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent(); if (v2XRoadEventEntity != null) { if (!isSameScenario(v2XMessageEntity)) { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/vip/VipCarManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/vip/VipCarManager.kt index dce13bd7be..08b55b7ed7 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/vip/VipCarManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/vip/VipCarManager.kt @@ -123,7 +123,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe } if (trafficLightResult.currentRoadTrafficLight() == null) { - V2XBizTrace.onAck("$M_V2X$TAG", "vip获取到灯态,但没找到对应车道数据 trafficLight:$$trafficLightResult") + V2XBizTrace.onAck("$M_V2X$TAG", "vip获取到灯态,但没找到对应车道数据 trafficLight:$$trafficLightResult", true) result = null return } @@ -258,7 +258,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe ",crossId:${result?.crossId}" + ",bearing:$bearing" + ",controlTime:$controlTime" - ) + ,true) ToastUtils.showLong("服务异常,请稍后重试") }) } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt index ab77257189..5d4ae62052 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -828,7 +828,7 @@ class MoGoAdasListenerImpl : OnAdasListener { * @param rsi 数据 */ @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_V2X, + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG, paramIndexes = [0, 1] @@ -848,7 +848,7 @@ class MoGoAdasListenerImpl : OnAdasListener { * @param parkingViolation 违停 ---包含 静态障碍车 */ @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_V2X, + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_CLOUD, nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG, paramIndexes = [0] diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/OverViewImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/OverViewImpl.kt index a9af35d89d..2d2326d988 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/OverViewImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/OverViewImpl.kt @@ -253,14 +253,6 @@ internal class OverViewImpl(ctx: Context) : IFlow(ctx), } } - /** - * 工控机连接状态 - */ - override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { - super.onAutopilotIpcConnectStatusChanged(status, reason) - } - - override fun onDestroy() { super.onDestroy() // CallerDevaToolsListenerManager.removeListener(TAG) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/rtk/RTKImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/rtk/RTKImpl.kt index 93d36a30de..1dfae49417 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/rtk/RTKImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/rtk/RTKImpl.kt @@ -1,7 +1,6 @@ package com.zhjt.mogo_core_function_devatools.status.flow.rtk import android.content.Context -import android.util.Log import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener @@ -66,7 +65,7 @@ internal class RTKImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotStatu check?.takeIf { it.isActive }?.cancel() isOldVersion.set(false) val info = status.healthInfoList?.find { "localization".equals(it.name, true) } - Log.d(TAG, "info: $info") + CallerLogger.d("$M_DEVA$TAG", "info: $info") if (info != null) { healthInfo.set(info) send(RTKStatus(getDesc(), getCode())) @@ -77,7 +76,7 @@ internal class RTKImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotStatu check?.takeIf { it.isActive }?.cancel() isOldVersion.set(false) val info = statusInf.healthInfoList?.find { "localization".equals(it.name, true) } - Log.d(TAG, "info: $info") + CallerLogger.d("$M_DEVA$TAG", "info: $info") if (info != null) { healthInfo.set(info) send(RTKStatus(getDesc(), getCode())) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt index 94361fcdef..00d5559ec1 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt @@ -74,8 +74,6 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT) fwBuildMap[ChainConstant.CHAIN_TYPE_ANR_LEAK] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_ANR) - fwBuildMap[ChainConstant.CHAIN_TYPE_V2X] = - FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_V2X) fwBuildMap[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_WEAK_NETWORK) fwBuildMap[ChainConstant.CHAIN_TYPE_OCH] = @@ -98,8 +96,6 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { ChainLogParam(true, "红绿灯Union数据") traceInfoCache[ChainConstant.CHAIN_TYPE_ANR_LEAK] = ChainLogParam(true, "ANR Record") - traceInfoCache[ChainConstant.CHAIN_TYPE_V2X] = - ChainLogParam(true, "V2X(V2N/V2I)") traceInfoCache[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] = ChainLogParam(true, "WeakNetWork Record") diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/utils/HmiActionLog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/utils/HmiActionLog.kt index 6e0d8be103..de47dd80e6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/utils/HmiActionLog.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/utils/HmiActionLog.kt @@ -1,6 +1,9 @@ package com.mogo.eagle.core.function.hmi.ui.utils +import com.mogo.eagle.core.data.deva.chain.ChainCommon import com.mogo.eagle.core.data.deva.chain.ChainConstant +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.zhjt.service.chain.ChainLog @@ -9,14 +12,34 @@ class HmiActionLog { companion object { + fun hmiAction(data: Any, data1: Any, param: Boolean = false) { + CallerLogger.d(M_HMI + data.toString(), data1) + if (param) { + val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02() + val lineId = CallerAutoPilotStatusListenerManager.getLineId() + realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId)) + } else { + realAction(data, data1) + } + } + @ChainLog( linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, linkCode = ChainConstant.CHAIN_SOURCE_HMI, nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS, paramIndexes = [0, 1] ) - fun hmiAction(data: Any, data1: Any) { - CallerLogger.d(M_HMI + data.toString(), data1) + private fun realAction(data: Any, data1: Any) { + + } + + @ChainLog( + linkChainLog = ChainConstant.CHAIN_TYPE_STATUS, + linkCode = ChainConstant.CHAIN_SOURCE_HMI, + nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS, + paramIndexes = [0, 1, 2] + ) + private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) { } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt index 5b8d49477c..f835356bef 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt @@ -6,7 +6,6 @@ import android.annotation.SuppressLint import android.content.Context import android.graphics.Color import android.util.AttributeSet -import android.util.Log import android.view.LayoutInflater import android.view.animation.LinearInterpolator import android.widget.ImageView @@ -22,6 +21,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import com.zhjt.mogo.adas.data.bean.UnableLaunchReason @@ -74,9 +76,9 @@ class ParallelDriveView @JvmOverloads constructor( override fun onAttachedToWindow() { super.onAttachedToWindow() initView() - CallerAutoPilotStatusListenerManager.addListener(TAG, this) - CallerParallelDrivingListenerManager.addListener(TAG, this) - CallerParallelDrivingActionsListenerManager.addListener(TAG, this) + CallerAutoPilotStatusListenerManager.addListener("$M_HMI$TAG", this) + CallerParallelDrivingListenerManager.addListener("$M_HMI$TAG", this) + CallerParallelDrivingActionsListenerManager.addListener("$M_HMI$TAG", this) } private fun initView() { @@ -88,7 +90,7 @@ class ParallelDriveView @JvmOverloads constructor( when (state) { 0 -> { state = APP_REQUESTING - Log.d(TAG, "Click-开始请求平行驾驶") + HmiActionLog.hmiAction(TAG,"Click-开始请求平行驾驶") updateUI(APP_REQUESTING) reqParaDrive() listener?.onReqClick() @@ -96,18 +98,18 @@ class ParallelDriveView @JvmOverloads constructor( APP_REQUESTING -> { cancelParaDrive() - Log.d(TAG, "Click-请求已取消") + HmiActionLog.hmiAction(TAG,"Click-请求已取消") ToastUtils.showShort("请求已取消!") checkAvailableAndUpdateUI() } AD_REQUESTING -> { - Log.d(TAG, "Click-自动驾驶正在请求平行驾驶") + HmiActionLog.hmiAction(TAG,"Click-自动驾驶正在请求平行驾驶") ToastUtils.showShort("自动驾驶正在请求平行驾驶") } UNAVAILABLE -> { - Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求") + HmiActionLog.hmiAction(TAG,"Click-请P档驻车并松开油门刹车后请求") ToastUtils.showShort("请P档驻车并松开油门刹车后请求") } } @@ -124,7 +126,6 @@ class ParallelDriveView @JvmOverloads constructor( when (state) { 7 -> { isAutoDriving = false - Log.d(TAG, "onAutopilotStatusResponse-7") ThreadUtils.runOnUiThread({ this.state = PARALLEL_DRIVING updateUI(PARALLEL_DRIVING) @@ -133,7 +134,6 @@ class ParallelDriveView @JvmOverloads constructor( 2 -> { isAutoDriving = true - Log.d(TAG, "onAutopilotStatusResponse-2") if (this.autopilotState == 7) { ThreadUtils.runOnUiThread({ checkAvailableAndUpdateUI() @@ -143,7 +143,6 @@ class ParallelDriveView @JvmOverloads constructor( else -> { isAutoDriving = false - Log.d(TAG, "onAutopilotStatusResponse-else") if (this.autopilotState == 7) { ThreadUtils.runOnUiThread({ checkAvailableAndUpdateUI() @@ -158,14 +157,14 @@ class ParallelDriveView @JvmOverloads constructor( isParallelDrivingAbility: Boolean ) { if (!isParallelDrivingAbility) { - Log.d(TAG, "onParallelDrivingAbility-UNAVAILABLE") + CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-UNAVAILABLE") ThreadUtils.runOnUiThread({ if (state == PARALLEL_DRIVING) return@runOnUiThread state = UNAVAILABLE updateUI(UNAVAILABLE) }, ThreadUtils.MODE.QUEUE) } else { - Log.d(TAG, "onParallelDrivingAbility-AVAILABLE") + CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-AVAILABLE") ThreadUtils.runOnUiThread({ if (state == PARALLEL_DRIVING) return@runOnUiThread state = 0 @@ -176,8 +175,8 @@ class ParallelDriveView @JvmOverloads constructor( override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) { parallelTaskProcessNotice?.let { + CallerLogger.d("$M_HMI$TAG", "onParallelDrivingResp-code:${it.code}") ThreadUtils.runOnUiThread({ - Log.d(TAG, "onParallelDrivingResp-code:${it.code}") when (it.code) { "START_SYNC" -> {// 同步中 state = SYNCHRONIZING @@ -452,9 +451,9 @@ class ParallelDriveView @JvmOverloads constructor( override fun onDetachedFromWindow() { super.onDetachedFromWindow() - CallerAutoPilotStatusListenerManager.removeListener(TAG) - CallerParallelDrivingListenerManager.removeListener(TAG) - CallerParallelDrivingActionsListenerManager.removeListener(TAG) + CallerAutoPilotStatusListenerManager.removeListener("$M_HMI$TAG") + CallerParallelDrivingListenerManager.removeListener("$M_HMI$TAG") + CallerParallelDrivingActionsListenerManager.removeListener("$M_HMI$TAG") } interface ClickEventListener { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.kt index f8f11438f0..1d48809d87 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.kt @@ -96,7 +96,6 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener, object : IMoGoAutopilotStatusListener { override fun onAutopilotStatusResponse(state: Int) { ThreadUtils.runOnUiThread { - d("$M_BUS_P$TAG", "state = %s", state) if (autopilotIV != null) { if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { if (!isBus(FunctionBuildConfig.appIdentityMode)) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt index c74b35b6a2..16261a2922 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt @@ -136,10 +136,7 @@ class SystemVersionView @JvmOverloads constructor( } ivHDCache.setOnClickListener { - hmiAction( - "$M_HMI$TAG", - "HD map view click , isHDCached:$isHDCached , lon:${getChassisLocationWGS84().longitude} , lat:${getChassisLocationWGS84().latitude}" - ) + hmiAction("$M_HMI$TAG", mapOf("isHDCached" to isHDCached),true) if (isHDCached) {// 已缓存 ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded)) } else {// 未缓存 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt index f5ca6be125..69a48cf285 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt @@ -41,7 +41,6 @@ import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView import com.mogo.eagle.core.function.main.modules.MogoModulesManager import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant @@ -59,10 +58,6 @@ import java.io.File /** - * @author congtaowang - * @since 2019-12-23 - * - * * 描述:加载各个模块 */ open class MainActivity : MvpActivity(), MainView, @@ -76,7 +71,8 @@ open class MainActivity : MvpActivity(), MainView, private var isFirst = false private var mConnAdapter: ConnInfoAdapter? = null private val dataList: List = ArrayList() - private var mLastStatus = 0x00 +// private var mLastStatus = 0x00 + private var mLastStatus = 0x01 private var isFloatingLayerHidden = false override fun getLayoutId(): Int { @@ -327,11 +323,11 @@ open class MainActivity : MvpActivity(), MainView, MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true) } - override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { + override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { + super.onAutopilotIpcConnectStatusChanged(status, reason) UiThreadHandler.post { - val status = autoPilotStatusInfo.ipcConnStatus - if (mLastStatus != status) { - val statusInfo = autoPilotStatusInfo.clone() + if(mLastStatus != status){ + val statusInfo = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().clone() rvConnectInfo.post { updateConnectInfoView(statusInfo) } mLastStatus = status } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainCommon.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainCommon.kt new file mode 100644 index 0000000000..91618889c5 --- /dev/null +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainCommon.kt @@ -0,0 +1,4 @@ +package com.mogo.eagle.core.data.deva.chain + +data class ChainCommon(val lat:Double, val lon:Double, val lineId:Long) { +} \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt index 56555c05f0..d227008626 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt @@ -22,14 +22,13 @@ class ChainConstant { const val CHAIN_SOURCE_OCH = 13 //业务类型与下方文件名一一对应 - const val CHAIN_TYPE_STATUS = 0 // 各个业务初始化信息,配置信息.链接状态,点击信息 + const val CHAIN_TYPE_STATUS = 0 // 记录所有业务信息(正常调用,异常数据) const val CHAIN_TYPE_GNSS = 1 // 工控定位数据 const val CHAIN_TYPE_SOCKET_AUTOPILOT = 2 // 包括自动驾驶状态,reportMsg,planning数据,全局路径数据,FM const val CHAIN_TYPE_SOCKET_DATA_TRACKED = 3 // 感知数据,现阶段记录云端漫游 const val CHAIN_TYPE_SOCKET_TRAJECTORY = 4 // 前车引导线,用于调试 const val CHAIN_TYPE_SOCKET_VEHICLE = 5 // 底盘数据 const val CHAIN_TYPE_SOCKET_TRAFFIC_LIGHT = 6 // 多元红绿灯聚合数据 - const val CHAIN_TYPE_V2X = 100 // V2X(V2I、V2N) const val CHAIN_TYPE_ANR_LEAK = 300 const val CHAIN_TYPE_WEAK_NETWORK = 400 const val CHAIN_TYPE_OCH = 500 @@ -42,7 +41,6 @@ class ChainConstant { const val CHAIN_LINK_LOG_ADAS_TRAJECTORY = "-adasTrajectory" const val CHAIN_LINK_LOG_ADAS_VEHICLE = "-adasVehicle" const val CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT = "-UnionTrafficLight" - const val CHAIN_LINK_LOG_V2X = "-eagleCloudWSV2X" const val CHAIN_LINK_LOG_RECORD_ANR = "-eagleRecordANR" const val CHAIN_LINK_LOG_RECORD_WEAK_NETWORK = "-eagleRecordWeakNetwork" const val CHAIN_LINK_LOG_OCH = "-eagleOch" @@ -102,8 +100,8 @@ class ChainConstant { const val CHAIN_CODE_HTTP_DNS_CITY_CODE = "CHAIN_CODE_HTTP_DNS_CITY_CODE" const val CHAIN_CODE_HTTP_DNS_ERROR_REASON = "CHAIN_CODE_HTTP_DNS_ERROR_REASON" + const val CHAIN_CODE_DATA_CENTER = "CHAIN_CODE_DATA_CENTER" const val CHAIN_CODE_V2X_MSG = "CHAIN_CODE_V2X_MSG" - const val CHAIN_CODE_MSG_BOX = "CHAIN_CODE_MSG_BOX" const val CHAIN_CODE_HD_MAP_CALL = "CHAIN_CODE_HD_MAP_CALL" const val CHAIN_CODE_HD_MAP_ROAD_CROSS = "CHAIN_CODE_HD_MAP_ROAD_CROSS" const val CHAIN_CODE_HD_MAP_ICON_SET = "CHAIN_CODE_HD_MAP_ICON_SET" diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatusListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatusListener.kt index d70810e024..b022e6a006 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatusListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatusListener.kt @@ -1,6 +1,5 @@ package com.mogo.eagle.core.function.api.autopilot -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg import system_master.* @@ -12,14 +11,6 @@ import system_master.* */ interface IMoGoAutopilotStatusListener { - /** - * 自动驾驶状态信息 - * - * @param autoPilotStatusInfo 状态信息 - */ - @Deprecated("3.3.0之后不建议使用此种回调方式,按需回调,主界面暂时使用用于check检查信息透出") - fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {} - /** * 自动驾驶状态信息 * diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index 5ede15519a..b589922a74 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.base.CallerBase +import com.mogo.eagle.core.function.call.trace.CallerTrace import com.mogo.eagle.core.utilcode.util.GsonUtils import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg @@ -37,7 +38,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase if (oldValue != newValue) { - //todo emArrow chainLog + CallerTrace.write("AutoPilotStatus", mapOf("state" to newValue)) M_LISTENERS.forEach { val listener = it.value listener.onAutopilotStatusResponse(newValue) @@ -61,7 +62,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase? ) { if (isConnected) { - var isEquals: Boolean = true + var isEquals = true if (unableAutopilotReasons != null && this.unableAutopilotReasons != null) { unableAutopilotReasons.let { onw -> onw.sortWith(compareBy(UnableLaunchReason::hashCode)); diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotRecordListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotRecordListenerManager.kt index f0b8cae7f0..704566c680 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotRecordListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotRecordListenerManager.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.call.autopilot import bag_manager.BagManagerOuterClass import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener import com.mogo.eagle.core.function.call.base.CallerBase +import com.mogo.eagle.core.function.call.trace.CallerTrace import mogo.telematics.pad.MessagePad import record_cache.RecordPanelOuterClass @@ -17,6 +18,7 @@ object CallerAutopilotRecordListenerManager : CallerBase() { - /** * 车辆加速度 * acc 加速度 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisBrakeStateListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisBrakeStateListenerManager.kt index 1f5797029f..a197d8dad7 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisBrakeStateListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisBrakeStateListenerManager.kt @@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.base.CallerBase */ object CallerChassisBrakeStateListenerManager : CallerBase() { - /** * brake 刹车 */ diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingActionsListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingActionsListenerManager.kt index e81e2d16a3..53881e328a 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingActionsListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingActionsListenerManager.kt @@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener import com.mogo.eagle.core.function.call.base.CallerBase +import com.mogo.eagle.core.function.call.trace.CallerTrace /** @@ -43,6 +44,7 @@ object CallerParallelDrivingActionsListenerManager : } private fun notification() { + CallerTrace.write("ParallelDriving", mapOf("ParallelState" to isParallelDrivingAbility)) M_LISTENERS.forEach { val listener = it.value listener.onParallelDrivingAbility( diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingListenerManager.kt index c7ccd21d99..7c9407a9c3 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerParallelDrivingListenerManager.kt @@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingStatusListener import com.mogo.eagle.core.function.call.base.CallerBase -import mogo.telematics.pad.MessagePad +import com.mogo.eagle.core.function.call.trace.CallerTrace import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass /** @@ -12,6 +12,7 @@ object CallerParallelDrivingListenerManager : CallerBase