diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java index 28135792f0..2dba29c568 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java @@ -1,6 +1,5 @@ package com.mogo.och.bus.fragment; -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS; import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL; import android.animation.ObjectAnimator; @@ -398,14 +397,20 @@ public abstract class BaseBusTabFragment } else { ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_normal)); - ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv)); ctvAutopilotStatusIv.setImageResource(R.drawable.bus_ic_autopilot); ctvAutopilotStatus.setClickable(true); - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) {//1可用 + if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) { //1可用 ctvAutopilotStatus.setSelected(false); + ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv)); } else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == autopilotStatus) { + ctvAutopilotStatusTv.setText(R.string.bus_loading_autopilot_runnig_tv); ctvAutopilotStatus.setSelected(true); + } else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING + == autopilotStatus){ + ctvAutopilotStatusTv.setText(R.string.bus_pingxing_driver); + ctvAutopilotStatusTv.setBackground(getContext().getDrawable(R.drawable.pingxingjiashi)); } + } } 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 650893f452..3e97df4a91 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 @@ -221,6 +221,24 @@ public class BusPresenter extends Presenter mView.onAutopilotStatusChanged(currentAutopilotStatus); }); break; + case IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING: + if (FunctionBuildConfig.isDemoMode + && ( + (mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1) + && OrderModel.getInstance().isGoingToNextStation() + + ) + ) { + CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能"); + return; + } + if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING) { + currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING; + } + runOnUIThread(() -> { + mView.onAutopilotStatusChanged(currentAutopilotStatus); + }); + break; default: runOnUIThread(() -> mView.onAutopilotEnableChange(false)); break; diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/pingxingjiashi.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/pingxingjiashi.png new file mode 100644 index 0000000000..78bfa2687f Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/pingxingjiashi.png differ diff --git a/OCH/mogo-och-bus/src/main/res/values/strings.xml b/OCH/mogo-och-bus/src/main/res/values/strings.xml index 7f0c9a32be..c9fc1117b7 100644 --- a/OCH/mogo-och-bus/src/main/res/values/strings.xml +++ b/OCH/mogo-och-bus/src/main/res/values/strings.xml @@ -57,4 +57,6 @@ 距离发车时间还有%1$s分钟 + 平行驾驶 + diff --git a/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java b/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java index 97ce744b96..0b5d593906 100644 --- a/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java +++ b/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java @@ -25,6 +25,7 @@ import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; +import com.mogo.och.common.module.biz.common.socketmessage.data.SystemMsg; import com.mogo.och.common.module.biz.constant.OchCommonConst; import com.mogo.eagle.core.data.telematic.TelematicConstant; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; @@ -214,22 +215,31 @@ public class OrderModel { }); } - private final IMogoOnMessageListener mMogoOnMessageListener = - new IMogoOnMessageListener() { + private final IMogoOnMessageListener mMogoOnMessageListener = + new IMogoOnMessageListener() { @Override - public Class target() { - return OCHOperationalMessage.class; + public Class target() { + return SystemMsg.class; } @Override - public void onMsgReceived(OCHOperationalMessage obj) { + public void onMsgReceived(SystemMsg obj) { if (obj == null){ CallerLogger.INSTANCE.d(M_BUS + TAG, "onMsgReceived = null"); return; } - CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+obj.getMessage()); + CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+obj.getContext()); + List list = obj.getScreenList(); + if ( list!= null && list.size() > 1){ + + CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING, + GsonUtils.toJson(obj.getContext()).getBytes()); + } + OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(obj.getPushTimeStamp(), - obj.getMessage(),OCHSocketMessageManager.OPERATION_SYSTEM); + obj.getContext(),OCHSocketMessageManager.OPERATION_SYSTEM); + + } }; diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/data/OrderCloseMsg.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/data/OrderCloseMsg.kt index b84e9aeffd..438ce06c0c 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/data/OrderCloseMsg.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/data/OrderCloseMsg.kt @@ -1,7 +1,4 @@ package com.mogo.och.common.module.biz.common.socketmessage.data - -import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.msgOrderClosedType - /** * @author: wangmingjun * @date: 2023/2/25