Merge branch 'dev_robotaxi-d-app-module_270_220510_2.7.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_270_220510_2.7.0
@@ -8,7 +8,7 @@
|
||||
android:id="@+id/steering_wheel"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_marginLeft="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_112"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -20,24 +20,29 @@
|
||||
android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin"
|
||||
android:layout_marginTop="@dimen/dp_112"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="invisible"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/bus_p_un_auto_nor"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="@dimen/bus_p_curent_station_panel_width"
|
||||
android:layout_height="@dimen/bus_p_curent_station_panel_height"
|
||||
android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin"
|
||||
android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin_left"
|
||||
android:layout_marginBottom="@dimen/bus_p_curent_station_panel_margin"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:alpha="0.99"
|
||||
app:cardElevation="@dimen/dp_5"
|
||||
app:cardBackgroundColor="@color/bus_p_panel_cur_station_panel_color"
|
||||
app:cardCornerRadius="20px"/>
|
||||
app:bgColor="@color/bus_p_panel_cur_station_panel_color"
|
||||
app:blurRadius="@dimen/dp_12"
|
||||
app:shadowRadius="@dimen/dp_20"
|
||||
app:shadowColor="@color/bus_p_panel_edge_shadow"
|
||||
app:xOffset="0px"
|
||||
app:yOffset="0px">
|
||||
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_cur_station_title"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<dimen name="bus_p_curent_station_panel_width">638px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_height">316px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_margin">50px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_margin_left">38px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size">44px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size1">55px</dimen>
|
||||
<dimen name="bus_p_curent_station_tip_size1">40px</dimen>
|
||||
|
||||
@@ -26,4 +26,5 @@
|
||||
<color name="bus_p_panel_cur_station_panel_color">#E6E9EFFC</color>
|
||||
<color name="bus_p_route_view_left_edge_shadow">#33394C63</color>
|
||||
<color name="bus_p_traffic_txt_color">#2D3E5F</color>
|
||||
<color name="bus_p_panel_edge_shadow">#33394C63</color>
|
||||
</resources>
|
||||
@@ -50,7 +50,8 @@
|
||||
|
||||
<dimen name="bus_p_curent_station_panel_width">638px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_height">316px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_margin">50px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_margin">38px</dimen>
|
||||
<dimen name="bus_p_curent_station_panel_margin_left">38px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size">44px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size1">55px</dimen>
|
||||
<dimen name="bus_p_curent_station_tip_size1">40px</dimen>
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -77,8 +78,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
|
||||
//远景和中景的切换
|
||||
private ImageView mSwitchMapModeImage;
|
||||
private FrameLayout mSwitchMapModeLayout;
|
||||
private TextView mSwitchText;
|
||||
private LinearLayout mSwitchMapModeLayout;
|
||||
|
||||
private ObjectAnimator autopilotLoadingAnimator;
|
||||
|
||||
@@ -123,7 +123,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
|
||||
mSwitchMapModeLayout = findViewById(R.id.bus_switch_model_layout);
|
||||
mSwitchMapModeImage = findViewById(R.id.bus_switch_model_icon);
|
||||
mSwitchText = findViewById(R.id.bus_switch_model_text);
|
||||
updateSwitchMapIcon();
|
||||
|
||||
mSwitchMapModeLayout.setOnClickListener(new OnPreventFastClickListener() {
|
||||
|
||||
@@ -133,11 +133,11 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchText.setText(R.string.bus_map_model_normal);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchText.setText(R.string.bus_map_model_faster);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -217,6 +217,14 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
CallerHmiManager.INSTANCE.registerUpgradeTipsCallback(() -> mUpgradeTipIv);
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
}
|
||||
}
|
||||
|
||||
private void debugArrivedRoute() {
|
||||
BDRouteDataTestUtils.converToRouteData();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager;
|
||||
@@ -334,10 +335,12 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
.latitude(lat)
|
||||
.longitude(longi);
|
||||
IMogoMarker marker = MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .addMarker(uuid, options);
|
||||
marker.setRotateAngle(CallerHDMapManager.INSTANCE.getCenterLineInfo(
|
||||
longi,lat,-1)
|
||||
.getAngle()
|
||||
.floatValue());
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(
|
||||
longi,lat,-1);
|
||||
if (null != centerLine){ // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
|
||||
}else {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "RemoveMapMaker=",uuid+"=latitude="+lat+",longitude="+longi);
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).removeMarkers(uuid);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
import com.mogo.och.bus.callback.IBusLinesCallback;
|
||||
@@ -53,7 +54,11 @@ public class BusLineModel {
|
||||
|
||||
@Override
|
||||
public void onFail(String failMsg) {
|
||||
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.longTip("查询所有绑定路线失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -69,7 +74,11 @@ public class BusLineModel {
|
||||
|
||||
@Override
|
||||
public void onFail(String failMsg) {
|
||||
TipToast.longTip("切换路线失败");
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.longTip("切换路线失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -461,6 +461,8 @@ public class BusOrderModel {
|
||||
public void onFail(String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else{
|
||||
TipToast.longTip("离站上报失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -548,7 +550,10 @@ public class BusOrderModel {
|
||||
public void onFail(String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.longTip("离站上报失败:"+failMsg);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -605,7 +610,7 @@ public class BusOrderModel {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip(failMsg);
|
||||
TipToast.shortTip("收车失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -632,7 +637,7 @@ public class BusOrderModel {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip(failMsg);
|
||||
TipToast.shortTip("出车失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -659,8 +664,9 @@ public class BusOrderModel {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip(failMsg);
|
||||
TipToast.shortTip("出车收车状态查询:"+failMsg);
|
||||
}
|
||||
queryOperationStatus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
@@ -71,49 +71,28 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<FrameLayout
|
||||
android:id="@+id/bus_switch_model_layout"
|
||||
android:layout_width="@dimen/bus_switch_map"
|
||||
android:layout_height="@dimen/bus_switch_map_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bus_switch_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/bus_switch_model_layout"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_switch_model_icon"
|
||||
android:layout_width="@dimen/bus_switch_image"
|
||||
android:layout_height="@dimen/bus_switch_image"
|
||||
android:paddingLeft="@dimen/bus_switch_margin_left"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:src="@drawable/bus_switch_map_angle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_switch_model_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/bus_switch_margin_left"
|
||||
android:textSize="@dimen/bus_switch_text_size"
|
||||
android:gravity="right|center"
|
||||
android:text="@string/bus_map_model_normal"
|
||||
android:textColor="@color/module_ext_color_voice_text" />
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
<CheckedTextView
|
||||
android:id="@+id/module_mogo_och_operation_status"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
@@ -122,8 +101,10 @@
|
||||
android:textColor="@color/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_switch_model_layout"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_switch_model_layout" />
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_setting_layout"
|
||||
@@ -134,7 +115,7 @@
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_operation_status">
|
||||
app:layout_constraintLeft_toRightOf="@id/bus_switch_model_layout">
|
||||
<ImageView
|
||||
android:id="@+id/module_och_bus_upgrade_red_tip"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -62,6 +62,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
@@ -69,6 +70,7 @@ dependencies {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:mogo-core-res')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.callback;
|
||||
|
||||
public interface ITaxiPassengerCheckPhoneCallback {
|
||||
//验证手机号并流转状态
|
||||
void onCheckPhoneAndUpdateOrderStatus(String phoneTail);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.mogo.och.taxi.passenger.callback;
|
||||
|
||||
public interface ITaxiPassengerScoreCallback {
|
||||
void onScoreCallback(int fraction,String orderNo);
|
||||
}
|
||||
@@ -653,7 +653,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
|
||||
queryOrderRouteList();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -702,11 +702,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
});
|
||||
}
|
||||
|
||||
public void arrivedAndScore(int score, ITaxiPassengerCommonValueCallback<Boolean> commonCallback) {
|
||||
if (mCurrentOCHOrder == null) return;
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "--route--- checkPhoneAndUpdateStatus");
|
||||
TaxiPassengerServiceManager.getInstance().arrivedAndScore(mContext,mCurrentOCHOrder.orderNo,
|
||||
score, new TaxiPassengerServiceCallback<TaxiPassengerBaseRespBean>() {
|
||||
public void arrivedAndScore(int score,String orderNo ,ITaxiPassengerCommonValueCallback<Boolean> commonCallback) {
|
||||
if (orderNo == null) return;
|
||||
TaxiPassengerServiceManager.getInstance().arrivedAndScore(mContext,orderNo,score,
|
||||
new TaxiPassengerServiceCallback<TaxiPassengerBaseRespBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaxiPassengerBaseRespBean data) {
|
||||
ToastUtils.showLong("评分成功");
|
||||
|
||||
@@ -123,7 +123,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
|
||||
@Override
|
||||
public void onCurrentOrderStatusChanged(TaxiPassengerOrderQueryRespBean.Result order) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, GsonUtil.jsonFromObject(order));
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, GsonUtil.jsonFromObject(order));
|
||||
if (mCurrentPassengerOrder == null){
|
||||
mCurrentPassengerOrder = order; //当前无订单
|
||||
updateOrderView(order);
|
||||
@@ -145,43 +145,45 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
|
||||
private void updateOrderView(TaxiPassengerOrderQueryRespBean.Result order) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P+TAG,"updateOrderView = "+order.orderStatus);
|
||||
// 70 取消订单
|
||||
if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == order.orderStatus){
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideServingOrderFragment(false);
|
||||
mView.showOrHidePressengerCheckPager(false, "",
|
||||
"", "", "", "");
|
||||
mView.showOrHideArrivedEndLayout(false,"");
|
||||
mView.showOrHideArrivedEndLayout(false,"","");
|
||||
});
|
||||
TaxiPassengerModel.getInstance().recoverNaviInfo();
|
||||
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
|
||||
return;
|
||||
}
|
||||
// 20 司机到达上车点
|
||||
if (TaxiPassengerOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus) {
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideArrivedEndLayout(false, "");
|
||||
mView.showOrHidePressengerCheckPager(true, order.startSiteAddr,
|
||||
mView.preOrderThankPageTenlogic(order.startSiteAddr,
|
||||
order.endSiteAddr, order.passengerNum, order.carNumber, order.passengerPhone);
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 30 用户到达上车点 并通过了手机号后四位验证
|
||||
// 40 服务中
|
||||
if (TaxiPassengerOrderStatusEnum.UserArriveAtStart.getCode() == order.orderStatus
|
||||
|| TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
|
||||
runOnUIThread(() -> mView.showOrHideServingOrderFragment(true));
|
||||
return;
|
||||
}
|
||||
// 50 到达终点 乘客可以评价
|
||||
if (TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus){
|
||||
TaxiPassengerModel.getInstance().recoverNaviInfo();
|
||||
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideServingOrderFragment(false);
|
||||
mView.showOrHideArrivedEndLayout(true, order.endSiteAddr);
|
||||
mView.showOrHideArrivedEndLayout(true, order.endSiteAddr,order.orderNo);
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 60 服务完成 页面
|
||||
if (TaxiPassengerOrderStatusEnum.JourneyCompleted.getCode() == order.orderStatus){
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideServingOrderFragment(false);
|
||||
});
|
||||
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
|
||||
mCurrentPassengerOrder = null;
|
||||
return;
|
||||
@@ -201,14 +203,8 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
*
|
||||
* @param score 分数
|
||||
*/
|
||||
public void arrivedAndScore(int score){
|
||||
TaxiPassengerModel.getInstance().arrivedAndScore(score, new ITaxiPassengerCommonValueCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCommonCallback(Boolean aBoolean) {
|
||||
mView.showArrivedEndLayout2Thank(aBoolean);
|
||||
}
|
||||
});
|
||||
public void arrivedAndScore(int score,String orderNo){
|
||||
TaxiPassengerModel.getInstance().arrivedAndScore(score,orderNo, aBoolean -> mView.showArrivedEndLayout2Thank(aBoolean));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.och.taxi.passenger.ui
|
||||
|
||||
import android.animation.*
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.AnimationDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -13,9 +14,20 @@ import android.widget.TextView
|
||||
import com.amap.api.navi.view.PoiInputSearchWidget
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils
|
||||
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
import com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCommonValueCallback
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCommonCallback
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerScoreCallback
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -41,12 +53,21 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
private lateinit var ivStarThird: ImageView
|
||||
private lateinit var ivStarFourth: ImageView
|
||||
private lateinit var ivStarFifth: ImageView
|
||||
private lateinit var ivAnimalList: ImageView
|
||||
private lateinit var svpFrame: SimpleVideoPlayer
|
||||
private var subscribe: Disposable?=null
|
||||
private var orderNo = ""
|
||||
|
||||
var taxiPassengerCommonValueCallback: ITaxiPassengerCommonValueCallback<Int>?=null
|
||||
var trAnimation: Animation = AnimationUtils.loadAnimation(
|
||||
private val gsyVideoOptionBuilder = GSYVideoOptionBuilder()
|
||||
|
||||
|
||||
var iTaxiPassengerScoreCallback: ITaxiPassengerScoreCallback?=null
|
||||
|
||||
var taxiPassengerCommonCallback: ITaxiPassengerCommonCallback?=null
|
||||
var left2Right: Animation = AnimationUtils.loadAnimation(
|
||||
context, R.anim.left_to_right
|
||||
)
|
||||
var troutAnimation: Animation = AnimationUtils.loadAnimation(
|
||||
var right2Left: Animation = AnimationUtils.loadAnimation(
|
||||
context, R.anim.right_to_left
|
||||
)
|
||||
var alphaAnimation: Animation = AnimationUtils.loadAnimation(
|
||||
@@ -55,6 +76,9 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
|
||||
private var allStartOrdered = mutableListOf<ImageView>()
|
||||
|
||||
var show: Boolean = false
|
||||
var showThanks:Boolean = false
|
||||
|
||||
private fun initView(context: Context) {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "initView")
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_arrived_end_panel, this, true)
|
||||
@@ -62,17 +86,31 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
tvFeel = findViewById(R.id.tv_feel)
|
||||
ochShadowLayout = findViewById(R.id.och_shadow_layout)
|
||||
ochThankShadowLayout = findViewById(R.id.och_thank_shadow_layout)
|
||||
ivAnimalList = findViewById(R.id.iv_animal_list)
|
||||
svpFrame = findViewById(R.id.svp_frame)
|
||||
|
||||
allStartOrdered = mutableListOf<ImageView>()
|
||||
allStartOrdered = mutableListOf()
|
||||
initScore()
|
||||
|
||||
findViewById<View>(R.id.tv_please_score).setOnClickListener(this)
|
||||
|
||||
// debug 弹出
|
||||
mArrivedEndStation.setOnLongClickListener {
|
||||
showThanksPageWithAnimation(true)
|
||||
scoreSuccess()
|
||||
false
|
||||
}
|
||||
|
||||
val url = "android.resource://" + context.packageName + "/" + R.raw.end_video
|
||||
gsyVideoOptionBuilder.setUrl(url)
|
||||
.setCacheWithPlay(false)
|
||||
.setPlayTag("TaxiPassengerArrivedView")
|
||||
.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||
override fun onAutoComplete(url: String?, vararg objects: Any?) {
|
||||
svpFrame.setBackgroundResource(R.drawable.tail_ani_0090)
|
||||
}
|
||||
})
|
||||
.build(svpFrame)
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
||||
}
|
||||
|
||||
private fun initScore() {
|
||||
@@ -94,10 +132,26 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
allStartOrdered.add(ivStarFifth)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
show = true
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
svpFrame.setBackgroundResource(R.drawable.tail_ani_0000)
|
||||
super.onDetachedFromWindow()
|
||||
show = false
|
||||
subscribe?.let {
|
||||
if (!it.isDisposed) {
|
||||
it.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
when (v?.id) {
|
||||
R.id.tv_please_score -> {
|
||||
taxiPassengerCommonValueCallback?.onCommonCallback(2)
|
||||
iTaxiPassengerScoreCallback?.onScoreCallback(2,orderNo)
|
||||
}
|
||||
R.id.iv_star_first -> {commitAndStartAnimation(1,"不满意")}
|
||||
R.id.iv_star_second -> {commitAndStartAnimation(2,"不满意")}
|
||||
@@ -127,6 +181,9 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 星星动画
|
||||
*/
|
||||
private fun animation(fraction: Int) {
|
||||
|
||||
val showView = allStartOrdered[currentAnimarion]
|
||||
@@ -171,42 +228,86 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
set.addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
super.onAnimationEnd(animation)
|
||||
taxiPassengerCommonValueCallback?.onCommonCallback(fraction)
|
||||
iTaxiPassengerScoreCallback?.onScoreCallback(fraction,orderNo)
|
||||
}
|
||||
})
|
||||
}
|
||||
set.start()
|
||||
}
|
||||
|
||||
|
||||
fun setDataAndStartAnimation(endSiteAddr: String?) {
|
||||
/**
|
||||
* 设置目的地重置星星状态
|
||||
*/
|
||||
fun setDataAndStartAnimation(endSiteAddr: String?,orderId:String) {
|
||||
mArrivedEndStation.text = endSiteAddr
|
||||
ochShadowLayout.startAnimation(trAnimation)
|
||||
ochThankShadowLayout.visibility = View.GONE
|
||||
ivAnimalList.visibility = View.GONE
|
||||
|
||||
svpFrame.startButton.performClick()
|
||||
postDelayed({
|
||||
ochShadowLayout.visibility = View.VISIBLE
|
||||
ochShadowLayout.startAnimation(left2Right)
|
||||
},1928)
|
||||
|
||||
showThanks = false
|
||||
this.orderNo = orderId
|
||||
resetStar()
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论成功 向左移动并消失 消失后感谢页面透明度0-1 然后开始小手的动画
|
||||
*/
|
||||
fun scoreSuccess(){
|
||||
right2Left.setAnimationListener(object :PoiInputSearchWidget.AnimationListenerAdapter(){
|
||||
override fun onAnimationEnd(p0: Animation?) {
|
||||
ochShadowLayout.visibility = View.GONE
|
||||
ochThankShadowLayout.startAnimation(alphaAnimation)
|
||||
alphaAnimation.setAnimationListener(object : PoiInputSearchWidget.AnimationListenerAdapter(){
|
||||
override fun onAnimationStart(p0: Animation?) {
|
||||
ochThankShadowLayout.visibility = View.VISIBLE
|
||||
showThanks = true
|
||||
}
|
||||
override fun onAnimationEnd(p0: Animation?) {
|
||||
ivAnimalList.visibility = View.VISIBLE
|
||||
val animationDrawable = ivAnimalList.drawable as AnimationDrawable
|
||||
animationDrawable.start()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
ochShadowLayout.startAnimation(right2Left)
|
||||
|
||||
// 10s 后逻辑
|
||||
subscribe = Observable.timer(10000, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
// 正在展示感谢页面
|
||||
if (taxiPassengerCommonCallback == null) {
|
||||
// 没有用户确定页面
|
||||
OverlayViewUtils.dismissOverlayView(this@TaxiPassengerArrivedView)
|
||||
} else {
|
||||
// 有排队展示的用户确定页面
|
||||
taxiPassengerCommonCallback?.onCommonCallback()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论失败 重置状态
|
||||
*/
|
||||
fun scoreFail(){
|
||||
scoreSuccess()
|
||||
// tvFeel.text = ""
|
||||
// resetStar()
|
||||
}
|
||||
|
||||
private fun resetStar() {
|
||||
allStartOrdered.forEach {
|
||||
it.setImageResource(R.drawable.taxi_p_passenger_star)
|
||||
it.isEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
fun showThanksPageWithAnimation(isSuccess:Boolean) {
|
||||
if(!isSuccess){
|
||||
tvFeel.text = ""
|
||||
allStartOrdered.forEach {
|
||||
it.setImageResource(R.drawable.taxi_p_passenger_star)
|
||||
it.isEnabled = true
|
||||
}
|
||||
return
|
||||
}
|
||||
troutAnimation.setAnimationListener(object :PoiInputSearchWidget.AnimationListenerAdapter(){
|
||||
override fun onAnimationEnd(p0: Animation?) {
|
||||
ochShadowLayout.visibility = View.GONE
|
||||
ochThankShadowLayout.startAnimation(alphaAnimation)
|
||||
ochThankShadowLayout.visibility = View.VISIBLE
|
||||
}
|
||||
})
|
||||
ochShadowLayout.startAnimation(troutAnimation)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "TaxiPassengerArrivedView"
|
||||
}
|
||||
|
||||
@@ -78,10 +78,8 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
mV2XNotificationView = new TaxiPassengerV2XNotificationView(getContext());
|
||||
CallerHmiManager.INSTANCE.setProxyNotificationView(mV2XNotificationView);
|
||||
|
||||
initArrivedView();
|
||||
initCheckView();
|
||||
|
||||
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_iv);
|
||||
updateSwitchMapIcon();
|
||||
initListener();
|
||||
|
||||
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
@@ -93,6 +91,13 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
private void initListener(){
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -102,36 +107,30 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.iv_temp).setOnLongClickListener(new View.OnLongClickListener() {
|
||||
int i = 0;
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
if(i%2==0){
|
||||
showOrHideArrivedEndLayout(true,"北京北京北京");
|
||||
}else {
|
||||
showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
}
|
||||
i++;
|
||||
return false;
|
||||
}
|
||||
findViewById(R.id.iv_temp).setOnClickListener(view -> {
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//CallerHmiManager.INSTANCE.showToolsView();
|
||||
});
|
||||
}
|
||||
|
||||
private void initArrivedView(){
|
||||
mArrivedEndView = new WeakReference<>(new TaxiPassengerArrivedView(getContext()));
|
||||
mArrivedEndView.get().setTaxiPassengerCommonValueCallback(integer -> getPresenter().arrivedAndScore(integer));
|
||||
mArrivedEndView.get().setITaxiPassengerScoreCallback((fraction, orderNo) -> getPresenter().arrivedAndScore(fraction,orderNo));
|
||||
}
|
||||
|
||||
private void initCheckView() {
|
||||
mArrivedCheckView = new WeakReference<>(new TaxiPassengerCheckView(getContext()));
|
||||
mArrivedCheckView.get().setOnCheckPhoneAndUpdateStatusListener(phoneTail -> getPresenter().checkAndUpdateStatus(phoneTail));
|
||||
mArrivedCheckView.get().setITaxiPassengerCommonValueCallback(phoneTail -> getPresenter().checkAndUpdateStatus(phoneTail));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,8 +214,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}, 1000L);
|
||||
}
|
||||
|
||||
private boolean isStarting = false;
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected BaseTaxiPassengerPresenter createPresenter() {
|
||||
@@ -267,20 +264,63 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
|
||||
/**
|
||||
* 显示或者隐藏到达乘客站点的洁面
|
||||
* @param isShow
|
||||
* ① 取消订单 可有可无
|
||||
* ② 到达上车点 隐藏到达终点的页面(上一个订单没有评价)
|
||||
* ③ 到达目的地 显示到达终点的页面
|
||||
* ④ debug 使用
|
||||
* @param isShow true 展示 false 隐藏
|
||||
* @param arrivedEndStation 目的地
|
||||
* @param orderNo 订单No
|
||||
*/
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation){
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation,String orderNo){
|
||||
if (isShow){
|
||||
if(mArrivedEndView.get()==null){
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
initArrivedView();
|
||||
}
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get(), R.style.och_window_anim_alpha);
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation);
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get(),R.style.och_window_anim_alpha);
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation,orderNo);
|
||||
}else {
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedEndView.get());
|
||||
}
|
||||
}
|
||||
// 20 司机到达上车点
|
||||
// 展示:① 没有在展示打分用、感谢页面 用户手机号验证页面
|
||||
// ② 正在展示打分页面 关闭打分页面展示用户手机号验证页面 eg:上一个用户正在打分中 出现错乱
|
||||
// 正在展示感谢页面 等待感谢页面展示够10s后 关闭感谢页面展示 用户手机号验证页面
|
||||
public void preOrderThankPageTenlogic(String startSiteAddr,
|
||||
String endSiteAddr,
|
||||
String passengerNum,
|
||||
String carNumber,
|
||||
String phone){
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null||!mArrivedEndView.get().getShow()){
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
}else {
|
||||
if (mArrivedEndView.get().getShowThanks()) {
|
||||
// 正在展示感谢页面
|
||||
mArrivedEndView.get().setTaxiPassengerCommonCallback(() -> {
|
||||
showOrHideArrivedEndLayout(false, "","");
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
mArrivedEndView.get().setTaxiPassengerCommonCallback(null);
|
||||
});
|
||||
}else {
|
||||
// 正在展示打分页面
|
||||
showOrHideArrivedEndLayout(false, "","");
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* ① 取消订单 到达上车点后乘客取消订单 隐藏乘客验证页面
|
||||
* ② 司机到达上车点 到达上车点 展示乘客验证页面
|
||||
* ③ 乘客到达上车点 手机号验证成功后 隐藏乘客验证页面
|
||||
* ④ debug 使用
|
||||
*/
|
||||
public void showOrHidePressengerCheckPager(boolean isShow, String startSiteAddr,
|
||||
String endSiteAddr,
|
||||
String passengerNum,
|
||||
@@ -288,7 +328,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
String phone) {
|
||||
try {
|
||||
if (isShow) {
|
||||
if(mArrivedCheckView.get()==null){
|
||||
if(mArrivedCheckView==null||mArrivedCheckView.get()==null){
|
||||
initCheckView();
|
||||
}
|
||||
mArrivedCheckView.get().setData(startSiteAddr, endSiteAddr, passengerNum, carNumber,phone);
|
||||
@@ -301,10 +341,18 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户评分后接口回调
|
||||
* @param isSuccess true 打分成功 false 打分失败
|
||||
*/
|
||||
public void showArrivedEndLayout2Thank(boolean isSuccess) {
|
||||
if(mArrivedEndView.get()==null){
|
||||
initArrivedView();
|
||||
}
|
||||
mArrivedEndView.get().showThanksPageWithAnimation(isSuccess);
|
||||
if(isSuccess){
|
||||
mArrivedEndView.get().scoreSuccess();
|
||||
}else {
|
||||
mArrivedEndView.get().scoreFail();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,9 @@ import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCheckPhoneCallback
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCommonValueCallback
|
||||
|
||||
/**
|
||||
* V2X预警事件view:通过FloatWindow呈现,无需加入到自定义layout中
|
||||
@@ -32,7 +31,7 @@ class TaxiPassengerCheckView :RelativeLayout, View.OnClickListener {
|
||||
|
||||
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
var onCheckPhoneAndUpdateStatusListener: ITaxiPassengerCheckPhoneCallback?=null
|
||||
var iTaxiPassengerCommonValueCallback: ITaxiPassengerCommonValueCallback<String>?=null
|
||||
|
||||
private lateinit var tvPassengerCount: TextView
|
||||
private lateinit var tvPassengerStart: TextView
|
||||
@@ -115,7 +114,7 @@ class TaxiPassengerCheckView :RelativeLayout, View.OnClickListener {
|
||||
ToastUtils.showLong("请输入正确的手机尾号")
|
||||
return
|
||||
}
|
||||
onCheckPhoneAndUpdateStatusListener?.onCheckPhoneAndUpdateOrderStatus(numberStr)
|
||||
iTaxiPassengerCommonValueCallback?.onCommonCallback(numberStr)
|
||||
}
|
||||
|
||||
private fun selectIndex(i: Int) {
|
||||
@@ -141,7 +140,7 @@ class TaxiPassengerCheckView :RelativeLayout, View.OnClickListener {
|
||||
index--
|
||||
}
|
||||
changeStyle()
|
||||
return
|
||||
//return
|
||||
}
|
||||
numSelect[index] = null
|
||||
numSelectTextView[index]!!.text = ""
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500" android:fromAlpha="0" android:toAlpha="1" />
|
||||
android:duration="1000" android:fromAlpha="0" android:toAlpha="1" />
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" android:startOffset="500" >
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" android:startOffset="500" >
|
||||
<translate
|
||||
android:duration="1000"
|
||||
android:duration="142"
|
||||
android:fromXDelta="-110%"
|
||||
android:toXDelta="0"/>
|
||||
</set>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" android:startOffset="500" >
|
||||
<translate
|
||||
android:duration="1000"
|
||||
android:duration="142"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-110%"/>
|
||||
</set>
|
||||
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/hand_00000" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00002" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00004" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00006" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00008" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00010" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00012" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00014" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00016" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00018" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00020" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00022" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00024" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00026" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00028" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00030" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00032" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00034" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00036" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00038" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00060" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00042" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00044" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00046" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00048" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00050" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00052" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00054" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00056" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00058" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00060" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00062" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00064" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00066" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00068" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00069" android:duration="60"/>
|
||||
|
||||
</animation-list>
|
||||
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00000.png
Executable file
|
After Width: | Height: | Size: 156 B |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00002.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00004.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00006.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00008.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00010.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00012.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00014.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00016.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00018.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00020.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00022.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00024.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00026.png
Executable file
|
After Width: | Height: | Size: 28 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00028.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00030.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00032.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00034.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00036.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00038.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00040.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00042.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00044.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00046.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00048.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00050.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00052.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00054.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00056.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00058.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00060.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00062.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00064.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00066.png
Executable file
|
After Width: | Height: | Size: 28 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00068.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable/hand_00069.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 41 KiB |
@@ -2,12 +2,18 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cl_contain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/taxi_p_arrive_end_panel_bg"
|
||||
android:id="@+id/cl_content"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
android:id="@+id/svp_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/och_shadow_layout"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -20,6 +26,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:shadowColor="#80000000"
|
||||
app:shadowRadius="60px"
|
||||
android:visibility="gone"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0px"
|
||||
app:yOffset="0px">
|
||||
@@ -237,4 +244,14 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_animal_list"
|
||||
android:layout_width="@dimen/dp_520"
|
||||
android:layout_height="@dimen/dp_800"
|
||||
android:src="@drawable/bg_taxi_score_success"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_89"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/och_thank_shadow_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -11,7 +11,7 @@
|
||||
android:layout_width="@dimen/dp_630"
|
||||
android:layout_height="@dimen/dp_630"
|
||||
android:layout_marginLeft="-59px"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginTop="-40px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
android:layout_marginLeft="40px"
|
||||
android:layout_marginTop="40px"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_switch_map_bg"
|
||||
android:background="@drawable/taxi_p_switch_map_medium"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
@@ -46,12 +46,12 @@
|
||||
android:layout_width="300px"
|
||||
android:layout_height="76px"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_mogologo_nor"
|
||||
android:visibility="gone"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAutopilotDisable"
|
||||
|
||||
BIN
OCH/mogo-och-taxi-passenger/src/main/res/raw/end_video.mp4
Normal file
@@ -285,10 +285,13 @@ public class TaxiModel {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}
|
||||
queryCarStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
queryCarStatus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -314,6 +317,8 @@ public class TaxiModel {
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,12 +460,14 @@ public class TaxiModel {
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
// TipToast.shortTip(code + "," + msg);
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -486,9 +493,18 @@ public class TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
// TipToast.shortTip(code + "," + msg);
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -506,9 +522,18 @@ public class TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
// TipToast.shortTip(code + "," + msg);
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -551,9 +576,18 @@ public class TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
TipToast.shortTip("请求异常,请稍后重试");
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -635,9 +669,18 @@ public class TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
TipToast.shortTip("请求异常,请稍后重试");
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -721,8 +764,17 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip("请求出现异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
TipToast.shortTip(code + "," + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1094,6 +1146,11 @@ public class TaxiModel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
// TODO: 2022/5/18 是否在请求异常时候进行提示
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
|
||||
@@ -1171,22 +1228,27 @@ public class TaxiModel {
|
||||
* 查询当前订单的全局路径 (当自动驾驶开启后,订单前往乘客上车点,杀掉应用再次进来时候)
|
||||
*/
|
||||
private void queryOrderRouteList(String orderNo) {
|
||||
if (mCurrentOCHOrder != null){
|
||||
TaxiServiceManager.getInstance().queryOrderRoute(mContext, orderNo,
|
||||
new TaxiServiceCallback<QueryOrderRouteResp>() {
|
||||
@Override
|
||||
public void onSuccess(QueryOrderRouteResp data) {
|
||||
if (data != null && data.data != null){
|
||||
mRoutePoints.clear();
|
||||
mRoutePoints.addAll(data.data);
|
||||
}
|
||||
}
|
||||
if (mCurrentOCHOrder != null) {
|
||||
TaxiServiceManager.getInstance().queryOrderRoute(mContext, orderNo,
|
||||
new TaxiServiceCallback<QueryOrderRouteResp>() {
|
||||
@Override
|
||||
public void onSuccess(QueryOrderRouteResp data) {
|
||||
if (data != null && data.data != null) {
|
||||
mRoutePoints.clear();
|
||||
mRoutePoints.addAll(data.data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
@Override
|
||||
public void onError() {
|
||||
// TODO: 2022/5/18 是否在请求异常的时候提示
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ interface TaxiServiceApiNew {
|
||||
* @return
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST("/autopilot-car-hailing/order/v2/driver/taxi/orderRoute")
|
||||
@POST("/autopilot-car-hailing/order/v2/driver/taxi/saveOrderRoute")
|
||||
// @POST("/mock/268/autopilot-car-hailing/order/v2/driver/taxi/orderRoute")
|
||||
Observable<BaseData> updateOrderRoute(@Header ("appId") String appId, @Header("ticket") String ticket, @Body OrderRouteUpdateReqBean data);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.taxi.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
import static com.mogo.och.taxi.constant.TaxiConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -68,6 +67,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
private ImageView mAutopilotImage;
|
||||
private TextView mAutopilotTv;
|
||||
private LinearLayout mMapswitchBtn;
|
||||
private ImageView mSwitchBtnIcon;
|
||||
private ImageView mCloseNaviIcon;
|
||||
protected LinearLayout mPersonalBtn;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
@@ -120,6 +120,8 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
mDriverRole = findViewById(R.id.taxi_driver_role_tv);
|
||||
|
||||
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_layout);
|
||||
mSwitchBtnIcon = findViewById(R.id.taxi_switch_icon);
|
||||
updateSwitchMapIcon();
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -127,9 +129,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -227,6 +231,14 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
@@ -20,7 +20,9 @@ import com.amap.api.navi.model.NaviLatLng;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
@@ -446,6 +448,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
showOrHideNavi(false);
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,order.startSitePoint,R.raw.star_marker);
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker);
|
||||
clearSmallMapRouteLine();
|
||||
break;
|
||||
case ArriveAtStart:
|
||||
case UserArriveAtStart:
|
||||
@@ -545,6 +548,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,mCurrentOrder.startSitePoint,R.raw.star_marker);
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,mCurrentOrder.endSitePoint,R.raw.end_marker);
|
||||
}
|
||||
clearSmallMapRouteLine();
|
||||
//提交取消订单后的回调
|
||||
TipToast.tip("订单取消成功");
|
||||
//更新界面
|
||||
@@ -552,6 +556,10 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
showOrHideNavi(false);
|
||||
}
|
||||
|
||||
private void clearSmallMapRouteLine() {
|
||||
CallerSmpManager.clearPolyline();
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单流转debug START
|
||||
*/
|
||||
@@ -623,10 +631,11 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
.latitude(station.get(1))
|
||||
.longitude(station.get(0));
|
||||
IMogoMarker marker = MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).addMarker(uuid, options);
|
||||
marker.setRotateAngle(CallerHDMapManager.INSTANCE.getCenterLineInfo(
|
||||
station.get(0),station.get(1),-1)
|
||||
.getAngle()
|
||||
.floatValue());
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(station.get(0)
|
||||
,station.get(1),-1);
|
||||
if (null != centerLine){// 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
|
||||
}else {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + "RemoveMapMaker=",uuid+"=latitude="+station.get(1)+",longitude="+station.get(0));
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
@@ -177,10 +177,10 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_setting_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_switch_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/taxi_switch_map_bg" />
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -236,7 +236,6 @@
|
||||
android:text="@string/module_och_taxi_order_server_start"
|
||||
android:textColor="#4DFFFFFF"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
// 设置AI云平台分配给三方应用的签名密钥,需要从AI云平台申请
|
||||
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
|
||||
clientConfig.thirdPartyDeviceId = DeviceIdUtils.getWidevineIDWithMd5(context)
|
||||
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
|
||||
// 设置循环检测间隔时间(每隔2小时loop一次httpDnsConfig)
|
||||
clientConfig.loopCheckDelay = (60 * 60 * 2 * 1000).toLong()
|
||||
//设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作
|
||||
|
||||
@@ -75,6 +75,6 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.57'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.59'
|
||||
implementation 'com.jcraft:jsch:0.1.55'
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.autopilot
|
||||
|
||||
import android.Manifest.permission
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresPermission
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -14,6 +15,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_MULTI_CONNECT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.trafficlight.toTrafficLightDetail
|
||||
@@ -24,8 +26,10 @@ import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasListenerImpl
|
||||
import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
|
||||
import com.mogo.eagle.core.function.autopilot.adapter.MoGoHandAdasMsgManager
|
||||
import com.mogo.eagle.core.function.autopilot.server.AsyncDataToAutopilotServer
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.autopilot.telematic.IMsgHandler
|
||||
import com.mogo.eagle.core.function.autopilot.telematic.TeleMsgHandler
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -34,15 +38,14 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import com.mogo.telematic.MogoProtocolMsg.*
|
||||
import com.mogo.telematic.MogoProtocolMsg.NORMAL_DATA
|
||||
import com.mogo.telematic.MogoProtocolMsg.SYNC_MODE_STATUS
|
||||
import com.mogo.telematic.NSDNettyManager
|
||||
import com.mogo.telematic.client.listener.NettyClientListener
|
||||
import com.mogo.telematic.client.status.ConnectState
|
||||
import com.mogo.telematic.server.netty.NettyServerListener
|
||||
import com.mogo.telematic.server.netty.NettyTcpServer
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.AdasOptions
|
||||
import com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils
|
||||
@@ -65,10 +68,7 @@ class MoGoAutopilotProvider :
|
||||
IMoGoAutopilotCarConfigListener {
|
||||
private val TAG = "MoGoAutoPilotProvider"
|
||||
private var mContext: Context? = null
|
||||
@Volatile
|
||||
private var isFirstDisc = true
|
||||
@Volatile
|
||||
private var wrTimeStamp = 0L
|
||||
private lateinit var msgHandler: IMsgHandler
|
||||
|
||||
override val functionName: String
|
||||
get() = TAG
|
||||
@@ -79,6 +79,7 @@ class MoGoAutopilotProvider :
|
||||
mContext = context
|
||||
// 初始化ADAS 域控制器
|
||||
CupidLogUtils.setEnableLog(false)
|
||||
msgHandler = TeleMsgHandler()
|
||||
// TODO 临时方案,根据不同的身份标识,连接不同的工控机IP
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {// 司机
|
||||
// 注册地图采集功能
|
||||
@@ -94,27 +95,7 @@ class MoGoAutopilotProvider :
|
||||
NSDNettyManager.getInstance().startNSDNettyServerWithSN(context, object :
|
||||
NettyServerListener<MogoProtocolMsg> {
|
||||
override fun onMessageResponseServer(msg: MogoProtocolMsg?, channel: Channel?) {
|
||||
msg?.let {
|
||||
when (it.protocolType) {
|
||||
REQ_CAR_NUMBER -> {
|
||||
if (!AppConfigInfo.plateNumber.isNullOrEmpty()) {
|
||||
val platNumberArray = AppConfigInfo.plateNumber!!.toByteArray()
|
||||
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(
|
||||
MogoProtocolMsg(
|
||||
REQ_CAR_NUMBER,
|
||||
platNumberArray.size, platNumberArray
|
||||
), channel
|
||||
) {
|
||||
invokeNettyConnResult("司机屏发送车牌号到乘客屏是否成功:${it.isSuccess}")
|
||||
}
|
||||
} else {
|
||||
CallerAutoPilotManager.getCarConfig()
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
msgHandler.handleMsgFromClient(msg, channel)
|
||||
}
|
||||
|
||||
override fun onStartServer() {
|
||||
@@ -128,19 +109,7 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
|
||||
override fun onChannelConnect(channel: Channel?) {
|
||||
val socketAddress = channel?.remoteAddress().toString()
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "Client ip is:${socketAddress}")
|
||||
val byteArray =
|
||||
if (FunctionBuildConfig.isDemoMode) byteArrayOf(1) else byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(
|
||||
MogoProtocolMsg(
|
||||
SYNC_MODE_STATUS,
|
||||
byteArray.size,
|
||||
byteArray
|
||||
), channel
|
||||
) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "同步美化模式状态是否成功:${it.isSuccess}")
|
||||
}
|
||||
msgHandler.handleClientConn2Server(channel)
|
||||
}
|
||||
|
||||
override fun onChannelDisConnect(channel: Channel?) {
|
||||
@@ -148,7 +117,6 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
|
||||
override fun onReceiveClientSign(channel: Channel?, sn: String?) {
|
||||
// CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo("", sn)
|
||||
}
|
||||
}, MoGoAiCloudClientConfig.getInstance().sn)
|
||||
} else {
|
||||
@@ -170,7 +138,7 @@ class MoGoAutopilotProvider :
|
||||
channel: Channel
|
||||
) {
|
||||
// 乘客端收到adas数据直接解析,后续分发解析后的数据流程同司机端
|
||||
handleMsgFromServer(msg, channel)
|
||||
msgHandler.handleMsgFromServer(msg, channel)
|
||||
}
|
||||
|
||||
override fun onClientStatusConnectChanged(
|
||||
@@ -178,7 +146,7 @@ class MoGoAutopilotProvider :
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
handleConnStatusWithServer(statusCode, sign)
|
||||
msgHandler.handleClientConnStatus(statusCode, sign, channel)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -191,7 +159,7 @@ class MoGoAutopilotProvider :
|
||||
AdasManager.getInstance().setOnMultiDeviceListener { bytes ->
|
||||
// 发送数据给乘客端
|
||||
if (NSDNettyManager.getInstance().isServerStart) {
|
||||
synWriteTime()
|
||||
msgHandler.synWriteTime()
|
||||
NSDNettyManager.getInstance()
|
||||
.sendMsgToAllClients(MogoProtocolMsg(NORMAL_DATA, bytes.size, bytes))
|
||||
} else {
|
||||
@@ -353,18 +321,6 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机升级确认
|
||||
*/
|
||||
override fun setIPCUpgradeAffirm() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机升级取消
|
||||
*/
|
||||
override fun setIPCUpgradeCancel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 演示模式(美化模式)
|
||||
* isEnable = true 开启
|
||||
@@ -446,7 +402,7 @@ class MoGoAutopilotProvider :
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
handleMsgFromServer(msg, channel)
|
||||
msgHandler.handleMsgFromServer(msg, channel)
|
||||
}
|
||||
|
||||
override fun onClientStatusConnectChanged(
|
||||
@@ -454,7 +410,7 @@ class MoGoAutopilotProvider :
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
handleConnStatusWithServer(statusCode, sign)
|
||||
msgHandler.handleClientConnStatus(statusCode, sign, channel)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -475,74 +431,12 @@ class MoGoAutopilotProvider :
|
||||
return MogoReport.Action.getDesc(actionCode)
|
||||
}
|
||||
|
||||
private fun handleMsgFromServer(msg: MogoProtocolMsg?, channel: Channel) {
|
||||
msg?.let {
|
||||
when (it.protocolType) {
|
||||
NORMAL_DATA -> {
|
||||
try {
|
||||
synWriteTime()
|
||||
AdasManager.getInstance().decoderRaw(it.body)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
CallerLogger.e("$M_ADAS_IMPL$TAG", "乘客屏解析数据过程中出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
SYNC_MODE_STATUS -> {
|
||||
FunctionBuildConfig.isDemoMode = when (it.body[0].toInt()) {
|
||||
1 -> true
|
||||
else -> false
|
||||
}
|
||||
setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
REQ_CAR_NUMBER -> {
|
||||
AppConfigInfo.plateNumber = String(msg.body)
|
||||
invokeNettyConnResult("司机屏发送给乘客屏车牌号为:${AppConfigInfo.plateNumber}")
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleConnStatusWithServer(statusCode: Int, content: String?) {
|
||||
when (statusCode) {
|
||||
ConnectState.STATUS_CONNECT_SUCCESS -> {
|
||||
if (!isFirstDisc) {
|
||||
isFirstDisc = true
|
||||
}
|
||||
ToastUtils.showShort("连接司机屏成功!")
|
||||
invokeNettyConnResult("乘客屏连接司机屏成功")
|
||||
// 连接成功后,乘客屏没拿到车牌号就像司机屏请求
|
||||
if (AppConfigInfo.plateNumber.isNullOrEmpty()) {
|
||||
var byteArray = byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
|
||||
MogoProtocolMsg(REQ_CAR_NUMBER, byteArray.size, byteArray)
|
||||
) {
|
||||
invokeNettyConnResult("乘客屏请求车牌号数据发送是否成功:${it}")
|
||||
}
|
||||
}
|
||||
}
|
||||
ConnectState.STATUS_CONNECT_CLOSED -> {// 由于重连机制会回调多次
|
||||
if (isFirstDisc) {
|
||||
isFirstDisc = false
|
||||
AppConfigInfo.plateNumber = ""
|
||||
ToastUtils.showLong("断开和司机屏的连接!")
|
||||
invokeNettyConnResult("断开和司机屏的连接!")
|
||||
}
|
||||
}
|
||||
ConnectState.STATUS_CONNECT_ERROR -> {
|
||||
AppConfigInfo.plateNumber = ""
|
||||
ToastUtils.showLong("和司机端连接异常!")
|
||||
invokeNettyConnResult("乘客屏和司机屏连接异常,错误为:$content")
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
// 乘客屏才监听
|
||||
AppConfigInfo.plateNumber = carConfigResp.plateNumber
|
||||
invokeNettyConnResult("乘客屏车牌号:${carConfigResp.plateNumber}")
|
||||
Log.d("liyz", "onAutopilotCarConfig 乘客屏Mac地址为 = ${carConfigResp.macAddress}")
|
||||
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
|
||||
invokeNettyConnResult("乘客屏车牌号:${carConfigResp.plateNumber},Mac地址为:${carConfigResp.macAddress}")
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
@@ -557,16 +451,7 @@ class MoGoAutopilotProvider :
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", status)
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录最新的司机屏发送数据的时间戳
|
||||
* 或乘客屏解析数据的时间戳
|
||||
*/
|
||||
@Synchronized
|
||||
private fun synWriteTime() {
|
||||
wrTimeStamp = System.currentTimeMillis()
|
||||
}
|
||||
|
||||
override fun getTeleTimeStamp(): Long {
|
||||
return wrTimeStamp
|
||||
return msgHandler.getTeleTimeStamp()
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.autopilot.adapter
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD
|
||||
@@ -33,10 +32,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListe
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager.invokeAutopilotCarStateData
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
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.zhidao.support.adas.high.AdasManager
|
||||
@@ -241,6 +241,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
override fun onPointCloud(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) {
|
||||
//点云数据透传
|
||||
//Logger.d("pointCloud","pointCloud"+pointCloud);
|
||||
CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(header,pointCloud)
|
||||
}
|
||||
|
||||
override fun onBasicInfoReq(
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
@@ -107,9 +108,8 @@ public class MoGoHandAdasMsgManager implements
|
||||
@Override
|
||||
public void onAutopilotCarConfig(@NotNull MessagePad.CarConfigResp carConfigResp) {
|
||||
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.getMacAddress())) {
|
||||
Log.d("liyz", "onAutopilotCarConfig ---------" + carConfigResp.getMacAddress() + "--lateNumber() = " + carConfigResp.getPlateNumber());
|
||||
SharedPrefsMgr.getInstance(mContext).putString(SharedPrefsConstants.MAC_ADDRESS, carConfigResp.getMacAddress());
|
||||
// CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.getMacAddress(), "");
|
||||
Log.d("liyz", "司机端 onAutopilotCarConfig ---" + carConfigResp.getMacAddress());
|
||||
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.getMacAddress(), MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.eagle.core.function.autopilot.telematic
|
||||
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import io.netty.channel.Channel
|
||||
|
||||
interface IMsgHandler {
|
||||
fun handleMsgFromServer(msg: MogoProtocolMsg?, channel: Channel?)
|
||||
|
||||
fun handleMsgFromClient(msg: MogoProtocolMsg?, channel: Channel?)
|
||||
|
||||
fun handleClientConn2Server(channel: Channel?)
|
||||
|
||||
fun handleClientConnStatus(statusCode: Int, content: String?, channel: Channel)
|
||||
|
||||
fun handleServerConnStatus(statusCode: Int, content: String?, channel: Channel)
|
||||
|
||||
fun synWriteTime()
|
||||
|
||||
fun getTeleTimeStamp(): Long
|
||||
}
|
||||