diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index 5a6583960e..99d75f300c 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -52,6 +52,7 @@ import java.util.concurrent.ConcurrentHashMap; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; @@ -337,6 +338,10 @@ public class BusPassengerModel { } } + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } }; private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){ diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index 50d19341f9..0c84b1a1a8 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -32,6 +32,7 @@ import java.util.List; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; /** * 网约车小巴 @@ -283,4 +284,9 @@ public class BusPresenter extends Presenter @Override public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) { } + + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } } diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java index c166b66f81..8491142497 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java @@ -73,6 +73,7 @@ import io.reactivex.functions.Consumer; import io.reactivex.plugins.RxJavaPlugins; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P; @@ -566,6 +567,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback } } + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } }; private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){ diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index e63ac17938..1c5aa3d454 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -82,6 +82,7 @@ import io.reactivex.functions.Consumer; import io.reactivex.plugins.RxJavaPlugins; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; /** * Created by pangfan on 2021/8/19 @@ -1148,6 +1149,10 @@ public class TaxiModel { CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为false(到达目的地)"); } } + + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + } }; private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 91b76640ad..2ba17285d1 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -525,4 +525,9 @@ class MoGoAutopilotProvider : override fun getTeleTimeStamp(): Long { return msgHandler.getTeleTimeStamp() } + + override fun sendStatusQueryReq() { + Log.d(TAG, "---- sendStatusQueryReq ----") + AdasManager.getInstance().sendStatusQueryReq() + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt index 0d3c26f1b6..0e1d2caf80 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -31,6 +31,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotSNRequest +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotStatusRespByQuery import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager.invokeAutopilotCarConfigData import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager.invokeAutopilotCarStateData import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager @@ -43,6 +44,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudList import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager +import com.mogo.eagle.core.network.utils.* import com.zhidao.support.adas.high.AdasManager import com.zhidao.support.adas.high.OnAdasListener import com.zhidao.support.adas.high.common.ProtocolStatus @@ -369,6 +371,10 @@ class MoGoAdasListenerImpl : OnAdasListener { statusInfo: SystemStatusInfo.StatusInfo? ) { //状态查询应答 + statusInfo?.let { + Log.d(TAG, GsonUtil.jsonFromObject(it)) + } + invokeAutopilotStatusRespByQuery(statusInfo) } /** diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt index 742ef3ef8d..493d75bd49 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt @@ -7,6 +7,7 @@ import androidx.lifecycle.* import androidx.lifecycle.Lifecycle.Event import androidx.lifecycle.Lifecycle.Event.ON_CREATE import androidx.lifecycle.Lifecycle.Event.ON_DESTROY +import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.utilcode.kotlin.* import com.zhjt.mogo_core_function_devatools.ext.* import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus @@ -78,8 +79,13 @@ object StatusManager { for (f in flows) { f.onCreate() } + ctx.lifeCycleScope.launch(Dispatchers.IO) { + while (true) { + CallerAutoPilotManager.sendStatusQueryReq() + delay(1000) + } + } } - ctx.normalPop(content, width = 665.PX, height = WindowManager.LayoutParams.WRAP_CONTENT, diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt index 94061085c8..302272dc85 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt @@ -81,7 +81,7 @@ internal class GpsStatus(val enabled: Boolean = false, val isGranted: Boolean = /** * RTK/GNSS定位状态 */ -internal class RTKStatus(var enabled: Boolean = false): Status() { +internal class RTKStatus(var enabled: Boolean = false, var desc: String = "RTK"): Status() { override fun equals(other: Any?): Boolean { if (javaClass != other?.javaClass) return false diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt index 25788e076c..049a174b4b 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt @@ -1,7 +1,6 @@ package com.zhjt.mogo_core_function_devatools.status.flow.can import android.content.* -import android.util.* import chassis.Chassis.GearPosition import chassis.Chassis.LightSwitch import com.mogo.eagle.core.function.api.autopilot.* @@ -11,6 +10,8 @@ import com.zhjt.mogo_core_function_devatools.status.flow.IFlow import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus import kotlinx.coroutines.* import mogo_msg.MogoReportMsg.MogoReportMessage +import system_master.SystemStatusInfo.StatusInfo +import java.util.concurrent.atomic.* internal class CanImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotVehicleStateListener, IMoGoAutopilotStatusListener { @@ -19,6 +20,7 @@ internal class CanImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotVehic } private var job: Job? = null + private val state: AtomicInteger by lazy { AtomicInteger(Int.MIN_VALUE) } override fun onCreate() { send(CanStatus(CallerAutoPilotManager.isConnected())) @@ -33,7 +35,7 @@ internal class CanImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotVehic private fun isCanEnabled(): Boolean { val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode() - return CallerAutoPilotManager.isConnected() && code != "EHW_CAN" + return CallerAutoPilotManager.isConnected() && code != "EHW_CAN" && (state.get() == Int.MIN_VALUE || state.get() == 0) } @@ -69,12 +71,18 @@ internal class CanImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotVehic timeOutCheck() } + override fun onAutopilotStatusRespByQuery(status: StatusInfo) { + val state = status.healthInfoList?.find { "can_adapter".equals(it.name, true) }?.state?.ordinal + if (state != null) { + this.state.set(state) + } + } private fun timeOutCheck() { job?.safeCancel() launch(Dispatchers.Default) { delay(4000) - send(CanStatus(false)) + send(CanStatus(isCanEnabled())) }.also { job = it } } 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 5dde572dbd..5a2cbb3435 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 @@ -9,6 +9,9 @@ import com.zhjt.mogo_core_function_devatools.status.entity.RTKStatus import com.zhjt.mogo_core_function_devatools.status.flow.IFlow import kotlinx.coroutines.* import mogo.telematics.pad.MessagePad.GnssInfo +import system_master.SystemStatusInfo.HealthInfo +import system_master.SystemStatusInfo.StatusInfo +import java.util.concurrent.atomic.* internal class RTKImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotCarStateListener, IMoGoAutopilotStatusListener { companion object { @@ -17,6 +20,10 @@ internal class RTKImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotCarSt private var job: Job? = null + private val desc by lazy { + AtomicReference(null) + } + override fun onCreate() { send(RTKStatus(isRTKEnabled())) Log.d(TAG, "-- onCreate --") @@ -27,29 +34,41 @@ internal class RTKImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotCarSt private fun isRTKEnabled(): Boolean { val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode() val gnssInfo = CallerAutopilotCarStatusListenerManager.getCurrentGnssInfo() + val status = desc.get() return CallerAutoPilotManager.isConnected() && ( code != "EHW_RTK" && code != "EHW_GNSS" && code != "ESYS_RTK_STATUS_FAULT" && code != "ELCT_RTK_STATUS_FAULT" && - code != "ELCT_RTK_STATUS_UNKNOWN") && gnssInfo != null + code != "ELCT_RTK_STATUS_UNKNOWN") && gnssInfo != null && (status == null || status.state?.ordinal == 0) } override fun onAutopilotCarStateData(gnssInfo: GnssInfo?) { - send(RTKStatus(isRTKEnabled())) + send(RTKStatus(isRTKEnabled(), getDesc())) timeOutCheck() } override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { super.onAutopilotIpcConnectStatusChanged(status, reason) - send(RTKStatus(isRTKEnabled())) + send(RTKStatus(isRTKEnabled(), getDesc())) + } + + override fun onAutopilotStatusRespByQuery(status: StatusInfo) { + val state = status.healthInfoList?.find { "localization".equals(it.name, true) } + if (state != null) { + desc.set(state) + } + } + + private fun getDesc(): String { + return desc.get()?.desc?.uppercase() ?: "RTK" } private fun timeOutCheck() { job?.safeCancel() launch(Dispatchers.Default) { delay(4000) - send(RTKStatus(false)) + send(RTKStatus(isRTKEnabled(), getDesc())) }.also { job = it } } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/adapter/StatusAdapter.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/adapter/StatusAdapter.kt index 6a1085ed3d..4aa4d23e0b 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/adapter/StatusAdapter.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/adapter/StatusAdapter.kt @@ -91,7 +91,7 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList): Rec } else { iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_disable) } - tv.text = "RTK" + tv.text = status.desc } } } diff --git a/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java b/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java index 1dca020a61..e84c0fe66d 100644 --- a/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java +++ b/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java @@ -38,10 +38,12 @@ import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIR import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL; import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_TIMER_CANCEL; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; //负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗 public class DispatchAutoPilotManager implements IMogoOnMessageListener @@ -339,4 +341,8 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener implement public void onAutopilotSNRequest() { } + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } + private void updateConnectInfoView(@NonNull AutopilotStatusInfo autoPilotStatusInfo) { if (!isFloatingLayerHidden) {// 遮罩层显示的时候 mConnAdapter.updateData(autoPilotStatusInfo); diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java index c0eda012a2..17227329ec 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java @@ -4,6 +4,7 @@ import android.content.Context; import android.os.Bundle; import android.view.View; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.alibaba.android.arouter.facade.annotation.Route; @@ -25,6 +26,7 @@ import java.util.List; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; /** * @author donghongyu @@ -176,4 +178,9 @@ public class SmallMapFragment extends BaseFragment clearPolyline(); } } + + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } } diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt index 020ca59254..b3331626ff 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt @@ -190,4 +190,9 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { * 或乘客屏解析数据的时间戳 */ fun getTeleTimeStamp(): Long + + /** + * 主动查询工控机的各topic状态 + */ + fun sendStatusQueryReq() } \ No newline at end of file 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 e1c30bd929..246c7cff39 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 @@ -3,6 +3,7 @@ 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.* /** * @author xiaoyuzhou @@ -41,6 +42,11 @@ interface IMoGoAutopilotStatusListener { fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {} + /** + * 工控机主动查询 AdasManager#sendStatusQueryReq(),后会收到如下回调 + */ + fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) { } + companion object { /** * 不可自动驾驶,目前场景是刚开机,adas还未和工控机连接 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index 07c33331aa..dd2d352072 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -252,4 +252,11 @@ object CallerAutoPilotManager { fun getTeleTimeStamp(): Long { return providerApi?.getTeleTimeStamp() ?: 0L } + + /** + * 主动查询工控机的各topic状态 + */ + fun sendStatusQueryReq() { + providerApi?.sendStatusQueryReq() + } } \ No newline at end of file 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 b460c96de1..df63a364f3 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 @@ -8,6 +8,7 @@ import com.mogo.eagle.core.utilcode.kotlin.* import com.mogo.eagle.core.utilcode.util.GsonUtils import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg +import system_master.* import java.util.concurrent.ConcurrentHashMap /** @@ -184,5 +185,15 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { } } - + /** + * 主动调查询接口:AdasManager#sendStatusQueryReq(), 会收到以下回调 + */ + fun invokeAutopilotStatusRespByQuery(statusInfo: SystemStatusInfo.StatusInfo?) { + statusInfo?.also { + M_AUTOPILOT_STATUS_LISTENERS.forEach{ itx -> + val listener = itx.value + listener.onAutopilotStatusRespByQuery(it) + } + } + } } \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java index 07615c0c58..51e4dbc0fd 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java @@ -22,6 +22,7 @@ import java.util.concurrent.locks.ReentrantLock; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener, @@ -143,4 +144,9 @@ public class MogoRouteOverlayManager implements @Override public void onAutopilotIpcConnectStatusChanged(int status, @androidx.annotation.Nullable String reason) { } + + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } }