[shuttle] 1、增加接驳下发乘客屏运营消息功能 2、接驳平行驾驶显示
This commit is contained in:
@@ -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<V extends IView, P extends Presenter<V>
|
||||
|
||||
} 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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -221,6 +221,24 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
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;
|
||||
|
||||
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi/pingxingjiashi.png
Normal file
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi/pingxingjiashi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
@@ -57,4 +57,6 @@
|
||||
|
||||
<string name="bus_before_tips_s">距离发车时间还有%1$s分钟</string>
|
||||
|
||||
<string name="bus_pingxing_driver">平行驾驶</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -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<OCHOperationalMessage> mMogoOnMessageListener =
|
||||
new IMogoOnMessageListener<OCHOperationalMessage>() {
|
||||
private final IMogoOnMessageListener<SystemMsg> mMogoOnMessageListener =
|
||||
new IMogoOnMessageListener<SystemMsg>() {
|
||||
@Override
|
||||
public Class<OCHOperationalMessage> target() {
|
||||
return OCHOperationalMessage.class;
|
||||
public Class<SystemMsg> 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<Integer> 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);
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user