Merge branch 'dev_robotaxi-d-app-module_2120_221017_2.12.0' into dev_robotaxi-d-app-module_2110_220915_2.11.0_cmdb
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.mogo.och.bus.callback;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/8
|
||||
*
|
||||
* Model->Presenter回调:ADAS相关(自动驾驶状态回调,到达终点等等)
|
||||
*/
|
||||
public interface IBusADASStatusCallback {
|
||||
//自驾返回失败
|
||||
void onStartAdasFailure();
|
||||
}
|
||||
@@ -63,6 +63,7 @@ class BusConst {
|
||||
const val EVENT_PARAM_END_NAME = "end_name"
|
||||
const val EVENT_PARAM_LINE_ID = "line_id"
|
||||
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
|
||||
const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
|
||||
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
|
||||
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境:true/false
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
|
||||
@@ -385,14 +385,18 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
return;
|
||||
}
|
||||
if (isAnimateRunning){
|
||||
stopAutopilotAnimation();
|
||||
updateAutopilotStatus(autopilotStatus);
|
||||
stopAnimAndUpdateBtnStatus();
|
||||
}else {
|
||||
setAutopilotBtnStatus(autopilotStatus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void stopAnimAndUpdateBtnStatus(){
|
||||
stopAutopilotAnimation();
|
||||
updateAutopilotStatus(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏【自动驾驶】按钮
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutesResult;
|
||||
import com.mogo.och.bus.bean.BusStationBean;
|
||||
import com.mogo.och.bus.bean.WriteOffPassenger;
|
||||
import com.mogo.och.bus.callback.IBusADASStatusCallback;
|
||||
import com.mogo.och.bus.callback.IBusControllerStatusCallback;
|
||||
import com.mogo.och.bus.callback.IPassengerCallback;
|
||||
import com.mogo.och.bus.callback.IRefreshBusStationsCallback;
|
||||
@@ -53,6 +54,7 @@ import com.mogo.och.bus.util.BusTrajectoryManager;
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil;
|
||||
@@ -104,6 +106,7 @@ public class BusOrderModel {
|
||||
private ISlidePannelHideCallback slidePanelHideCallback;
|
||||
private IBusControllerStatusCallback mControllerStatusCallback; //Model->Presenter:VR mode等
|
||||
private IPassengerCallback mPassengerCallback; //乘客核销回调
|
||||
private IBusADASStatusCallback mADASStatusCallback;
|
||||
|
||||
List<BusRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();//全路径信息
|
||||
|
||||
@@ -159,6 +162,9 @@ public class BusOrderModel {
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
}
|
||||
|
||||
//2022.1.28
|
||||
@@ -199,6 +205,10 @@ public class BusOrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
public void setAdasStatusCallback(IBusADASStatusCallback callback){
|
||||
this.mADASStatusCallback = callback;
|
||||
}
|
||||
|
||||
public void setRefreshBusStationsCallback(IRefreshBusStationsCallback callback){
|
||||
this.refreshBusStationsCallback = callback;
|
||||
}
|
||||
@@ -296,6 +306,8 @@ public class BusOrderModel {
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
loginService = null;
|
||||
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
@@ -315,6 +327,17 @@ public class BusOrderModel {
|
||||
}
|
||||
};
|
||||
|
||||
private final OchAdasStartFailureCallback mAdasStartFailureListener = new OchAdasStartFailureCallback() {
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedMessage);
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.INSTANCE.e( M_BUS + TAG, "mAdasStartFailureListener = "+startFailedMessage );
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusStationBean;
|
||||
import com.mogo.och.bus.bean.WriteOffPassenger;
|
||||
import com.mogo.och.bus.callback.IBusADASStatusCallback;
|
||||
import com.mogo.och.bus.callback.IBusControllerStatusCallback;
|
||||
import com.mogo.och.bus.callback.IPassengerCallback;
|
||||
import com.mogo.och.bus.callback.IRefreshBusStationsCallback;
|
||||
@@ -51,7 +52,7 @@ import system_master.SystemStatusInfo;
|
||||
*/
|
||||
public class BusPresenter extends Presenter<BusFragment>
|
||||
implements IRefreshBusStationsCallback, ISlidePannelHideCallback
|
||||
, IMoGoAutopilotStatusListener, IBusControllerStatusCallback, ILoginCallback, IPassengerCallback {
|
||||
, IMoGoAutopilotStatusListener, IBusControllerStatusCallback, ILoginCallback, IPassengerCallback, IBusADASStatusCallback {
|
||||
|
||||
private static final String TAG = "BusPresenter";
|
||||
|
||||
@@ -86,6 +87,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
BusOrderModel.getInstance().setSlidePanelHideCallback(this);
|
||||
BusOrderModel.getInstance().setControllerStatusCallback(this);
|
||||
BusOrderModel.getInstance().setPassengerCallback(this);
|
||||
BusOrderModel.getInstance().setAdasStatusCallback(this);
|
||||
}
|
||||
|
||||
public void releaseListener() {
|
||||
@@ -93,6 +95,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
BusOrderModel.getInstance().setSlidePanelHideCallback(null);
|
||||
BusOrderModel.getInstance().setControllerStatusCallback(null);
|
||||
BusOrderModel.getInstance().setPassengerCallback(null);
|
||||
BusOrderModel.getInstance().setAdasStatusCallback(null);
|
||||
OCHAdasAbilityManager.getInstance().release();
|
||||
}
|
||||
|
||||
@@ -311,4 +314,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
VoiceNotice.showNotice("核验通过", AIAssist.LEVEL3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartAdasFailure() {
|
||||
runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.och.bus.util;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -8,12 +9,12 @@ import com.mogo.eagle.core.data.app.AppConfigInfo;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
@@ -30,18 +31,35 @@ public class BusAnalyticsManager {
|
||||
return BusAnalyticsManager.SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private String mStartAutopilotKey;
|
||||
private HashMap<String, Object> mStartAutopilotParams = new HashMap<>();
|
||||
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
triggerStartAutopilotFailureEvent("15s后app等待超时");
|
||||
};
|
||||
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failMsg){
|
||||
removeWaitingCallback();
|
||||
triggerStartAutopilotFailureEvent(failMsg);
|
||||
}
|
||||
|
||||
private void triggerStartAutopilotFailureEvent(String failMsg){
|
||||
CallerLogger.INSTANCE.e( M_BUS + "triggerStartAutopilotFailureEvent", failMsg );
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT
|
||||
, CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING);
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG,
|
||||
failMsg);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
};
|
||||
}
|
||||
|
||||
private void removeWaitingCallback() {
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发'开启自动驾驶'埋点流程
|
||||
@@ -69,10 +87,7 @@ public class BusAnalyticsManager {
|
||||
|
||||
if (send) {
|
||||
// 开启成功,上报埋点
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
removeWaitingCallback();
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT, true);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.och.common.module.callback
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/11/9
|
||||
*/
|
||||
interface OchAdasStartFailureCallback {
|
||||
fun onStartAutopilotFailure(startFailedMessage : String)
|
||||
}
|
||||
@@ -6,9 +6,13 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotAbility;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
|
||||
import chassis.Chassis;
|
||||
import system_master.SystemStatusInfo;
|
||||
@@ -18,12 +22,15 @@ import system_master.SystemStatusInfo;
|
||||
* 工控机状态信息回调(判断是否能否启动自动驾驶的回调)
|
||||
* 目前定的是3秒回调一次
|
||||
*/
|
||||
public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener {
|
||||
public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMoGoAutopilotStatisticsListener {
|
||||
|
||||
private static final String TAG = OCHAdasAbilityManager.class.getSimpleName();
|
||||
|
||||
private boolean isAutopilotAbility = true;
|
||||
private String autopilotAbilityReason = "";
|
||||
private String startFailedMessage = "";
|
||||
|
||||
private OchAdasStartFailureCallback failureCallback = null;
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final OCHAdasAbilityManager INSTANCE = new OCHAdasAbilityManager();
|
||||
@@ -37,6 +44,10 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener {
|
||||
initListeners();
|
||||
}
|
||||
|
||||
public void setAdasStartFailureCallback(OchAdasStartFailureCallback callback){
|
||||
failureCallback = callback;
|
||||
}
|
||||
|
||||
public boolean getAutopilotAbilityStatus(){
|
||||
return isAutopilotAbility;
|
||||
}
|
||||
@@ -45,13 +56,19 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener {
|
||||
return autopilotAbilityReason;
|
||||
}
|
||||
|
||||
public String getStartFailedMessage() {
|
||||
return startFailedMessage;
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
//2022.10.9 工控机状态信息回调(判断是否能否启动自动驾驶的回调), 目前定的是3秒回调一次
|
||||
CallerAutopilotActionsListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotStatisticsListenerManager.INSTANCE.addListener(TAG,this);
|
||||
}
|
||||
|
||||
private void releaseListeners() {
|
||||
CallerAutopilotActionsListenerManager.INSTANCE.removeListener(this);
|
||||
CallerAutopilotStatisticsListenerManager.INSTANCE.removeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,6 +105,18 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener {
|
||||
Logger.d(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + autopilotAbilityReason);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatistics(@Nullable AutopilotStatistics statistics) {
|
||||
if (statistics == null) return;
|
||||
Logger.d(TAG, "AutopilotStatistics= " + statistics.status);
|
||||
if (failureCallback != null && 1 == statistics.status){
|
||||
startFailedMessage = statistics.failedMessage.getMsg();
|
||||
failureCallback.onStartAutopilotFailure(startFailedMessage);
|
||||
Logger.d(TAG, "statistics-startFailedMessage= " + startFailedMessage);
|
||||
}
|
||||
}
|
||||
|
||||
public void release() {
|
||||
releaseListeners();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,12 @@ class TaxiPassengerConst {
|
||||
const val EVENT_PARAM_END_NAME = "end_name"
|
||||
const val EVENT_PARAM_ORDER_NUMBER = "order_num"
|
||||
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
|
||||
const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
|
||||
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
|
||||
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境:true/false
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
const val EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_taxi_ap_unable_start_reason"
|
||||
const val EVENT_PARAM_UNABLE_START_REASON = "unable_start_reason";
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
@@ -925,6 +926,16 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
startServicePilotDone();
|
||||
}
|
||||
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
", 请稍候重试");
|
||||
|
||||
TaxiPassengerAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo,
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
return;
|
||||
}
|
||||
|
||||
double startWgsLon = mCurrentOCHOrder.startSitePoint.get(0);
|
||||
double startWgsLat = mCurrentOCHOrder.startSitePoint.get(1);
|
||||
double endWgsLon = mCurrentOCHOrder.endSitePoint.get(0);
|
||||
|
||||
@@ -249,8 +249,4 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
TaxiPassengerModel.getInstance().startAutopilot();
|
||||
}
|
||||
|
||||
public void startNaviByAmap(){
|
||||
TaxiPassengerModel.getInstance().startNaviByAmap();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -301,8 +301,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.add(R.id.module_mogo_och_navi_panel_container, ochServingOrderFragment)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
|
||||
mPresenter.startNaviByAmap();
|
||||
|
||||
}else {
|
||||
if (ochServingOrderFragment != null){
|
||||
transaction
|
||||
|
||||
@@ -141,6 +141,7 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
private void initAmapNaviView(Bundle savedInstanceState) {
|
||||
mAmapNaviVIew = mRootView.findViewById(R.id.taxi_p_order_amap_navi_view);
|
||||
mAmapNaviVIew.onCreate(savedInstanceState);
|
||||
TaxiPassengerModel.getInstance().startNaviByAmap();
|
||||
}
|
||||
|
||||
private void initRouteNaviView(Bundle savedInstanceState) {
|
||||
|
||||
@@ -35,6 +35,8 @@ public class TaxiPassengerAnalyticsManager {
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_RESULT, false);
|
||||
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_MSG,
|
||||
"15s后app等待超时");
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
};
|
||||
|
||||
@@ -74,4 +76,31 @@ public class TaxiPassengerAnalyticsManager {
|
||||
UiThreadHandler.postDelayed(startAutopilotRunnable, TaxiPassengerConst.LOOP_PERIOD_15S);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发"无法开启自驾已知异常"埋点
|
||||
* @param startName
|
||||
* @param endName
|
||||
* @param orderNo
|
||||
*/
|
||||
public void triggerUnableStartAPReasonEvent(String startName, String endName, String orderNo,
|
||||
String reason) {
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
|
||||
String dateTime = DateTimeUtils.getTimeText(
|
||||
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_SN, sn);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_ENV_ONLINE,
|
||||
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_TIME, dateTime);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_START_NAME, startName);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_END_NAME, endName);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_ORDER_NUMBER, orderNo);
|
||||
params.put(TaxiPassengerConst.EVENT_PARAM_UNABLE_START_REASON, reason);
|
||||
AnalyticsManager.INSTANCE.track(TaxiPassengerConst.EVENT_KEY_AP_UNABLE_START_REASON, params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,7 @@ public interface ITaxiADASStatusCallback {
|
||||
|
||||
//人机共驾
|
||||
void onManMachineCoDriving();
|
||||
|
||||
//自驾返回失败
|
||||
void onStartAdasFailure();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface ITaxiOrderStatusCallback {
|
||||
/**
|
||||
* 导航到目的地
|
||||
* @param isAmap 是否是高德导航
|
||||
* @param isVoicePlay 是否播报声音
|
||||
* @param isShow 是否显示导航地图(否播报声音)
|
||||
*/
|
||||
void onNaviToEnd(boolean isAmap, boolean isVoicePlay);
|
||||
void onNaviToEnd(boolean isAmap, boolean isShow);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ class TaxiConst {
|
||||
const val EVENT_PARAM_END_NAME = "end_name"
|
||||
const val EVENT_PARAM_ORDER_NUMBER = "order_num"
|
||||
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
|
||||
const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
|
||||
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
|
||||
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境:true/false
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.mogo.och.common.module.biz.constant.LoginStatusManager;
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
@@ -232,6 +233,9 @@ public class TaxiModel {
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
}
|
||||
|
||||
private void releaseListeners() {
|
||||
@@ -251,6 +255,7 @@ public class TaxiModel {
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
}
|
||||
|
||||
public void startOrStopOrderLoop(boolean start) {
|
||||
@@ -1008,6 +1013,17 @@ public class TaxiModel {
|
||||
}
|
||||
};
|
||||
|
||||
private final OchAdasStartFailureCallback mAdasStartFailureListener = new OchAdasStartFailureCallback() {
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NonNull String startFailedMessage) {
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedMessage);
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.INSTANCE.e(M_TAXI + TAG, "mAdasStartFailureListener = "+startFailedMessage);
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final IMogoStatusChangedListener mMogoStatusChangedListener = new IMogoStatusChangedListener() {
|
||||
// VR mode变更回调
|
||||
@Override
|
||||
@@ -1342,6 +1358,9 @@ public class TaxiModel {
|
||||
//开启实时计算剩余距离,剩余时间,预计时间
|
||||
startOrStopCalculateRouteInfo(true);
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi();
|
||||
if (mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(false,false);
|
||||
}
|
||||
}
|
||||
|
||||
private void reportTotalDisAndTime() {
|
||||
@@ -1581,20 +1600,26 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
//导航去订单终点目的地
|
||||
public void startNaviToEndStation(boolean isVoicePlay){
|
||||
public void startNaviToEndStation(boolean isShow){
|
||||
if (mRoutePoints.size() > 0 ){ //使用自驾轨迹
|
||||
if (mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(false,isVoicePlay);
|
||||
mOrderStatusCallback.onNaviToEnd(false,isShow);
|
||||
}
|
||||
}else {//2s后若无轨迹数据使用高德导航
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mRoutePoints.size() == 0 && mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(true,isVoicePlay);
|
||||
}else {//若直接要显示导航地图则直接导航, 若不是则2s后若无轨迹数据使用高德导航
|
||||
if (isShow && mRoutePoints.size() == 0 && mOrderStatusCallback != null){
|
||||
|
||||
mOrderStatusCallback.onNaviToEnd(true,true);
|
||||
}else {
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mRoutePoints.size() == 0 && mOrderStatusCallback != null){
|
||||
mOrderStatusCallback.onNaviToEnd(true,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},2000l);
|
||||
},2000l);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
}
|
||||
|
||||
//导航去订单目的地
|
||||
public void startNaviToEndStation(boolean isVoicePlay){
|
||||
TaxiModel.getInstance().startNaviToEndStation(isVoicePlay);
|
||||
public void startNaviToEndStation(boolean isShow){
|
||||
TaxiModel.getInstance().startNaviToEndStation(isShow);
|
||||
}
|
||||
|
||||
public void reportToEndDisAndTime(long lastSumLength, long duration){//米/秒
|
||||
@@ -226,6 +226,11 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartAdasFailure() {
|
||||
runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDataUpdate(long dailyTimeDuration, long dailyOrderNum) {
|
||||
runOnUIThread(() -> mView.onServiceDataUpdate(dailyTimeDuration,dailyOrderNum));
|
||||
@@ -318,8 +323,8 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNaviToEnd(boolean isAmap, boolean isVoicePlay) {
|
||||
runOnUIThread( () -> mView.onNaviToEnd(isAmap,isVoicePlay));
|
||||
public void onNaviToEnd(boolean isAmap, boolean isShow) {
|
||||
runOnUIThread( () -> mView.onNaviToEnd(isAmap,isShow));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -354,19 +354,15 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
// 3. 其他过程直接更新
|
||||
startOrStopLoadingAnim(false);
|
||||
autopilotStatusAnimchanged(status);
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == mPrevAPStatus) {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
|
||||
// 2->1
|
||||
// AIAssist.getInstance(getContext()).speakTTSVoice("已进入人工驾驶模式");
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE == status) {
|
||||
// 2->0
|
||||
// AIAssist.getInstance(getContext()).speakTTSVoice("自动驾驶已停止,请人工接管");
|
||||
}
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
});
|
||||
}
|
||||
|
||||
public void stopAnimAndUpdateBtnStatus(){
|
||||
startOrStopLoadingAnim(false);
|
||||
startAutopilotDone(false);
|
||||
}
|
||||
|
||||
public void onManMachineCoDriving(int manMachineCoDriving){
|
||||
if (mPrevAPStatus != manMachineCoDriving){
|
||||
autopilotStatusAnimchanged(manMachineCoDriving);
|
||||
@@ -628,5 +624,5 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
|
||||
|
||||
public abstract void startNaviToEndStation(boolean isVoicePlay);
|
||||
public abstract void startNaviToEndStation(boolean isShow);
|
||||
}
|
||||
|
||||
@@ -461,8 +461,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
if (status == TaxiOrderStatusEnum.None.getCode() || status == TaxiOrderStatusEnum.Cancel.getCode() || status == TaxiOrderStatusEnum.JourneyCompleted.getCode()) {
|
||||
isHaveBeingOrder(false);
|
||||
mCurrentOrder = null;
|
||||
mDistanceAndTime2.setText("距离 - - 公里,用时 - - 分");
|
||||
mDistanceAndTime3.setText("距离 - - 公里,用时 - - 分");
|
||||
clearOrderTag();
|
||||
} else {
|
||||
isHaveBeingOrder(true);
|
||||
}
|
||||
@@ -540,6 +539,12 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
});
|
||||
}
|
||||
|
||||
private void clearOrderTag() {
|
||||
saveOrderState = -1;
|
||||
mDistanceAndTime2.setText("距离 - - 公里,用时 - - 分");
|
||||
mDistanceAndTime3.setText("距离 - - 公里,用时 - - 分");
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有正在进行的订单,进行UI显示
|
||||
*
|
||||
@@ -613,14 +618,12 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
* @param isShow
|
||||
*/
|
||||
private void showNaviToEndStationFragment(boolean isShow) {
|
||||
mTaxiFragment.showAmapNaviToStationFragment(isShow);
|
||||
mTaxiFragment.startNaviToEndStation(isShow);
|
||||
}
|
||||
|
||||
|
||||
public void onCurrentOrderCancelDone() {
|
||||
//去除起终点
|
||||
saveOrderState = -1;
|
||||
if (mCurrentOrder != null){
|
||||
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);
|
||||
@@ -631,6 +634,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
//更新界面
|
||||
isHaveBeingOrder(false);
|
||||
showOrHideNavi(false);
|
||||
clearOrderTag();
|
||||
}
|
||||
|
||||
private void clearSmallMapRouteLine() {
|
||||
@@ -693,12 +697,13 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
public void onNaviToEndAmap(boolean isVoicePlay) {
|
||||
public void onNaviToEndAmap(boolean isShow) {
|
||||
if (mCurrentOrder != null &&
|
||||
mCurrentOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.getCode()){
|
||||
double orderEndStationLat = mCurrentOrder.endSiteGcjPoint.get(1);
|
||||
double orderEndStationLng = mCurrentOrder.endSiteGcjPoint.get(0);
|
||||
startNaviToStation(isVoicePlay,orderEndStationLat,orderEndStationLng);
|
||||
mTaxiFragment.showAmapNaviToStationFragment(isShow);
|
||||
startNaviToStation(isShow,orderEndStationLat,orderEndStationLng);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNaviToEndStation(boolean isVoicePlay) {
|
||||
mPresenter.startNaviToEndStation(isVoicePlay);
|
||||
public void startNaviToEndStation(boolean isShow) {
|
||||
mPresenter.startNaviToEndStation(isShow);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -311,12 +311,14 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
grabOrderFragment.onGrabOrderFailed();
|
||||
}
|
||||
|
||||
public void onNaviToEnd(boolean isAmap , boolean isVoicePlay){
|
||||
public void onNaviToEnd(boolean isAmap , boolean isShow){
|
||||
if (isAmap){
|
||||
if (null == serverOrdersFragment) return;
|
||||
serverOrdersFragment.onNaviToEndAmap(isVoicePlay);
|
||||
}else { //使用rotting数据
|
||||
serverOrdersFragment.onNaviToEndAmap(isShow);
|
||||
}else if (isShow){ //使用rotting数据
|
||||
showRottingToStationFragment(true);
|
||||
}else {
|
||||
showAmapNaviToStationFragment(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,8 +215,8 @@ public class TaxiServerOrdersFragment extends BaseTaxiUIFragment {
|
||||
beingServerdOrdersFragment.updateOrderBottomBtnUI();
|
||||
}
|
||||
|
||||
public void onNaviToEndAmap(boolean isVoicePlay){
|
||||
public void onNaviToEndAmap(boolean isShow){
|
||||
if (null == beingServerdOrdersFragment) return;
|
||||
beingServerdOrdersFragment.onNaviToEndAmap(isVoicePlay);
|
||||
beingServerdOrdersFragment.onNaviToEndAmap(isShow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.taxi.utils;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -37,10 +36,29 @@ public class TaxiAnalyticsManager {
|
||||
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, false);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
triggerStartAutopilotFailureEvent("15s后app等待超时");
|
||||
};
|
||||
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failMsg){
|
||||
removeWaitingCallback();
|
||||
triggerStartAutopilotFailureEvent(failMsg);
|
||||
}
|
||||
|
||||
private void removeWaitingCallback() {
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerStartAutopilotFailureEvent(String failMsg){
|
||||
CallerLogger.INSTANCE.e(M_TAXI + "triggerStartAutopilotFailureEvent", failMsg);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, false);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
|
||||
failMsg);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发'开启自动驾驶'埋点流程
|
||||
* 开启自动驾驶,15s内成功则发送成功埋点,否则发送失败埋点
|
||||
@@ -69,10 +87,7 @@ public class TaxiAnalyticsManager {
|
||||
|
||||
if (send) {
|
||||
// 开启成功,上报埋点
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
removeWaitingCallback();
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, true);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
} else {
|
||||
|
||||
@@ -198,6 +198,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
toggleStatusBarView()
|
||||
|
||||
initViewShowWithConfig()
|
||||
|
||||
//设置StatusBar初始状态
|
||||
@@ -742,6 +744,52 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleStatusBarView() {
|
||||
activity?.let{
|
||||
if(statusBarViewFloat!= null){
|
||||
WarningFloat.dismiss(statusBarViewFloat!!.config.floatTag, false)
|
||||
statusBarViewFloat = null
|
||||
statusBarView = null
|
||||
}else{
|
||||
if (statusBarView == null){
|
||||
statusBarView = StatusBarView(it)
|
||||
}
|
||||
val side = TOP
|
||||
val gravity = Gravity.TOP
|
||||
statusBarViewFloat = WarningFloat.with(it)
|
||||
.setTag("statusBarView")
|
||||
.setLayout(statusBarView!!)
|
||||
.setSidePattern(side)
|
||||
.setWindowWidth(ScreenUtils.getScreenWidth())
|
||||
.setWindowHeight(BarUtils.getStatusBarHeight())
|
||||
.setGravity(gravity, 0)
|
||||
.setImmersionStatusBar(true)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.enterAnim(view, params, windowManager, sidePattern)
|
||||
?.apply {
|
||||
interpolator = LinearInterpolator()
|
||||
}
|
||||
|
||||
override fun exitAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.exitAnim(view, params, windowManager, sidePattern)
|
||||
?.setDuration(200)
|
||||
})
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Process
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
@@ -113,51 +114,45 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
// if (maxAcceleration > 0) {
|
||||
// tvAcceleration.text = "加速度 $maxAcceleration m/s²"
|
||||
// }
|
||||
tvAcceleration.text = "每次调整车速±5km/h"
|
||||
tvAcceleration.text = "每次调整车速±5km/h,点击确定生效"
|
||||
if (speedLimit > 0) {
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
tvSpeed.text = "0"
|
||||
}
|
||||
|
||||
ivSpeedReduce.setOnClickListener {
|
||||
if(speedLimit>=5){
|
||||
speedLimit -= 5
|
||||
//速度显示
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit)
|
||||
when {
|
||||
isSuccess -> {
|
||||
//速度显示
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
ToastUtils.showShort("车速不能再减了")
|
||||
}
|
||||
}
|
||||
|
||||
ivSpeedAdd.setOnClickListener {
|
||||
if(speedLimit<=55){
|
||||
speedLimit += 5
|
||||
//速度显示
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit)
|
||||
when {
|
||||
isSuccess -> {
|
||||
//速度显示
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
ToastUtils.showShort("车速不能再加了")
|
||||
}
|
||||
}
|
||||
|
||||
//速度确认
|
||||
tvSureModify.setOnClickListener {
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit)
|
||||
when {
|
||||
isSuccess -> {
|
||||
//速度显示
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initOchView()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px"/>
|
||||
<solid android:color="#1E3062" />
|
||||
</shape>
|
||||
@@ -241,6 +241,7 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km/h"
|
||||
@@ -249,8 +250,22 @@
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedAdd"
|
||||
android:layout_marginStart="40px"
|
||||
/>x`
|
||||
android:layout_marginStart="40px" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvSureModify"
|
||||
android:layout_width="200px"
|
||||
android:layout_height="135px"
|
||||
android:background="@drawable/taxi_loginout_sure_bg"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42px"
|
||||
android:layout_marginLeft="50px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSpeed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvUnit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAcceleration"
|
||||
|
||||
@@ -63,7 +63,7 @@ BIZCONFIG_VERSION=1.3.2
|
||||
SERVICE_BIZ_VERSION=1.2.4
|
||||
################ 外部依赖引用 ################
|
||||
# loglib
|
||||
LOGLIB_VERSION=1.3.39
|
||||
LOGLIB_VERSION=1.4.5
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.3.26
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.uicontroller.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.MapParams;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
@@ -60,6 +61,20 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
//.setDataFileSource(1)
|
||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_3D)
|
||||
.setHDVisibileArray(new int[]{HDTypes.DIVIDER.type,
|
||||
HDTypes.ROAD_AREA.type,
|
||||
HDTypes.STOP_LINE.type,
|
||||
HDTypes.ARROW.type,
|
||||
HDTypes.STATION_BRIDGE.type,
|
||||
HDTypes.ZEBRA_LINE.type,
|
||||
HDTypes.GREEN_BELT.type,
|
||||
HDTypes.DIVERSION.type,
|
||||
HDTypes.SAFE_ISLAND.type,
|
||||
HDTypes.ALPHANUMERIC.type,
|
||||
HDTypes.GUARDBAR.type,
|
||||
HDTypes.TRAFFIC_DEVICE.type,
|
||||
HDTypes.CABLE.type,
|
||||
HDTypes.SIGNAL_LINE.type})
|
||||
// .setZoom( 20 )
|
||||
// .setPointToCenter( 0.734375f, 0.5f )
|
||||
//todo 2D模式下需要注意ADAS部分遮挡
|
||||
|
||||
@@ -66,13 +66,11 @@ public class MogoRouteOverlayManager implements
|
||||
return;
|
||||
}
|
||||
if (isArriveAtStation.get() && autopilotMode.get() != 1) {
|
||||
Logger.d(TAG, "--- onLocationChanged 1 -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
boolean force = FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData;
|
||||
if (!force && autopilotMode.get() != 1) {
|
||||
Logger.d(TAG, "--- onLocationChanged 2 -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
@@ -80,7 +78,6 @@ public class MogoRouteOverlayManager implements
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user