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/callback/IRefreshBusStationsCallback.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/callback/IRefreshBusStationsCallback.java index 854a2699d5..ae4a8b9713 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/callback/IRefreshBusStationsCallback.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/callback/IRefreshBusStationsCallback.java @@ -9,5 +9,5 @@ import java.util.List; * @date: 2021/10/22 */ public interface IRefreshBusStationsCallback { - void refreshBusStations(List stationList, int currentStation, int nextStation, boolean isArrived); + void refreshBusStations(String lineName,List stationList, int currentStation, int nextStation, boolean isArrived); } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/BusConst.kt b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/BusConst.kt index 740bb3c03d..6bd9e3ba8a 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/BusConst.kt +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/BusConst.kt @@ -71,6 +71,6 @@ class BusConst { */ const val TYPE_MARKER_BUS_ORDER = "TYPE_MARKER_BUS_ORDER" - const val TIMER_START_AUTOPILOT_INTERVAL = 10 * 1000L + const val TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L } } \ No newline at end of file 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 aaa13e9e27..5e835f8961 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 @@ -15,6 +15,7 @@ import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.constraintlayout.widget.Group; @@ -49,6 +50,7 @@ import com.mogo.och.bus.util.BDRouteDataTestUtils; import com.mogo.och.bus.view.BusArcView; import com.mogo.och.bus.view.SlidePanelView; +import mogo.telematics.pad.MessagePad; import record_cache.RecordPanelOuterClass; /** @@ -69,6 +71,7 @@ public abstract class BaseBusTabFragment protected TextView tvOperationStatus; protected RelativeLayout mSettingBtn; protected ImageView mBadcaseBtn; + protected ImageView mAISelectBtn; public boolean isOperationStatus;//false-收车,true-出车 private FrameLayout flStationPanelContainer; private Group groupTestPanel; @@ -211,14 +214,11 @@ public abstract class BaseBusTabFragment // return null; }); if (mBadcaseBtn != null) { - CallerDevaToolsManager.INSTANCE.initBadCase(mBadcaseBtn, null, null); + CallerDevaToolsManager.INSTANCE.initBadCase(mBadcaseBtn); if (!HmiBuildConfig.isShowBadCaseView) { CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this); } } - //设置升级小红点提示 默认隐藏 - mUpgradeTipIv = findViewById(R.id.module_och_bus_upgrade_red_tip); - CallerHmiManager.INSTANCE.registerUpgradeTipsCallback(() -> mUpgradeTipIv); } private void updateSwitchMapIcon(){ @@ -251,6 +251,10 @@ public abstract class BaseBusTabFragment } } + @Override + public void onAutopilotRecordConfig(@NonNull MessagePad.RecordDataConfig config) { + } + /** * 测试到站 diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java index 8b753cb167..11464a6587 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java @@ -42,11 +42,11 @@ public class BusFragment extends BaseBusTabFragment private static final String TAG = "BusFragment"; private TextView mCurrentStationName; - private TextView mStartStationFlag; private TextView mNextStationName; - private TextView mEndStationFlag; - // private TextView mDebugArrive; + private TextView mCurrentTag; + private TextView mNextTag; private TextView mSwitchLine; //切换路线 + private TextView mLineName; private int mCurrentStation = 0; private View mBus; @@ -64,11 +64,11 @@ public class BusFragment extends BaseBusTabFragment super.initViews(); mBus = findViewById(R.id.module_och_bus_tag); mCurrentStationName = findViewById(R.id.module_och_bus_current_station); - mStartStationFlag = findViewById(R.id.module_och_bus_start_station_tag); + mCurrentTag = findViewById(R.id.module_och_bus_current_station_anchor); mNextStationName = findViewById(R.id.module_och_bus_order_end_station); - mEndStationFlag = findViewById(R.id.module_och_bus_end_station_tag); + mNextTag = findViewById(R.id.module_och_bus_next_station_anchor); mSwitchLine = findViewById(R.id.switch_line_btn); -// mDebugArrive = findViewById(R.id.module_och_bus_arrive_station); + mLineName = findViewById(R.id.module_och_bus_line_name); if (DebugConfig.isDebug()) { mBus.setOnClickListener(view -> { @@ -76,10 +76,6 @@ public class BusFragment extends BaseBusTabFragment mPresenter.queryBusRoutes(); }); -// mBus.setOnLongClickListener(view -> { -// getActivity().finish(); -// return true; -// }); //debug下调用测试面板 mCurrentStationName.setOnLongClickListener(v -> { debugTestBar(); @@ -132,7 +128,8 @@ public class BusFragment extends BaseBusTabFragment * @param nextStation 下个站点 * @param isArrived 是否都站 */ - public void refreshBusStations(List stationList, int currentStation, int nextStation, boolean isArrived) { + public void refreshBusStations(String lineName,List stationList + , int currentStation, int nextStation, boolean isArrived) { mCurrentStation = currentStation; if (getActivity() == null) { return; @@ -144,25 +141,25 @@ public class BusFragment extends BaseBusTabFragment } // 渲染小巴路线数据 - renderCurrentStationStatus(stationList, currentStation, nextStation, isArrived); + renderCurrentStationStatus(lineName,stationList, currentStation, nextStation, isArrived); }); } /** * 重新刷新站点信息 isArrived 是否到站 */ - private void renderCurrentStationStatus(List stationList, int currentStation + private void renderCurrentStationStatus(String lineName,List stationList, int currentStation , int nextStation, boolean isArrived) { CallerLogger.INSTANCE.d(M_BUS + "MapMaker ", "currentStation=" + currentStation + ",nextStation=" + nextStation + "isArrived=" + isArrived); String currentStationName = null; String nextStationName = null; - int startStationFlagVisibility = View.INVISIBLE; - int endStationFlagVisibility = View.INVISIBLE; boolean isArriveEndStation = false; boolean isArriveAtStation = false; boolean isArriveAtStartStation = false; + mLineName.setText(lineName); + // 获取当前站点的名称 currentStationName = stationList.get(currentStation).getName(); @@ -171,9 +168,8 @@ public class BusFragment extends BaseBusTabFragment // 是否到达起点 if (currentStation == 0) { - startStationFlagVisibility = View.VISIBLE; isArriveAtStartStation = true; - mStartStationFlag.setText(getResources().getString(R.string.bus_arrive_to_end_start)); + mCurrentTag.setText(getResources().getString(R.string.bus_arrive_to_end_start)); setOrRemoveMapMaker(true, BusConst.BUS_START_MAP_MAKER, startStation.getLat() , startStation.getLon(),R.raw.star_marker); @@ -181,6 +177,8 @@ public class BusFragment extends BaseBusTabFragment , endStation.getLon(),R.raw.end_marker); } else if (currentStation > 0 && currentStation < stationList.size() - 1) {// 是否到达站点 isArriveAtStation = true; + mCurrentTag.setText(getResources().getString(R.string.bus_arrive_to_current_tag)); + mNextTag.setText(getResources().getString(R.string.bus_arrive_to_next_tag)); setOrRemoveMapMaker(false, BusConst.BUS_START_MAP_MAKER, startStation.getLat() , startStation.getLon(),R.raw.star_marker); @@ -189,9 +187,7 @@ public class BusFragment extends BaseBusTabFragment } else if (currentStation == stationList.size() - 1) {// 是否到达终点 isArriveEndStation = true; nextStationName = "--"; - mStartStationFlag.setText(getResources().getString(R.string.bus_arrive_to_end_end)); - startStationFlagVisibility = View.VISIBLE; - endStationFlagVisibility = View.INVISIBLE; + mNextTag.setText(getResources().getString(R.string.bus_arrive_to_end_end)); setOrRemoveMapMaker(false, BusConst.BUS_START_MAP_MAKER, startStation.getLat() , startStation.getLon(),R.raw.star_marker); @@ -211,8 +207,16 @@ public class BusFragment extends BaseBusTabFragment } // 是否到达终点 - if (nextStation == stationList.size() - 1) { - endStationFlagVisibility = View.VISIBLE; + if ( nextStation == stationList.size() - 1 || nextStation == -1) { + mNextTag.setText(getResources().getString(R.string.bus_arrive_to_end_end)); + }else { + mNextTag.setText(getResources().getString(R.string.bus_arrive_to_next_tag)); + } + + if (currentStation == 0 && isArrived){ + showOrHideSwitchLineBtn(true); + }else { + showOrHideSwitchLineBtn(false); } // 重置滑动按钮文字 @@ -226,12 +230,17 @@ public class BusFragment extends BaseBusTabFragment mCurrentStationName.setText(currentStationName); mNextStationName.setText(nextStationName); - mStartStationFlag.setVisibility(startStationFlagVisibility); - mEndStationFlag.setVisibility(endStationFlagVisibility); - updateBusTestBarInfo(); } + private void showOrHideSwitchLineBtn(boolean isShow) { + if (isShow){ + mSwitchLine.setVisibility(View.VISIBLE); + }else { + mSwitchLine.setVisibility(View.INVISIBLE); + } + } + public void hideOchBus() { // tvNotice.setVisibility(View.GONE); } @@ -374,5 +383,4 @@ public class BusFragment extends BaseBusTabFragment startActivity(intent); } } - } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index dfefe1f3bf..9204438b22 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -11,6 +11,7 @@ import android.location.Location; import android.os.Handler; import android.os.Message; import android.text.TextUtils; +import android.util.Log; import androidx.annotation.NonNull; @@ -79,7 +80,6 @@ import mogo.telematics.pad.MessagePad; public class BusOrderModel { private final String TAG = BusOrderModel.class.getSimpleName(); private int currentLineId = -1; - private int currentStationIndex = 0; //因为服务端和前台对于当前站不一致,所以设置两个current index, 一个用于前台展示, 一个用于服务端接口请求 private int backgroundCurrentStationIndex = 0;//A->B 此处值是A站点索引 /** * 运营状态、后端更具运营状态来判断车辆是否派单 @@ -246,12 +246,12 @@ public class BusOrderModel { * 上报订单全路径规划数据 */ public void updateOrderRoute() { - if (!isGoingToNextStation || currentStationIndex >= stationList.size() || currentStationIndex-1 < 0 || points.size() == 0){ + if (!isGoingToNextStation || backgroundCurrentStationIndex+1 >= stationList.size() || points.size() == 0){ return; } - BusStationBean currentStation = stationList.get( currentStationIndex -1); - BusStationBean nextStation = stationList.get( currentStationIndex); + BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex); + BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1); BusServiceManager.getInstance().updateOrderRoute(mContext, currentLineId, currentStation.getSiteId() , nextStation.getSiteId(), points, new IBusServiceCallback() { @@ -446,11 +446,10 @@ public class BusOrderModel { if (!isOneWayOver){ CallerLogger.INSTANCE.d( M_BUS + TAG, "自动驾驶开启开往下一站====" ); //需要更改当前站和下一站的状态 然后渲染 - RenderLeaveStationSuccess(o.getResult(),isRestart); + leaveStationSuccess(o.getResult(),isRestart); }else { CallerLogger.INSTANCE.d( M_BUS + TAG, "单程真的结束了====" ); isGoingToNextStation = false; - currentStationIndex = 0; backgroundCurrentStationIndex = 0; CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); queryBusRoutes(); @@ -480,7 +479,7 @@ public class BusOrderModel { paramIndexes = {0}, clientPkFileName = "sn" ) - private void RenderLeaveStationSuccess(BusRoutesResult result, boolean isRestart) { + private void leaveStationSuccess(BusRoutesResult result, boolean isRestart) { renderBusStationsStatus(result); if (slidePannelHideCallback != null) { slidePannelHideCallback.hideSlidePanel(); @@ -500,8 +499,8 @@ public class BusOrderModel { * @param isRestart */ private void startAutopilot(boolean isRestart) { - BusStationBean currentStation = stationList.get( currentStationIndex -1); - BusStationBean nextStation = stationList.get( currentStationIndex); + BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex); + BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex + 1); // if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE // == CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()) { @@ -540,9 +539,14 @@ public class BusOrderModel { * 到站后重置站点状态 */ private void arriveSiteStation(boolean isRestart) { - CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation-currentStationIndex = "+currentStationIndex); + int arrivedStationIndex = 0; + if (!isRestart){ + arrivedStationIndex = backgroundCurrentStationIndex + 1; + } + CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation-currentStationIndex = "+ arrivedStationIndex); + BusServiceManager.getInstance().arriveSiteStation(mContext - , stationList.get(currentStationIndex).getSeq(), stationList.get(currentStationIndex).getSiteId() + , stationList.get(arrivedStationIndex).getSeq(), stationList.get(arrivedStationIndex).getSiteId() , new IBusServiceCallback() { @Override public void onSuccess(BaseData o) { @@ -567,9 +571,9 @@ public class BusOrderModel { private void renderArriveBusStation() { List site = busRoutesResult.getSites(); if (site != null && site.size() > 0){ - backgroundCurrentStationIndex = currentStationIndex; + backgroundCurrentStationIndex ++; if (refreshBusStationsCallback != null){ - refreshBusStationsCallback.refreshBusStations(stationList, currentStationIndex + refreshBusStationsCallback.refreshBusStations(busRoutesResult.getName(),stationList, backgroundCurrentStationIndex , getNextStopStation(),true); } } @@ -582,7 +586,7 @@ public class BusOrderModel { CallerLogger.INSTANCE.d( M_BUS + TAG, "查询到站下车乘客"); BusServiceManager.getInstance().queryStationLeaveAwayPassengers(mContext - , stationList.get(currentStationIndex).getSeq(), stationList.get(currentStationIndex).getSiteId() + , stationList.get(backgroundCurrentStationIndex +1).getSeq(), stationList.get(backgroundCurrentStationIndex+1).getSiteId() , new IBusServiceCallback() { @Override public void onSuccess(QueryLeaveAwayPassengersResponse o) { @@ -608,6 +612,7 @@ public class BusOrderModel { @Override public void onSuccess(BaseData o) { mIsWorking = !mIsWorking; + closeBeautificationMode(); carOperationStatusCallback.changeOperationStatus(isWorking()); startOrStopOrderLoop(mIsWorking); BusTrajectoryManager.getInstance().stopTrajReqLoop(); @@ -623,6 +628,17 @@ public class BusOrderModel { }); } + /** + * 关闭美化模式 + */ + private void closeBeautificationMode() { + if (FunctionBuildConfig.isDemoMode) {//收车结束美化 + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setDemoMode(false); + CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为false(收车)"); + } + } + /** * 出车 */ @@ -634,7 +650,7 @@ public class BusOrderModel { startOrStopOrderLoop(mIsWorking); if ( stationList != null && stationList.size() > 0 ) { AIAssist.getInstance( mContext ).speakTTSVoice( "车辆已整备完毕,请前往" - + stationList.get( currentStationIndex ).getName() + "站点" ); + + stationList.get( backgroundCurrentStationIndex ).getName() + "站点" ); } carOperationStatusCallback.changeOperationStatus(isWorking()); queryBusRoutes(); @@ -693,7 +709,7 @@ public class BusOrderModel { /** * 渲染站点信息 * 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站, - * 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理current index,不能直接渲染 + * 车机端展示 离开站为当前站点,前往站为下一站, 下一站到站后在置为当前站 * @param result */ private void renderBusStationsStatus(BusRoutesResult result) { @@ -705,42 +721,47 @@ public class BusOrderModel { stationList.addAll( site ); for ( int i = 0; i < stationList.size(); i++ ) { BusStationBean s = stationList.get( i ); + + CallerLogger.INSTANCE.d( M_BUS + "renderBusStationsStatus--", + "Index="+ i+" ,name = "+s.getName()+" ,"+s.isLeaving()+","+s.getDrivingStatus()); + // 是否正在开往下一站 if ( s.isLeaving()) { isGoingToNextStation = true; } // 当前站点信息 if (s.getDrivingStatus() == STATION_STATUS_STOPPED ) { - currentStationIndex = i; + backgroundCurrentStationIndex = i; break; } } - backgroundCurrentStationIndex = currentStationIndex; - BusStationBean currentStation = stationList.get(currentStationIndex); - CallerLogger.INSTANCE.d( M_BUS + TAG, "渲染站点信息服务端currentStationIndex="+currentStationIndex + + BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex); + + CallerLogger.INSTANCE.d( M_BUS + TAG, + "渲染站点信息服务端currentStationIndex="+backgroundCurrentStationIndex +" isLeaving()="+currentStation.isLeaving()); + //当前站点是始发站,告诉服务端到达始发站。 如果没有这个节点, 服务器不知道始发站到达状态 // ,订单开始站下在始发站的状态流转有问题 - if (currentStationIndex == 0 && !currentStation.isLeaving()){ + if (backgroundCurrentStationIndex == 0 && !currentStation.isLeaving()){ arriveSiteStation(true); } + // 美化是否开始 - if (FunctionBuildConfig.isDemoMode && ((currentStationIndex > 0 - && currentStationIndex < stationList.size()-1) - || (stationList.get(0).isLeaving() || stationList.get(stationList.size() -1).isLeaving()))){//行驶过程中设置美化 + if (FunctionBuildConfig.isDemoMode && (backgroundCurrentStationIndex >= 0 + && backgroundCurrentStationIndex <= stationList.size()-1) + && stationList.get(backgroundCurrentStationIndex).isLeaving()){//行驶过程中设置美化 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setDemoMode(true); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为true(每次滑动出发)"); } + if (refreshBusStationsCallback != null){ - if (currentStation.isLeaving()){//如果服务端的当前站是leaving状态,展示当前站需要+1 - currentStationIndex ++; - refreshBusStationsCallback.refreshBusStations(stationList - , currentStationIndex, getNextStopStation(),false); - }else{ - refreshBusStationsCallback.refreshBusStations(stationList - , currentStationIndex, getNextStopStation(),true); - } + refreshBusStationsCallback.refreshBusStations(result.getName(),stationList + , backgroundCurrentStationIndex, getNextStopStation(),!currentStation.isLeaving()); } + if ( currentStation.isLeaving() && slidePannelHideCallback != null) { slidePannelHideCallback.hideSlidePanel(); } @@ -755,10 +776,10 @@ public class BusOrderModel { * @return -1 当前已是最后一个站点 */ private int getNextStopStation() { - if ( currentStationIndex >= stationList.size() - 1 ) { + if ( backgroundCurrentStationIndex >= stationList.size() - 1 ) { return -1; } - int nextStationIndex = currentStationIndex + 1; + int nextStationIndex = backgroundCurrentStationIndex + 1; for ( ; nextStationIndex < stationList.size() - 1; nextStationIndex++ ) { if ( stationList.get( nextStationIndex ).getIfStop() == 1 ) { break; @@ -789,12 +810,13 @@ public class BusOrderModel { * @param awayPassengersResponse */ private void playLeavePassengersMsg( QueryLeaveAwayPassengersResponse awayPassengersResponse ) { - CallerLogger.INSTANCE.d( M_BUS + TAG, "播报下车乘客信息currentStationIndex="+currentStationIndex); + CallerLogger.INSTANCE.d( M_BUS + TAG, "播报下车乘客信息currentStationIndex=" + + String.valueOf(backgroundCurrentStationIndex + 1)); - if ( currentStationIndex > stationList.size() - 1 ) { + if ( backgroundCurrentStationIndex +1 > stationList.size() - 1 ) { return; } - String station = stationList.get( currentStationIndex ).getName(); + String station = stationList.get( backgroundCurrentStationIndex+1 ).getName(); StringBuilder builder = new StringBuilder( "已到达" ); builder.append( station ); if ( !station.endsWith( "站" ) ) { @@ -841,9 +863,8 @@ public class BusOrderModel { * 行程结束 */ private void travelOver() { -// CallerLogger.INSTANCE.d( M_BUS + TAG, "行程结束"); - if ( currentStationIndex >= stationList.size() ) { + if ( backgroundCurrentStationIndex >= stationList.size() ) { CallerLogger.INSTANCE.e( M_BUS + TAG, "travel over index out of station list" ); return; } @@ -862,18 +883,18 @@ public class BusOrderModel { * @param data */ public void onArriveAt( MessagePad.ArrivalNotification data){ - if ( currentStationIndex > stationList.size() - 1 ) { + if ( backgroundCurrentStationIndex +1 > stationList.size() - 1 ) { CallerLogger.INSTANCE.e( M_BUS + TAG, "到站异常,取消后续操作结束" ); return; } - if (FunctionBuildConfig.isDemoMode && currentStationIndex == stationList.size() - 1) {//到达最后一站结束美化 + if (FunctionBuildConfig.isDemoMode && backgroundCurrentStationIndex <= stationList.size() - 1) {//到达一站结束美化 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setDemoMode(false); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为false(到最后一站)"); } - CallerLogger.INSTANCE.d( M_BUS + TAG, "到站====currentStationIndex=" + currentStationIndex); + CallerLogger.INSTANCE.d( M_BUS + TAG, "到站====currentStationIndex=" + backgroundCurrentStationIndex); isGoingToNextStation = false; - // 到达站点后,更新站点状态 -// currentStationIndex = getNextStopStation(); + queryStationLeaveAwayPassengers(); UiThreadHandler.postDelayed(new Runnable() {// 先查询下车乘客,再上报到站,便于后台筛查下车订单 @Override @@ -916,11 +937,11 @@ public class BusOrderModel { } public void triggerStartServiceEvent(boolean isRestart, boolean send) { - if (stationList == null || currentStationIndex >= stationList.size() || currentStationIndex == 0) { + if (stationList == null || backgroundCurrentStationIndex >= stationList.size() || backgroundCurrentStationIndex == 0) { return; } - BusStationBean currentStation = stationList.get( currentStationIndex -1); - BusStationBean nextStation = stationList.get( currentStationIndex); + BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex); + BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1); BusAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send, currentStation.getName(), nextStation.getName(), currentLineId); } @@ -930,6 +951,6 @@ public class BusOrderModel { } public int getCurrentStationIndex() { - return currentStationIndex; + return backgroundCurrentStationIndex; } } 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..d5cb01601e 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; /** * 网约车小巴 @@ -47,6 +48,7 @@ public class BusPresenter extends Presenter private int currentAutopilotStatus = -1; private List mStationList = new ArrayList<>(); private int mCurrentStation = 0; + private boolean isRestartAutopilot = false; public BusPresenter(BusFragment view) { super(view); @@ -84,14 +86,6 @@ public class BusPresenter extends Presenter BusOrderModel.getInstance().setControllerStatusCallback(null); } -// public void setIsAnimateRunning(boolean isAnimateRunning){ -// this.isAnimateRunning = isAnimateRunning; -// } - -// public boolean getIsAnimateRunning(){ -// return isAnimateRunning; -// } - public void queryBusRoutes() { BusOrderModel.getInstance().queryBusRoutes(); } @@ -103,12 +97,14 @@ public class BusPresenter extends Presenter public void autoDriveToNextStation(boolean isRestart) { currentAutopilotStatus = -1; BusOrderModel.getInstance().autoDriveToNextStation(isRestart); + isRestartAutopilot = false; } public void restartAutopilot() { if (BusOrderModel.getInstance().isGoingToNextStation()){ currentAutopilotStatus = -1; BusOrderModel.getInstance().restartAutopilot(); + isRestartAutopilot = true; } } @@ -124,14 +120,15 @@ public class BusPresenter extends Presenter } @Override - public void refreshBusStations(List stationList, int currentStation, int nextStation, boolean isArrived) { + public void refreshBusStations(String lineName,List stationList + , int currentStation, int nextStation, boolean isArrived) { mStationList.clear(); mStationList.addAll(stationList); mCurrentStation = currentStation; // functionDemoModeChange(); CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel =", " mCurrentStation =" + mCurrentStation); if (mView != null) { - runOnUIThread(() -> mView.refreshBusStations( + runOnUIThread(() -> mView.refreshBusStations(lineName, stationList, currentStation, nextStation, isArrived)); } } @@ -203,7 +200,7 @@ public class BusPresenter extends Presenter // 改变UI自动驾驶状态 runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus)); BusOrderModel.getInstance().triggerStartServiceEvent( - BusOrderModel.getInstance().isGoingToNextStation(), true); + isRestartAutopilot, true); } break; case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE: @@ -283,4 +280,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-bus/src/main/java/com/mogo/och/bus/util/BusTrajectoryManager.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/util/BusTrajectoryManager.java index 06e98681c0..430909a7b4 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/util/BusTrajectoryManager.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/util/BusTrajectoryManager.java @@ -71,27 +71,27 @@ public class BusTrajectoryManager { if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())) { // 1. 轨迹管理_轨迹开始下载(本地已有对应轨迹也触发) CallerLogger.INSTANCE.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹开始下载"); - ToastUtils.showShort("轨迹开始下载"); + // ToastUtils.showShort("轨迹开始下载"); stopTrajReqLoop(); } else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())) { // 2. 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发) CallerLogger.INSTANCE.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹下载成功"); - ToastUtils.showShort("轨迹下载成功"); + // ToastUtils.showShort("轨迹下载成功"); stopTrajReqLoop(); } else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())) { // 3. 轨迹管理_轨迹下载失败,本地无对应轨迹 CallerLogger.INSTANCE.d(M_BUS + TAG, "onAutopilotGuardian() " + "轨迹下载失败,本地无对应轨迹"); - ToastUtils.showShort("轨迹下载失败,本地无对应轨迹"); + // ToastUtils.showShort("轨迹下载失败,本地无对应轨迹"); } else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())) { // 4. 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功 CallerLogger.INSTANCE.d(M_BUS + TAG, "onAutopilotGuardian() " + "轨迹下载失败,本地有对应轨迹,认为成功"); - ToastUtils.showShort("轨迹下载失败,本地有对应轨迹,认为成功"); + // ToastUtils.showShort("轨迹下载失败,本地有对应轨迹,认为成功"); } else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())) { // 5. 轨迹管理_轨迹下载超时 CallerLogger.INSTANCE.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹下载超时"); - ToastUtils.showShort("轨迹下载超时"); + // ToastUtils.showShort("轨迹下载超时"); } } diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg.png new file mode 100755 index 0000000000..3166d20e37 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg_1.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg_1.png new file mode 100755 index 0000000000..09a9c252da Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_line_panel_bg_1.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_normal.png new file mode 100755 index 0000000000..9232e2c15a Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_select.png new file mode 100755 index 0000000000..04a1e40e8d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_ai_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_normal.png new file mode 100755 index 0000000000..528e4e0698 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_select.png new file mode 100755 index 0000000000..73a7e82fbb Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/icon_bad_case_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/press_start_status.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/press_start_status.png new file mode 100755 index 0000000000..af32c20cb5 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/press_start_status.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_failure.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_failure.png new file mode 100755 index 0000000000..5737f93ad8 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_failure.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_success.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_success.png new file mode 100755 index 0000000000..84246fd323 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/start_success.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_badcase_btn_bg.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_badcase_btn_bg.png deleted file mode 100644 index 89a6eaa5dc..0000000000 Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_badcase_btn_bg.png and /dev/null differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg.png new file mode 100755 index 0000000000..3166d20e37 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg_1.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg_1.png new file mode 100755 index 0000000000..09a9c252da Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_line_panel_bg_1.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_normal.png new file mode 100755 index 0000000000..9232e2c15a Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_select.png new file mode 100755 index 0000000000..04a1e40e8d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_ai_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_normal.png new file mode 100755 index 0000000000..528e4e0698 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_select.png new file mode 100755 index 0000000000..73a7e82fbb Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/icon_bad_case_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/press_start_status.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/press_start_status.png new file mode 100755 index 0000000000..af32c20cb5 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/press_start_status.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_failure.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_failure.png new file mode 100755 index 0000000000..5737f93ad8 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_failure.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_success.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_success.png new file mode 100755 index 0000000000..84246fd323 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/start_success.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_badcase_btn_bg.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_badcase_btn_bg.png deleted file mode 100644 index 89a6eaa5dc..0000000000 Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_badcase_btn_bg.png and /dev/null differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg.png new file mode 100755 index 0000000000..3166d20e37 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg_1.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg_1.png new file mode 100755 index 0000000000..09a9c252da Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_line_panel_bg_1.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_normal.png new file mode 100755 index 0000000000..9232e2c15a Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_select.png new file mode 100755 index 0000000000..04a1e40e8d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_ai_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_normal.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_normal.png new file mode 100755 index 0000000000..528e4e0698 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_normal.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_select.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_select.png new file mode 100755 index 0000000000..73a7e82fbb Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/icon_bad_case_select.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/press_start_status.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/press_start_status.png new file mode 100755 index 0000000000..af32c20cb5 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/press_start_status.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_failure.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_failure.png new file mode 100755 index 0000000000..5737f93ad8 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_failure.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_success.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_success.png new file mode 100755 index 0000000000..84246fd323 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/start_success.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable/ai_collect_selector.xml b/OCH/mogo-och-bus/src/main/res/drawable/ai_collect_selector.xml new file mode 100755 index 0000000000..879be14e27 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/drawable/ai_collect_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bad_case_selector.xml b/OCH/mogo-och-bus/src/main/res/drawable/bad_case_selector.xml new file mode 100755 index 0000000000..b0e7932bd4 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/drawable/bad_case_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bus_autopilot_status_bg.xml b/OCH/mogo-och-bus/src/main/res/drawable/bus_autopilot_status_bg.xml index 9a276b035d..ad57da1c3a 100644 --- a/OCH/mogo-och-bus/src/main/res/drawable/bus_autopilot_status_bg.xml +++ b/OCH/mogo-och-bus/src/main/res/drawable/bus_autopilot_status_bg.xml @@ -1,46 +1,17 @@ - - - - - + - - - - - - - - - - - + + - - - - - + - - - - - + - - - - - + - - - - - + diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line1_selector.xml b/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line1_selector.xml new file mode 100644 index 0000000000..b00fbd8bd6 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line1_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line2_selector.xml b/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line2_selector.xml new file mode 100644 index 0000000000..ee555aae15 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/drawable/bus_line_dividing_line2_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bus_switch_line_btn.xml b/OCH/mogo-och-bus/src/main/res/drawable/bus_switch_line_btn.xml index 8062bcf093..be0bd24850 100644 --- a/OCH/mogo-och-bus/src/main/res/drawable/bus_switch_line_btn.xml +++ b/OCH/mogo-och-bus/src/main/res/drawable/bus_switch_line_btn.xml @@ -3,10 +3,9 @@ - - - + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml index 461842718e..7bb12b1117 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml @@ -29,9 +29,7 @@ android:id="@+id/module_mogo_och_autopilot_status" android:layout_width="@dimen/module_mogo_och_autopilot_status_bg_width" android:layout_height="@dimen/module_mogo_och_autopilot_status_bg_height" - android:layout_marginLeft="@dimen/module_mogo_och_margin_left" app:layout_constraintTop_toBottomOf="@+id/fl_speed" - android:layout_marginTop="@dimen/bus_ext_arcView_top" android:background="@drawable/bus_autopilot_status_bg" app:layout_constraintLeft_toLeftOf="parent" android:gravity="center" @@ -39,33 +37,30 @@ + + android:textStyle="bold" /> @@ -127,20 +122,10 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/bus_switch_model_layout"> - @@ -150,11 +135,20 @@ android:layout_height="@dimen/module_mogo_och_operation_status_bg_height" android:layout_marginLeft="@dimen/module_mogo_och_margin_left" android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom" - android:src="@drawable/bus_badcase_btn_bg" + android:src="@drawable/bad_case_selector" android:elevation="@dimen/dp_10" - android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout"/> + - - - - - - - - - \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml b/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml index 0c307b9d24..6af29db03a 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml @@ -2,188 +2,171 @@ + android:layout_height="wrap_content" + android:background="@drawable/bus_line_panel_bg" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent"> - - - - - - - - - - - - - - - - - - - - - - - + + app:layout_constraintBottom_toBottomOf="@+id/module_och_bus_line_name" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="@id/module_och_bus_line_name" /> - - + + + + + android:layout_marginLeft="14px" + android:layout_marginTop="@dimen/dp_24" + android:text="当前站点:" + android:textColor="#CAD6FF" + android:textSize="@dimen/module_och_bus_order_start_station_anchor_textSize" + android:textStyle="bold" + app:layout_constraintLeft_toRightOf="@+id/greenDot" + app:layout_constraintTop_toBottomOf="@+id/line2" /> - + - + - + - + - + - + - - - - - - + app:layout_constraintLeft_toLeftOf="parent" /> + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml index a27b69ae1d..b4a129664d 100644 --- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml @@ -13,8 +13,8 @@ 32px 20px - 42px - 32px + 40px + 42px 15px @@ -44,20 +44,20 @@ 30px 23px 26px - 32px + 34px 20px 80px 3px - 44.5px + 34px 20px 28px 27px - 25.6px + 28px 20px 20px - 16px + 64px 16px 40px @@ -77,8 +77,8 @@ 70px 24px - 460px - 140px + 616px + 180px 112px 112px @@ -86,11 +86,11 @@ 92px 30px - 466px - 446px + 616px + 754px - 36px + 40px 13px 12px 350px @@ -120,7 +120,8 @@ 46px 700px 120px - 86px + 560px + 116px 20px diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml index 9c23585e71..db56121992 100644 --- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -13,8 +13,8 @@ 32px 20px - 42px - 32px + 40px + 42px 15px @@ -44,11 +44,11 @@ 30px 23px 26px - 32px + 34px 20px 80px 3px - 44.5px + 34px 20px 28px 27px @@ -57,7 +57,7 @@ 25.6px 20px 20px - 16px + 64px 16px 40px @@ -77,8 +77,8 @@ 70px 24px - 460px - 140px + 616px + 180px 112px 112px @@ -86,11 +86,11 @@ 92px 30px - 466px - 446px + 616px + 754px - 36px + 40px 13px 12px 350px @@ -119,7 +119,8 @@ 46px 700px 120px - 86px + 560px + 116px 50px 225px diff --git a/OCH/mogo-och-bus/src/main/res/values/dimens.xml b/OCH/mogo-och-bus/src/main/res/values/dimens.xml index 51d39b3e5c..85e4768fcc 100644 --- a/OCH/mogo-och-bus/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values/dimens.xml @@ -135,7 +135,8 @@ 30px 450px 72px - 52px + 280px + 58px 20px 225px 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 0e7050b014..fdbca6ea6b 100644 --- a/OCH/mogo-och-bus/src/main/res/values/strings.xml +++ b/OCH/mogo-och-bus/src/main/res/values/strings.xml @@ -19,9 +19,9 @@ 更换路线成功 更换路线失败 - - - - + 起点: + 终点: + 当前站点: + 下一站: 自动驾驶状态为0不可用 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..1b1fec85e7 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; @@ -510,6 +511,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback if (mCurrentOCHOrder != null && getCurOrderStatus() == TaxiPassengerOrderStatusEnum.UserArriveAtStart && state != mPrevAPStatus) { + + TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotEvent(false, true, + mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo); + // 当高频返回autopilot 2时,不重复调用订单状态变更 mPrevAPStatus = state; // 每个状态单独赋值,解决无订单时已经是2的状态导致的新订单来时无法进入此逻辑更新状态 startServicePilotDone(); @@ -566,6 +571,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-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java index a2ba985563..29ec181cc2 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java @@ -12,6 +12,8 @@ import androidx.fragment.app.FragmentTransaction; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.mvp.MvpFragment; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; +import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy; +import com.mogo.eagle.core.function.api.hmi.view.IViewNotification; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.map.CallerSmpManager; @@ -41,7 +43,7 @@ import java.lang.ref.WeakReference; * @author tongchenfei */ public class TaxiPassengerBaseFragment extends MvpFragment - implements IMogoMapListener, TaxiPassengerTaxiView, ITPClickStartAutopilotCallback { + implements IMogoMapListener, TaxiPassengerTaxiView, ITPClickStartAutopilotCallback, IMoGoHmiViewProxy.IViewNotificationProvider { static final String TAG = "TaxiPassengerBaseFragment"; @@ -49,7 +51,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment mArrivedEndView; private WeakReference mArrivedCheckView; @@ -82,8 +83,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment欢迎体验MOGO自动驾驶出租车 Hello,您好 - 请输出手机号后4位: + 请输入手机号后4位: 小蘑菇 删除 - - 点击开始 + + 点击开启 启动中... 自动驾驶启动失败,请与司机确认车辆状态 车辆尚未完成准备,不能启动自动驾驶 diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/constant/TaxiConst.kt b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/constant/TaxiConst.kt index 845e5bb961..cd34ecc455 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/constant/TaxiConst.kt +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/constant/TaxiConst.kt @@ -79,6 +79,6 @@ class TaxiConst { */ const val TYPE_MARKER_TAXI_ORDER = "TYPE_MARKER_TAXI_ORDER" - const val TIMER_START_AUTOPILOT_INTERVAL = 10 * 1000L + const val TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L } } \ No newline at end of file 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 f267c8125d..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 @@ -829,6 +830,7 @@ public class TaxiModel { && mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.getCode()) { // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后,置true FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setDemoMode(true); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为true(更新本地order信息)"); } } @@ -841,6 +843,7 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 取消或订单已完成时,置false FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setDemoMode(false); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为false(已完成or清除当前订单)"); } } @@ -1090,6 +1093,7 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后,置true FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setDemoMode(true); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为true(到达出发点且已开启自动驾驶)"); } } else if (mCurrentOCHOrder != null @@ -1141,9 +1145,14 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 到达目的地,置false FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setDemoMode(false); 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/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/presenter/TaxiPresenter.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/presenter/TaxiPresenter.java index 58d80c572c..f40200dc4c 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/presenter/TaxiPresenter.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/presenter/TaxiPresenter.java @@ -211,6 +211,7 @@ public class TaxiPresenter extends Presenter implements ITaxiADASS if (TaxiOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){ TaxiModel.getInstance().startDynamicCalculateRouteInfo(); + runOnUIThread(() -> mView.updateCtvAutopilotStatusTag(true)); } if (TaxiOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus || diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java index 9b94b4e277..17cc3cae09 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java @@ -15,6 +15,7 @@ import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.constraintlayout.widget.Group; import androidx.fragment.app.FragmentTransaction; @@ -44,6 +45,7 @@ import com.mogo.module.common.view.OnPreventFastClickListener; import com.mogo.och.taxi.R; import com.mogo.och.taxi.constant.TaxiConst; +import mogo.telematics.pad.MessagePad; import record_cache.RecordPanelOuterClass; @@ -73,6 +75,7 @@ public abstract class BaseTaxiTabFragment mUpgradeTipIv); + mAICollectBtn = findViewById(R.id.module_och_taxi_ai_collect_iv); + if (mAICollectBtn != null){ + CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn); + } panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer); ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() { @@ -255,6 +259,10 @@ public abstract class BaseTaxiTabFragment { AIAssist.getInstance(getContext()).speakTTSVoice(notice); @@ -296,8 +304,12 @@ public abstract class BaseTaxiTabFragment + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/bad_case_selector.xml b/OCH/mogo-och-taxi/src/main/res/drawable/bad_case_selector.xml new file mode 100755 index 0000000000..b0e7932bd4 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/res/drawable/bad_case_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml b/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml index 1b1b51a117..9410f9d8bc 100644 --- a/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml @@ -145,17 +145,6 @@ android:elevation="@dimen/dp_10" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/module_och_taxi_personal_layout"> - - +