Merge branch 'dev_robotaxi-d-app-module_2110_220915_2.11.0' into 'test_robotaxi-d-app-module_2110_220915_2.11.0.1'
Dev robotaxi d app module 2110 220915 2.11.0 See merge request zhjt/AndroidApp/MoGoEagleEye!269
This commit is contained in:
@@ -105,6 +105,7 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
|
||||
mCurrentArriveStation.setText("----");
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
removeProgressBar();
|
||||
}else {
|
||||
mCurrentArriveStation.setText(station);
|
||||
if (currentIndex == 0){
|
||||
|
||||
@@ -228,7 +228,7 @@ public class BusPassengerMapDirectionView
|
||||
|
||||
addRouteColorList();
|
||||
|
||||
if (mCoordinatesLatLng.size() > 2) {
|
||||
if (mLinePointsLatLng.size() > 2) {
|
||||
|
||||
//设置线段纹理
|
||||
PolylineOptions polylineOptions = new PolylineOptions();
|
||||
|
||||
@@ -148,7 +148,7 @@ public class BusPassengerRouteFragment extends
|
||||
if (latLngList.size() > 0) {
|
||||
drawablePolyline(latLngList,haveArrivedIndex);
|
||||
} else {
|
||||
clearPolyline();
|
||||
clearMapView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class BusPassengerRouteFragment extends
|
||||
});
|
||||
}
|
||||
} else {
|
||||
clearPolyline();
|
||||
clearMapView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,13 +185,13 @@ public class BusPassengerRouteFragment extends
|
||||
}
|
||||
}
|
||||
|
||||
public void clearPolyline() {
|
||||
public void clearMapView() {
|
||||
if (mMapDirectionView != null) {
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mMapDirectionView.clearPolyline();
|
||||
|
||||
mMapDirectionView.clearCoordinatesLatLng();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -230,7 +230,7 @@ public class BusPassengerRouteFragment extends
|
||||
mNoLineInfoView.setVisibility(View.VISIBLE);
|
||||
mRouteInfoView.setVisibility(View.GONE);
|
||||
updateArrivedStation(null,0,true);
|
||||
clearPolyline();
|
||||
clearMapView();
|
||||
clearMapMarkers();
|
||||
}
|
||||
}
|
||||
@@ -240,10 +240,10 @@ public class BusPassengerRouteFragment extends
|
||||
mNoLineInfoView.setVisibility(View.VISIBLE);
|
||||
mRouteInfoView.setVisibility(View.GONE);
|
||||
updateArrivedStation(null,0,true);
|
||||
clearPolyline();
|
||||
clearMapView();
|
||||
clearMapMarkers();
|
||||
}
|
||||
emptyTv.setText(getString(R.string.bus_p_no_task));
|
||||
emptyTv.setText(getString(R.string.bus_p_no_task));
|
||||
}
|
||||
|
||||
public void hideNoTaskView(){
|
||||
@@ -285,8 +285,7 @@ public class BusPassengerRouteFragment extends
|
||||
if (currentStationIndex == 0 && isArrived){ //到达始发站且并未出发, 恢复站点marker 清楚路径 清空路径点
|
||||
SharedPrefsMgr.getInstance(getContext())
|
||||
.remove(BusPassengerConst.BUS_SP_KEY_ORDER_SUM_DIS);
|
||||
if (mMapDirectionView != null) mMapDirectionView.clearCoordinatesLatLng();
|
||||
clearPolyline();
|
||||
clearMapView();
|
||||
}
|
||||
|
||||
if (stations.size() > 0){
|
||||
|
||||
@@ -56,7 +56,6 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
private int currentAutopilotStatus = -1;
|
||||
private List<BusStationBean> mStationList = new ArrayList<>();
|
||||
private int mCurrentStation = 0;
|
||||
// private boolean isRestartAutopilot = false;
|
||||
|
||||
public BusPresenter(BusFragment view) {
|
||||
super(view);
|
||||
@@ -157,6 +156,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) {
|
||||
CallerLogger.INSTANCE.e( M_BUS + TAG, "onAutopilotArriveAtStation arrive");
|
||||
BusOrderModel.getInstance().onArriveAt(arrivalNotification);
|
||||
}
|
||||
|
||||
@@ -177,9 +177,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
// 设置UI【自动驾驶】按钮是否展示
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(true));
|
||||
// if (BusOrderModel.getInstance().isGoingToNextStation()) {
|
||||
// runOnUIThread(() -> mView.hideSlidePanel());
|
||||
// }
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& (
|
||||
(mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1)
|
||||
@@ -189,9 +187,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能");
|
||||
return;
|
||||
}
|
||||
// 改变UI自动驾驶状态
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus));
|
||||
}
|
||||
// 改变UI自动驾驶状态
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus));
|
||||
break;
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
|
||||
if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
@@ -204,9 +202,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
break;
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE:
|
||||
if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
|
||||
if (currentAutopilotStatus == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {//2-->0语音提示
|
||||
// AIAssist.getInstance( getContext() ).speakTTSVoice( "自动驾驶已停止,请人工接管" );
|
||||
}
|
||||
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE;
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& (
|
||||
@@ -218,10 +214,10 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能");
|
||||
return;
|
||||
}
|
||||
runOnUIThread(() -> {
|
||||
mView.onAutopilotStatusChanged(currentAutopilotStatus);
|
||||
});
|
||||
}
|
||||
runOnUIThread(() -> {
|
||||
mView.onAutopilotStatusChanged(currentAutopilotStatus);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(false));
|
||||
|
||||
@@ -1162,7 +1162,7 @@ public class TaxiModel {
|
||||
// 当美化模式(演示模式)开启时:且有订单、且为去往目的地状态,维持自动驾驶icon开启状态
|
||||
return;
|
||||
}
|
||||
if (state != mPrevAPStatus && mADASStatusCallback != null){
|
||||
if (mADASStatusCallback != null){
|
||||
mADASStatusCallback.onAutopilotEnable();
|
||||
}
|
||||
mPrevAPStatus = state;
|
||||
@@ -1174,7 +1174,7 @@ public class TaxiModel {
|
||||
// 当美化模式(演示模式)开启时:且有订单、且为去往目的地状态,维持自动驾驶icon开启状态
|
||||
return;
|
||||
}
|
||||
if (state != mPrevAPStatus && mADASStatusCallback != null){
|
||||
if (mADASStatusCallback != null){
|
||||
mADASStatusCallback.onAutopilotDisable();
|
||||
}
|
||||
mPrevAPStatus = state;
|
||||
@@ -1192,7 +1192,7 @@ public class TaxiModel {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (state != mPrevAPStatus && mADASStatusCallback != null){
|
||||
if (mADASStatusCallback != null){
|
||||
mADASStatusCallback.onManMachineCoDriving();
|
||||
}
|
||||
mPrevAPStatus = state;
|
||||
|
||||
@@ -266,27 +266,31 @@ public class TaxiPersonalDialogFragment extends DialogFragment implements View.O
|
||||
}
|
||||
|
||||
public void onOrdersListPageRefresh(List<OrderQueryRespBean.Result> ordersList){
|
||||
if (null == ordersList && mNextPage == 0){//无数据
|
||||
mOrdersRv.setVisibility(View.GONE);
|
||||
mNoDatas.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
mOrdersRv.setVisibility(View.VISIBLE);
|
||||
mNoDatas.setVisibility(View.GONE);
|
||||
if ((null == ordersList) || (ordersList.size() < mPerPageSize && mNextPage > 0)){//已经没有更多数据,提示无数据
|
||||
//已经没有更多数据
|
||||
serverHadNoData = true;
|
||||
try {
|
||||
if (null == ordersList && mNextPage == 0){//无数据
|
||||
mOrdersRv.setVisibility(View.GONE);
|
||||
mNoDatas.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
mOrdersRv.setVisibility(View.VISIBLE);
|
||||
mNoDatas.setVisibility(View.GONE);
|
||||
if ((null == ordersList) || (ordersList.size() < mPerPageSize && mNextPage > 0)){//已经没有更多数据,提示无数据
|
||||
//已经没有更多数据
|
||||
serverHadNoData = true;
|
||||
orders.addAll(ordersList);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mNextPage = mNextPage +1;
|
||||
return;
|
||||
}
|
||||
serverHadNoData = false;
|
||||
orders.addAll(ordersList);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
if(mAdapter!=null) {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mNextPage = mNextPage +1;
|
||||
return;
|
||||
}catch (Exception e){
|
||||
e.fillInStackTrace();
|
||||
}
|
||||
serverHadNoData = false;
|
||||
orders.addAll(ordersList);
|
||||
if(mAdapter!=null) {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mNextPage = mNextPage +1;
|
||||
}
|
||||
|
||||
class OrderAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
|
||||
|
||||
@@ -86,10 +86,12 @@ public class MogoRouteOverlayManager implements
|
||||
return;
|
||||
}
|
||||
synchronized (queue) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.peekLast();
|
||||
if (items != null && !items.isEmpty()) {
|
||||
Logger.d(TAG, "--- onLocationChanged -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().drawTrajectoryList(items, location.getBearing());
|
||||
if (!queue.isEmpty()) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.pollLast();
|
||||
if (items != null && !items.isEmpty()) {
|
||||
Logger.d(TAG, "--- onLocationChanged -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().drawTrajectoryList(items, location.getBearing());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,14 +63,13 @@ public class RouteOverlayDrawer {
|
||||
}
|
||||
|
||||
public void clearMogoRouteOverlay() {
|
||||
if (mRenderTask != null) {
|
||||
mRenderHandler.removeCallbacks(mRenderTask);
|
||||
}
|
||||
if (mMoGoPolyline != null) {
|
||||
mMoGoPolyline.remove();
|
||||
mMoGoPolyline = null;
|
||||
}
|
||||
|
||||
if (mRenderTask != null) {
|
||||
mRenderHandler.removeCallbacks(mRenderTask);
|
||||
}
|
||||
}
|
||||
|
||||
private class RenderTask implements Runnable {
|
||||
|
||||
Reference in New Issue
Block a user