Merge branch 'dev_robosweeper-d_app-module_221230_1.1.0' of http://gitlab.zhidaoauto.com/zhjt/AndroidApp/MoGoEagleEye into dev_robosweeper-d_app-module_221230_1.1.0
Conflicts: OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java
This commit is contained in:
@@ -55,16 +55,15 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
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_function_hmi
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
|
||||
@@ -9,9 +9,9 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment;
|
||||
|
||||
@@ -20,6 +20,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 网约车-Bus-乘客端
|
||||
*
|
||||
@@ -82,9 +84,7 @@ public class MogoOCHBusPassenger implements IMogoOCH, IMogoStatusChangedListener
|
||||
*/
|
||||
private void stepIntoVrMode() {
|
||||
CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "进入vr模式" );
|
||||
MogoMapUIController.getInstance()
|
||||
.stepInVrMode( true ); // 白天模式
|
||||
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).stepInVrMode(true); // 白天模式
|
||||
CallerMoGoUiSettingManager.INSTANCE.stepInDayMode();//白天模式 状态栏字体颜色变黑
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.bus.passenger.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
@@ -11,5 +11,5 @@ public interface IBusPassengerControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class BusPassengerConst {
|
||||
}
|
||||
|
||||
// OCH arouter 路由path
|
||||
const val PATH = "/och/api"
|
||||
const val PATH = "/passenger/api"
|
||||
|
||||
// 轮询line
|
||||
const val LOOP_LINE_2S = 2 * 1000L
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.mogo.och.bus.passenger.model;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
@@ -21,11 +25,13 @@ import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -49,6 +55,7 @@ import com.mogo.och.bus.passenger.network.BusPassengerServiceManager;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -60,10 +67,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
*/
|
||||
@@ -88,7 +91,7 @@ public class BusPassengerModel {
|
||||
private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态
|
||||
private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新
|
||||
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private BusPassengerRoutesResult routesResult = null;
|
||||
|
||||
@@ -271,10 +274,10 @@ public class BusPassengerModel {
|
||||
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
}
|
||||
@@ -289,7 +292,7 @@ public class BusPassengerModel {
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
}
|
||||
@@ -318,13 +321,13 @@ public class BusPassengerModel {
|
||||
}
|
||||
};
|
||||
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLocation = location;
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLocation = gnssInfo;
|
||||
for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
callback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -396,11 +399,7 @@ public class BusPassengerModel {
|
||||
}
|
||||
};
|
||||
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
}
|
||||
private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp routeList) {
|
||||
|
||||
@@ -26,6 +26,8 @@ import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
*/
|
||||
@@ -110,7 +112,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (location != null){
|
||||
runOnUIThread(() -> mView.onCarLocationChanged(location));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
@@ -25,9 +27,8 @@ import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
|
||||
@@ -36,14 +37,16 @@ import com.mogo.och.bus.passenger.utils.BusPassengerMapAssetStyleUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* 乘客屏小地图
|
||||
*/
|
||||
public class BusPassengerMapDirectionView
|
||||
extends RelativeLayout
|
||||
implements IMoGoMapLocationListener, IBusPassengerMapDirectionView, AMap.OnCameraChangeListener {
|
||||
implements IMoGoChassisLocationGCJ02Listener,
|
||||
IBusPassengerMapDirectionView,
|
||||
AMap.OnCameraChangeListener {
|
||||
|
||||
//小地图名称
|
||||
public static final String TAG = "TPMapDirectionView";
|
||||
@@ -101,14 +104,14 @@ public class BusPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
@@ -171,19 +174,18 @@ public class BusPassengerMapDirectionView
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@org.jetbrains.annotations.Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (location == null) {
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (gnssInfo == null) {
|
||||
return;
|
||||
}
|
||||
// CallerLogger.INSTANCE.d(M_BUS_P + TAG, "onCarLocationChanged2 :" + location.getLatitude() + ":" + location.getLongitude());
|
||||
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
LatLng currentLatLng = new LatLng(gnssInfo.getLatitude(), gnssInfo.getLongitude());
|
||||
|
||||
//更新车辆位置
|
||||
if (mCarMarker != null) {
|
||||
// CallerLogger.INSTANCE.d(M_BUS_P + TAG, "location.getBearing() = " + location.getBearing());
|
||||
mCarMarker.setRotateAngle(360 - location.getBearing());
|
||||
mCarMarker.setRotateAngle((float) (360 - gnssInfo.getHeading()));
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
mCarMarker.setToTop();
|
||||
}
|
||||
@@ -208,7 +210,6 @@ public class BusPassengerMapDirectionView
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void drawablePolyline() {
|
||||
if (mPolyline != null) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
@@ -14,7 +16,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -31,7 +32,7 @@ import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -301,8 +302,8 @@ public class BusPassengerRouteFragment extends
|
||||
lastBearing = bearing;
|
||||
}
|
||||
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
updateSpeedView(location.getSpeed());
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
updateSpeedView((float) location.getVehicleSpeed());
|
||||
}
|
||||
|
||||
public void updateSpeedView(float speed){
|
||||
|
||||
@@ -59,14 +59,12 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
|
||||
@@ -13,14 +13,16 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.fragment.BusFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
*
|
||||
@@ -40,8 +42,7 @@ public class BusProvider implements IMogoOCH {
|
||||
*/
|
||||
private void stepIntoVrMode() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "进入vr模式");
|
||||
MogoMapUIController.getInstance()
|
||||
.stepInVrMode(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).stepInVrMode(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.och.bus.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
*
|
||||
@@ -11,7 +13,7 @@ public interface IBusControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class BusConst {
|
||||
}
|
||||
|
||||
// OCH arouter 路由path
|
||||
const val PATH = "/och/api"
|
||||
const val PATH = "/driver/api"
|
||||
|
||||
// 测试用的广播
|
||||
const val BROADCAST_TEST_BUS_CONTROL_TYPE_EXTRA_KEY = "sceneType"
|
||||
|
||||
@@ -4,9 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -21,12 +19,9 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -34,27 +29,23 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusRoutesResult;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
import com.mogo.och.bus.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.bus.view.SlidePanelView;
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
@@ -68,7 +59,7 @@ import record_cache.RecordPanelOuterClass;
|
||||
*/
|
||||
public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements IMogoMapListener, IMoGoAutopilotRecordListener {
|
||||
|
||||
private static final String TAG = "BaseOchFragment";
|
||||
private static final String TAG = "BaseBusTabFragment";
|
||||
|
||||
protected SlidePanelView slidePanelView;
|
||||
private RelativeLayout ctvAutopilotStatus;
|
||||
@@ -83,8 +74,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
private TrafficDataView mTrafficDataView;
|
||||
// private BusTrafficLightView mTrafficLightView;
|
||||
|
||||
public static final String TYPE_ENTRANCE = "entrance";
|
||||
|
||||
//远景和中景的切换
|
||||
private ImageView mSwitchMapModeImage;
|
||||
private LinearLayout mSwitchMapModeLayout;
|
||||
@@ -133,26 +122,21 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
updateSwitchMapIcon();
|
||||
|
||||
mSwitchMapModeLayout.setOnClickListener(new OnPreventFastClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, BusConst.TYPE_MARKER_BUS_ORDER);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -188,7 +172,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
);
|
||||
|
||||
findViewById(R.id.btnAutopilotRoute).setOnClickListener(view -> debugArrivedRoute());
|
||||
|
||||
|
||||
tvArrived.setOnClickListener(view -> {
|
||||
onArriveStation();
|
||||
});
|
||||
@@ -226,12 +210,15 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
protected abstract void onArriveStation();
|
||||
|
||||
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);
|
||||
} else {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +254,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
protected abstract void debugArrivedStation();
|
||||
|
||||
private void initListener() {
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoMapListener(TYPE_ENTRANCE, this);
|
||||
MogoMapListenerHandler.Companion.getMogoMapListenerHandler().registerHostMapListener(TAG, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -376,15 +363,15 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
// 主动开启自动驾驶中,不为2(为0、1)则继续loading
|
||||
return;
|
||||
}
|
||||
if (isAnimateRunning){
|
||||
if (isAnimateRunning) {
|
||||
stopAnimAndUpdateBtnStatus();
|
||||
}else {
|
||||
} else {
|
||||
setAutopilotBtnStatus(autopilotStatus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void stopAnimAndUpdateBtnStatus(){
|
||||
public void stopAnimAndUpdateBtnStatus() {
|
||||
stopAutopilotAnimation();
|
||||
updateAutopilotStatus(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
}
|
||||
@@ -494,7 +481,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoMapListener(TYPE_ENTRANCE);
|
||||
MogoMapListenerHandler.Companion.getMogoMapListenerHandler().unregisterHostMapListener(TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,10 +19,10 @@ import com.mogo.eagle.core.data.temp.EventLogout;
|
||||
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;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.och.bus.R;
|
||||
@@ -43,6 +43,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -456,42 +457,35 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
*/
|
||||
private void setOrRemoveMapMaker(boolean isAdd, String uuid, double lat, double longi,int resourceId) {
|
||||
if (isAdd) {
|
||||
Runnable setMapMarkerRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "setMapMaker= "+Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + lat + ",longitude=" + longi);
|
||||
Runnable setMapMarkerRunnable = () -> {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "setMapMaker= "+Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + lat + ",longitude=" + longi);
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(BusConst.TYPE_MARKER_BUS_ORDER)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.set3DMode(true)
|
||||
.gps(true)
|
||||
.controlAngle(true)
|
||||
.icon3DRes(resourceId)
|
||||
.latitude(lat)
|
||||
.longitude(longi);
|
||||
IMogoMarker marker = MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .addMarker(uuid, options);
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(
|
||||
longi,lat,-1);
|
||||
if (null != centerLine && marker != null) { // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致 地图未初始化会返回空
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(BusConst.TYPE_MARKER_BUS_ORDER)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.set3DMode(true)
|
||||
.gps(true)
|
||||
.controlAngle(true)
|
||||
.icon3DRes(resourceId)
|
||||
.latitude(lat)
|
||||
.longitude(longi);
|
||||
IMogoMarker marker = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp())).addMarker(uuid, options);
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(
|
||||
longi,lat,-1);
|
||||
if (null != centerLine && marker != null) { // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致 地图未初始化会返回空
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
};
|
||||
|
||||
OCHThreadPoolManager.getsInstance().execute(setMapMarkerRunnable);
|
||||
|
||||
}else {
|
||||
Runnable removeMapMarkerRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "RemoveMapMaker="+Thread.currentThread().getName(),
|
||||
uuid+"=latitude="+lat+",longitude="+longi);
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).removeMarkers(uuid);
|
||||
}
|
||||
Runnable removeMapMarkerRunnable = () -> {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "RemoveMapMaker="+Thread.currentThread().getName(),
|
||||
uuid+"=latitude="+lat+",longitude="+longi);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp())).removeMarkers(uuid);
|
||||
};
|
||||
|
||||
OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -151,12 +151,12 @@ public class BusOrderModel {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, mMapLocationListener, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
@@ -266,12 +266,7 @@ public class BusOrderModel {
|
||||
this.mControllerStatusCallback = callback;
|
||||
}
|
||||
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
|
||||
@@ -339,7 +334,7 @@ public class BusOrderModel {
|
||||
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
loginService = null;
|
||||
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
@@ -381,25 +376,25 @@ public class BusOrderModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
|
||||
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
|
||||
if (isGoingToNextStation && !isArrivedStation) {
|
||||
judgeArrivedStation(location);
|
||||
judgeArrivedStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//根据围栏判断,是否到达站点
|
||||
private void judgeArrivedStation(MogoLocation location) {
|
||||
private void judgeArrivedStation(MessagePad.GnssInfo location) {
|
||||
|
||||
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
|
||||
CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界");
|
||||
|
||||
@@ -233,9 +233,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location) {
|
||||
runOnUIThread(() -> mView.updateSpeedView(location.getSpeed()));
|
||||
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
@@ -68,7 +67,6 @@ dependencies {
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
|
||||
@@ -3,20 +3,22 @@ package com.mogo.och.common.module.biz.model
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginRespBean
|
||||
import com.mogo.och.common.module.biz.callback.ITaxiLoginCallback
|
||||
import com.mogo.och.common.module.biz.constant.TaxiLoginStatusEnum
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import com.mogo.och.common.module.biz.constant.TaxiLoginStatusEnum
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceManager
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
* Created by pangfan on 2021/8/19
|
||||
@@ -25,7 +27,7 @@ import com.mogo.och.common.module.utils.ToastUtilsOch
|
||||
* 网约车 - 出租车业务逻辑处理
|
||||
*/
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object OchCommonLoginModel{
|
||||
object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
private val TAG = "TaxiLoginModel"
|
||||
private var mContext: Context? = null
|
||||
@@ -35,20 +37,21 @@ object OchCommonLoginModel{
|
||||
fun init(context: Context) {
|
||||
mContext = context.applicationContext
|
||||
// 达到起始站围栏监听
|
||||
MogoApisHandler.getInstance().apis.registerCenterApi.registerCarLocationChangedListener(TAG, mCarLocationChangedListener2)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun hasInit():Boolean{
|
||||
if(mContext==null&& iTaxiLoginCallback==null){
|
||||
return false;
|
||||
fun hasInit(): Boolean {
|
||||
if (mContext == null && iTaxiLoginCallback == null) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// 自车定位
|
||||
private val mCarLocationChangedListener2 = IMogoCarLocationChangedListener2 { location ->
|
||||
mLongitude = location.longitude
|
||||
mLatitude = location.latitude
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
|
||||
gnssInfo?.let {
|
||||
mLongitude = it.longitude
|
||||
mLatitude = it.latitude
|
||||
}
|
||||
}
|
||||
|
||||
fun getiTaxiLoginCallback(): ITaxiLoginCallback? {
|
||||
@@ -63,8 +66,7 @@ object OchCommonLoginModel{
|
||||
mContext = null
|
||||
iTaxiLoginCallback = null
|
||||
// 注销到达起始站围栏监听
|
||||
MogoApisHandler.getInstance().apis.registerCenterApi
|
||||
.unregisterCarLocationChangedListener(TAG, mCarLocationChangedListener2)
|
||||
CallerMapLocationListenerManager.removeListener(TAG, false)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +97,7 @@ object OchCommonLoginModel{
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String) {
|
||||
ToastUtilsOch.showWithCodeMessage(code,msg)
|
||||
ToastUtilsOch.showWithCodeMessage(code, msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -113,7 +115,7 @@ object OchCommonLoginModel{
|
||||
ToastUtils.showShort(mContext?.getString(R.string.module_och_taxi_login_login_success))
|
||||
LoginStatusManager.setLoginStatus(TaxiLoginStatusEnum.Login)
|
||||
mContext?.let {
|
||||
SharedPrefs.getInstance(it).putString("och_account",phone)
|
||||
SharedPrefs.getInstance(it).putString("och_account", phone)
|
||||
}
|
||||
iTaxiLoginCallback?.loginSuccess()
|
||||
} else {
|
||||
@@ -132,9 +134,10 @@ object OchCommonLoginModel{
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String) {
|
||||
ToastUtilsOch.showWithCodeMessage(code,msg)
|
||||
ToastUtilsOch.showWithCodeMessage(code, msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,10 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
import io.reactivex.Observable
|
||||
|
||||
@@ -59,23 +62,22 @@ object OchCommonServiceManager {
|
||||
) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
var taxiLoginRespBeanObservable: Observable<TaxiLoginRespBean>? = null
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
taxiLoginRespBeanObservable = mOCHTaxiServiceApi.gotoLoginBycode4Taxi(
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//出租车司机
|
||||
taxiLoginRespBeanObservable = mOCHTaxiServiceApi.gotoLoginBycode4Taxi(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginReqBean(phone, code, sn, location4Login)
|
||||
).transformTry()
|
||||
}
|
||||
"fPadLenovoOchBus" -> {
|
||||
//小巴车司机
|
||||
taxiLoginRespBeanObservable = mOCHTaxiServiceApi.gotoLoginBycode4Bus(
|
||||
).transformTry()
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//小巴车司机
|
||||
taxiLoginRespBeanObservable = mOCHTaxiServiceApi.gotoLoginBycode4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginReqBean(phone, code, sn, location4Login)
|
||||
).transformTry()
|
||||
}
|
||||
).transformTry()
|
||||
}
|
||||
taxiLoginRespBeanObservable?.subscribe(OchCommonSubscribeImpl(context, callback, "gotoLoginBycode"))
|
||||
}
|
||||
@@ -90,23 +92,22 @@ object OchCommonServiceManager {
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
var logout: Observable<BaseData>? = null
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
logout = mOCHTaxiServiceApi.logout4Taxi(
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//出租车司机
|
||||
logout = mOCHTaxiServiceApi.logout4Taxi(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLogoutReqBean(MoGoAiCloudClientConfig.getInstance().sn, location4Login)
|
||||
).transformTry()
|
||||
}
|
||||
"fPadLenovoOchBus" -> {
|
||||
//小巴车司机
|
||||
logout = mOCHTaxiServiceApi.logout4Bus(
|
||||
).transformTry()
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//小巴车司机
|
||||
logout = mOCHTaxiServiceApi.logout4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLogoutReqBean(MoGoAiCloudClientConfig.getInstance().sn, location4Login)
|
||||
).transformTry()
|
||||
}
|
||||
).transformTry()
|
||||
}
|
||||
logout?.subscribe(OchCommonSubscribeImpl(context, callback, "logout"))
|
||||
}
|
||||
@@ -128,19 +129,18 @@ object OchCommonServiceManager {
|
||||
return
|
||||
}
|
||||
var flavor = ""
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
flavor = "taxi"
|
||||
}
|
||||
"fPadLenovoOchBus" -> {
|
||||
//小巴车司机
|
||||
flavor = "bus"
|
||||
}
|
||||
"fPadLenovoOchBusPassenger" -> {
|
||||
//小巴车乘客
|
||||
flavor = "bus/passenger"
|
||||
}
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//出租车司机
|
||||
flavor = "taxi"
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//小巴车司机
|
||||
flavor = "bus"
|
||||
}else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
//小巴车乘客
|
||||
flavor = "bus/passenger"
|
||||
}
|
||||
mOCHTaxiServiceApi.queryDriverServiceStatusAndLoginStatus(
|
||||
flavor,
|
||||
|
||||
@@ -21,13 +21,18 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceManager
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
import com.mogo.och.common.module.biz.presenter.OchCommonLoginPresenter
|
||||
import com.mogo.och.common.module.biz.provider.LoginService
|
||||
|
||||
@@ -89,13 +94,14 @@ class TaxiLoginDialogFragment :
|
||||
}
|
||||
|
||||
private fun initBg() {
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
acivLoginBg.setImageResource(R.drawable.taxi_ic_login_bg)
|
||||
}
|
||||
"fPadLenovoOchBus" -> {
|
||||
acivLoginBg.setImageResource(R.drawable.bus_ic_login_bg)
|
||||
}
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//出租车司机
|
||||
acivLoginBg.setImageResource(R.drawable.taxi_ic_login_bg)
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//小巴车司机
|
||||
acivLoginBg.setImageResource(R.drawable.bus_ic_login_bg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -69,7 +70,8 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!networkStatus) toastStr += " 网络异常 "
|
||||
|
||||
if (!socketStatus && !DebugConfig.getProductFlavor().contains("Passenger")) toastStr += " 长链接异常 "
|
||||
//乘客屏不显示长链接异常
|
||||
if (!socketStatus && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) toastStr += " 长链接异常 "
|
||||
|
||||
i(TAG, "abnormal_factors_Str = $toastStr")
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
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.AppIdentityModeUtils;
|
||||
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;
|
||||
@@ -86,7 +87,7 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
autopilotAbilityReason = "挡位不正常";
|
||||
}
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" &&
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) &&
|
||||
ability.gear == Chassis.GearPosition.GEAR_N){ //bus档位不正常
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "挡位不正常";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.common.module.utils
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_SWEEPER
|
||||
@@ -8,29 +9,27 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI_P
|
||||
|
||||
object CallerLoggerUtils {
|
||||
var flavorTag = when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
M_TAXI
|
||||
}
|
||||
"fPadLenovoOchBus" -> {
|
||||
//小巴车司机
|
||||
M_BUS
|
||||
}
|
||||
"fPadLenovoOchTaxiPassenger" -> {
|
||||
//出租车乘客
|
||||
M_TAXI_P
|
||||
}
|
||||
"fPadLenovoOchBusPassenger" -> {
|
||||
//小巴车乘客
|
||||
M_BUS_P
|
||||
}
|
||||
"fPadLenovoOchSweeper" -> {
|
||||
//清扫车
|
||||
M_SWEEPER
|
||||
}
|
||||
else -> {
|
||||
""
|
||||
}
|
||||
var flavorTag =if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)&&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
//出租车司机
|
||||
M_TAXI
|
||||
}else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
//小巴车司机
|
||||
M_BUS
|
||||
}else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)&&
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
//出租车乘客
|
||||
M_TAXI_P
|
||||
}else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
//小巴车乘客
|
||||
M_BUS_P
|
||||
}else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)){
|
||||
//清扫车
|
||||
M_SWEEPER
|
||||
}
|
||||
else{
|
||||
""
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
*/
|
||||
public static Map<Integer,List<MogoLocation>> getRemainPointListByCompareNew(int preIndex,
|
||||
List<MogoLocation> mRoutePoints,
|
||||
MogoLocation realLocation) {
|
||||
MessagePad.GnssInfo realLocation) {
|
||||
Map<Integer,List<MogoLocation>> routePonits = new HashMap<>();
|
||||
List<MogoLocation> latePoints = new ArrayList<>(); // 剩余轨迹集合
|
||||
int currentIndex = 0; //记录疑似点
|
||||
@@ -245,8 +245,8 @@ public class CoordinateCalculateRouteUtil {
|
||||
for (int i= 0; i < mRoutePoints.size(); i++){
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
//todo 先看index对应点的方向和realLocation方向是否一致, 方向角度不能过90度
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
latLng.getLongitude(),latLng.getLatitude());
|
||||
@@ -276,7 +276,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
}
|
||||
|
||||
public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints,
|
||||
MogoLocation realLocation) {
|
||||
MessagePad.GnssInfo realLocation) {
|
||||
int currentIndex = 0; //记录疑似点 //基础点
|
||||
MogoLocation baseLatLng = mRoutePoints.get(0);
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
@@ -285,8 +285,8 @@ public class CoordinateCalculateRouteUtil {
|
||||
|
||||
for (int i = 0; i < mRoutePoints.size(); i++) {
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
latLng.getLongitude(), latLng.getLatitude());
|
||||
|
||||
@@ -42,13 +42,11 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ class OCHConstants {
|
||||
/**
|
||||
* arouter 路由地址
|
||||
*/
|
||||
public static final String PATH = "/och/api";
|
||||
public static final String PATH = "/driver/api";
|
||||
}
|
||||
|
||||
@@ -58,14 +58,12 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.sweeper;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_SWEEPER;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -12,8 +11,9 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
|
||||
@@ -39,8 +39,10 @@ public class SweeperProvider implements IMogoOCH {
|
||||
*/
|
||||
private void stepIntoVrMode(){
|
||||
CallerLogger.INSTANCE.d( M_SWEEPER + TAG, "进入vr模式" );
|
||||
MogoMapUIController.getInstance()
|
||||
.stepInVrMode(false);
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
controller.stepInVrMode(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,7 +11,7 @@ public interface ISweeperControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class SweeperConst {
|
||||
}
|
||||
|
||||
// OCH arouter 路由path
|
||||
const val PATH = "/och/api"
|
||||
const val PATH = "/driver/api"
|
||||
|
||||
// 测试用的广播
|
||||
const val BROADCAST_TEST_SWEEPER_CONTROL_TYPE_EXTRA_KEY = "sceneType"
|
||||
|
||||
@@ -4,18 +4,14 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
import static com.mogo.och.sweeper.constant.SweeperConst.STATION_STATUS_STOPPED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.Location;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.elegant.network.utils.GsonUtil;
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
@@ -23,39 +19,34 @@ import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.sweeper.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResult;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweeper.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback;
|
||||
import com.mogo.och.sweeper.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.net.SweeperServiceManager;
|
||||
import com.mogo.och.sweeper.net.ISweeperServiceCallback;
|
||||
import com.mogo.och.sweeper.net.SweeperServiceManager;
|
||||
import com.mogo.och.sweeper.presenter.SweeperModelLoopManager;
|
||||
import com.mogo.och.sweeper.util.SweeperAnalyticsManager;
|
||||
import com.mogo.och.sweeper.util.SweeperTrajectoryManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -132,12 +123,12 @@ public class SweeperOrderModel {
|
||||
public void init() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
|
||||
|
||||
//2022.1.28
|
||||
@@ -195,12 +186,7 @@ public class SweeperOrderModel {
|
||||
this.mControllerStatusCallback = callback;
|
||||
}
|
||||
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
|
||||
@@ -265,7 +251,7 @@ public class SweeperOrderModel {
|
||||
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
@@ -286,25 +272,25 @@ public class SweeperOrderModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
|
||||
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
|
||||
if (isGoingToNextStation && !isArrivedStation) {
|
||||
judgeStartStation(location);
|
||||
judgeStartStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//根据围栏判断,是否到达起点
|
||||
private void judgeStartStation(MogoLocation location) {
|
||||
private void judgeStartStation(MessagePad.GnssInfo location) {
|
||||
|
||||
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
|
||||
return;
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
package com.mogo.och.sweeper.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import android.os.Looper;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback;
|
||||
import com.mogo.och.sweeper.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
import com.mogo.och.sweeper.util.SweeperTrajectoryManager;
|
||||
@@ -120,9 +127,9 @@ public class SweeperPresenter extends Presenter<SweeperFragment>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location) {
|
||||
runOnUIThread(() -> mView.updateSpeedView(location.getSpeed()));
|
||||
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
@@ -764,43 +764,7 @@ public class SweeperOperatePanelView extends LinearLayout {
|
||||
/**
|
||||
* 底盘数据透传listener
|
||||
*/
|
||||
private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {
|
||||
@Override
|
||||
public void onBMSSystemStates(@NonNull ChassisStatesOuterClass.BMSSystemStates bmsSystemStates) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDataException(long timestamp) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotLightSwitchData(@Nullable Chassis.LightSwitch lightSwitch) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrakeLightData(boolean brakeLight) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSteeringData(float steering) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGearData(@NonNull Chassis.GearPosition gear) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAcc(float carAcc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotThrottle(float throttle) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrake(float brake) {
|
||||
}
|
||||
private final IMoGoSweeperFutianCleanSystemListener mIMoGoAutopilotVehicleStateListener = new IMoGoSweeperFutianCleanSystemListener() {
|
||||
|
||||
@Override
|
||||
public void onSweeperFutianCleanSystemState(@NonNull ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) {
|
||||
@@ -835,7 +799,7 @@ public class SweeperOperatePanelView extends LinearLayout {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
CallerSweeperFutianCleanSystemListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
// 最终调试时需要打开
|
||||
syncVehicleStateAndRecoverOperatePanelStates();
|
||||
// Mock VehicleState 数据回调
|
||||
@@ -847,7 +811,7 @@ public class SweeperOperatePanelView extends LinearLayout {
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerSweeperFutianCleanSystemListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,13 +10,11 @@ import chassis.Chassis.GearPosition
|
||||
import chassis.Chassis.LightSwitch
|
||||
import chassis.ChassisStatesOuterClass.BMSSystemStates
|
||||
import chassis.ChassisStatesOuterClass.SweeperFuTianTaskSystemStates
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager.addListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager.removeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.setProxyTrafficLightView
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager.addListener
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager.removeListener
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TapPositionView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -24,7 +22,14 @@ import com.mogo.och.sweeper.R
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import kotlin.math.abs
|
||||
|
||||
class SweeperTrafficDataView : ConstraintLayout {
|
||||
class SweeperTrafficDataView : ConstraintLayout,
|
||||
IMoGoBatteryManagementSystemListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener
|
||||
{
|
||||
private var tapPositionView //方向盘
|
||||
: TapPositionView? = null
|
||||
private var speedImage //速度图标
|
||||
@@ -67,92 +72,95 @@ class SweeperTrafficDataView : ConstraintLayout {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
addListener(TAG, mIMoGoAutopilotVehicleStateListener)
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG, this)
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
|
||||
CallerSweeperFutianCleanSystemListenerManager.addListener(TAG, this)
|
||||
//增加限速监听
|
||||
addListener(TAG, limitingVelocityListener)
|
||||
CallLimitingVelocityListenerManager.addListener(TAG, limitingVelocityListener)
|
||||
setProxyTrafficLightView(trafficLight!!)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
removeListener(mIMoGoAutopilotVehicleStateListener)
|
||||
removeListener(limitingVelocityListener)
|
||||
CallerBatteryManagementSystemListenerManager.removeListener(TAG )
|
||||
CallerChassisSteeringStateListenerManager.removeListener(TAG)
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisThrottleStateListenerManager.removeListener(TAG)
|
||||
CallerSweeperFutianCleanSystemListenerManager.removeListener(TAG)
|
||||
|
||||
CallLimitingVelocityListenerManager.removeListener(limitingVelocityListener)
|
||||
}
|
||||
|
||||
private val mIMoGoAutopilotVehicleStateListener: IMoGoAutopilotVehicleStateListener = object : IMoGoAutopilotVehicleStateListener {
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {}
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: SweeperFuTianTaskSystemStates) {
|
||||
if (cleanSystemState.hasSecuCleanWaterTankLow()) { //清水箱水位低不能清洗作业报警信号
|
||||
ivBgWaterWarning?.visibility = VISIBLE
|
||||
ivWater?.isSelected = true
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {}
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: SweeperFuTianTaskSystemStates) {
|
||||
if (cleanSystemState.hasSecuCleanWaterTankLow()) { //清水箱水位低不能清洗作业报警信号
|
||||
ivBgWaterWarning?.visibility = VISIBLE
|
||||
ivWater?.isSelected = true
|
||||
} else {
|
||||
ivBgWaterWarning?.visibility = GONE
|
||||
ivWater?.isSelected = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBatteryManagementSystemStates(states: BMSSystemStates) {
|
||||
tvBattery?.text = String.format("%s%", states.bmsSoc)
|
||||
}
|
||||
|
||||
override fun onAutopilotThrottle(throttle: Float) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆转向灯
|
||||
* @param lightSwitch
|
||||
*/
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: LightSwitch?) {
|
||||
//转向灯状态 0是正常 1是左转 2是右转
|
||||
if (lightSwitch != null) {
|
||||
d(TAG, "车辆转向灯:$lightSwitch")
|
||||
if (lightSwitch.number == 1) {
|
||||
sweeperTurnSignal?.showLeftSignal()
|
||||
} else if (lightSwitch.number == 2) {
|
||||
sweeperTurnSignal?.showRightSignal()
|
||||
} else {
|
||||
ivBgWaterWarning?.visibility = GONE
|
||||
ivWater?.isSelected = false
|
||||
sweeperTurnSignal?.showDirection()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBMSSystemStates(bmsSystemStates: BMSSystemStates) {
|
||||
tvBattery?.text = String.format("%s%", bmsSystemStates.bmsSoc)
|
||||
/**
|
||||
* 刹车灯
|
||||
* @param brakeLight
|
||||
*/
|
||||
override fun onAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
d(TAG, "刹车灯:$brakeLight")
|
||||
}
|
||||
|
||||
/**
|
||||
* 方向盘转向角 左+右-
|
||||
* @param steering
|
||||
*/
|
||||
override fun onAutopilotSteeringData(steering: Float) {
|
||||
var steering = steering
|
||||
d(TAG, "steering原始值====$steering")
|
||||
if (abs(steering) < 1) {
|
||||
steering = 0f
|
||||
}
|
||||
d(TAG, "steering忽略小数点后====" + steering.toInt())
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆转向灯
|
||||
* @param lightSwitch
|
||||
*/
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: LightSwitch?) {
|
||||
//转向灯状态 0是正常 1是左转 2是右转
|
||||
if (lightSwitch != null) {
|
||||
d(TAG, "车辆转向灯:$lightSwitch")
|
||||
if (lightSwitch.number == 1) {
|
||||
sweeperTurnSignal?.showLeftSignal()
|
||||
} else if (lightSwitch.number == 2) {
|
||||
sweeperTurnSignal?.showRightSignal()
|
||||
} else {
|
||||
sweeperTurnSignal?.showDirection()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刹车灯
|
||||
* @param brakeLight
|
||||
*/
|
||||
override fun onAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
d(TAG, "刹车灯:$brakeLight")
|
||||
}
|
||||
|
||||
/**
|
||||
* 方向盘转向角 左+右-
|
||||
* @param steering
|
||||
*/
|
||||
override fun onAutopilotSteeringData(steering: Float) {
|
||||
var steering = steering
|
||||
d(TAG, "steering原始值====$steering")
|
||||
if (abs(steering) < 1) {
|
||||
steering = 0f
|
||||
}
|
||||
d(TAG, "steering忽略小数点后====" + steering.toInt())
|
||||
}
|
||||
|
||||
/**
|
||||
* 档位
|
||||
* @param gear
|
||||
*/
|
||||
override fun onAutopilotGearData(gear: GearPosition) {
|
||||
d(TAG, "司机屏档位$gear")
|
||||
ThreadUtils.runOnUiThread {
|
||||
tapPositionView?.updateWithGear(gear)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotDataException(timestamp: Long) {}
|
||||
override fun onAutopilotAcc(carAcc: Float) {}
|
||||
override fun onAutopilotBrake(brake: Float) {
|
||||
d(TAG, "刹车:$brake")
|
||||
}
|
||||
|
||||
override fun onAutopilotThrottle(throttle: Float) {
|
||||
d(TAG, "油门:$throttle")
|
||||
/**
|
||||
* 档位
|
||||
* @param gear
|
||||
*/
|
||||
override fun onAutopilotGearData(gear: GearPosition) {
|
||||
d(TAG, "司机屏档位$gear")
|
||||
ThreadUtils.runOnUiThread {
|
||||
tapPositionView?.updateWithGear(gear)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
implementation rootProject.ext.dependencies.amapsearch
|
||||
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
@@ -65,7 +65,6 @@ dependencies {
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
|
||||
@@ -11,14 +11,16 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst;
|
||||
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -45,7 +47,7 @@ class MogoOCHTaxiPassenger implements IMogoOCH, IMogoStatusChangedListener {
|
||||
*/
|
||||
private void stepIntoVrMode() {
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "进入vr模式");
|
||||
MogoMapUIController.getInstance()
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController())
|
||||
.stepInVrMode(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.taxi.passenger.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,5 +11,5 @@ public interface IOCHTaxiPassengerControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class TaxiPassengerConst {
|
||||
}
|
||||
|
||||
// OCH arouter 路由path
|
||||
const val PATH = "/och/api"
|
||||
const val PATH = "/passenger/api"
|
||||
|
||||
// 上报心跳轮询ms
|
||||
const val LOOP_PERIOD_60S = 60 * 1000L
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.och.taxi.passenger.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.amap.api.services.core.AMapException;
|
||||
import com.amap.api.services.core.LatLonPoint;
|
||||
import com.amap.api.services.geocoder.GeocodeResult;
|
||||
import com.amap.api.services.geocoder.GeocodeSearch;
|
||||
@@ -52,7 +53,11 @@ public class TaxiPassengerGeocodeSearchModel implements GeocodeSearch.OnGeocodeS
|
||||
|
||||
public void initGeocodeSearch(){
|
||||
//通过经纬度逆地理编码得到位置
|
||||
mGeocodeSearch = new GeocodeSearch(mContext);
|
||||
try {
|
||||
mGeocodeSearch = new GeocodeSearch(mContext);
|
||||
} catch (AMapException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mGeocodeSearch.setOnGeocodeSearchListener(this);
|
||||
timer = new Timer();
|
||||
timerTask = new TimerTask() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.model;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
@@ -23,13 +25,14 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -38,11 +41,11 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
|
||||
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;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean;
|
||||
@@ -50,8 +53,8 @@ import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRemainingResp;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrdersInServiceQueryRespBean;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerQueryOrderRouteResp;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerStartReqBean;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerScoreUpdateOrderReqBean;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerStartReqBean;
|
||||
import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerADASStatusCallback;
|
||||
import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerAutopilotPlanningCallback;
|
||||
import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerControllerStatusCallback;
|
||||
@@ -84,8 +87,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
/**
|
||||
* Created by pangfan on 2021/8/19
|
||||
*
|
||||
@@ -123,7 +124,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
private int delayTime = 2;
|
||||
|
||||
private double mLongitude, mLatitude;
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private List<MogoLocation> mLocationsModels = new ArrayList<>();
|
||||
|
||||
@@ -236,10 +237,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
|
||||
//增加限速监听
|
||||
CallLimitingVelocityListenerManager.INSTANCE.addListener(TAG,limitingVelocityListener);
|
||||
@@ -260,7 +261,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallLimitingVelocityListenerManager.INSTANCE.removeListener(limitingVelocityListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
@@ -427,7 +428,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
|
||||
// TODO: 2021/9/12
|
||||
public void calculateTravelDistance(MogoLocation carLocation){
|
||||
public void calculateTravelDistance(MessagePad.GnssInfo carLocation){
|
||||
if (checkCurrentOCHOrder() && mCurrentOCHOrder.endSiteGcjPoint.size()>0) {
|
||||
double endLon = mCurrentOCHOrder.endSiteGcjPoint.get(0);
|
||||
double endLat = mCurrentOCHOrder.endSiteGcjPoint.get(1);
|
||||
@@ -466,25 +467,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (null == location) return;
|
||||
if (null == gnssInfo) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiPassengerOrderStatusEnum.OnTheWayToEnd) {
|
||||
calculateTravelDistance(location);
|
||||
calculateTravelDistance(gnssInfo);
|
||||
}
|
||||
}
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
|
||||
mLocation = location;
|
||||
// CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"mLongitude = "+mLongitude+", mLatitude = "+mLatitude);
|
||||
mLocation = gnssInfo;
|
||||
// CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"mLongitude = "+mLongitude+", mLatitude = "+mLatitude);
|
||||
for (IOCHTaxiPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
callback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
@@ -577,12 +579,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
};
|
||||
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp routeList) {
|
||||
|
||||
@@ -27,6 +27,8 @@ import com.mogo.och.taxi.passenger.model.TaxiPassengerModel;
|
||||
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/4
|
||||
@@ -120,7 +122,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
// 速度不用展示
|
||||
// LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.presenter;
|
||||
|
||||
import android.location.Location;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
|
||||
@@ -10,8 +11,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -27,7 +26,7 @@ import com.mogo.och.taxi.passenger.ui.TaxiPassengerServingOrderFragment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -140,7 +139,7 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
private static final long TIMEINTERVAL = 4000;
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (location != null){
|
||||
runOnUIThread(() -> mView.onCarLocationChanged(location));
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
@@ -19,19 +19,20 @@ import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy;
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.callback.ITPClickStartAutopilotCallback;
|
||||
import com.mogo.och.taxi.passenger.event.UIStatus;
|
||||
import com.mogo.och.taxi.passenger.mulprocess.EmptyService;
|
||||
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter;
|
||||
import com.mogo.och.taxi.passenger.ui.comment.TaxiPassengerArrivedView;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
|
||||
import com.mogo.och.taxi.passenger.mulprocess.EmptyService;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -109,43 +110,40 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
return new TaxiPassengerV2XNotificationView(getContext());
|
||||
}
|
||||
|
||||
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);
|
||||
}else {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
private void updateSwitchMapIcon() {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void initListener(){
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//视角切换
|
||||
if (MogoMapUIController.getInstance()
|
||||
.getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0 去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
|
||||
private void initListener() {
|
||||
mMapswitchBtn.setOnClickListener(v -> {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0 去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
//OverlayLeftViewUtils.INSTANCE.dismissOverlayView();
|
||||
}
|
||||
//OverlayLeftViewUtils.INSTANCE.dismissOverlayView();
|
||||
});
|
||||
}
|
||||
|
||||
private void initArrivedView(){
|
||||
private void initArrivedView() {
|
||||
mArrivedEndView = new WeakReference<>(new TaxiPassengerArrivedView(getContext()));
|
||||
mArrivedEndView.get().setITaxiPassengerScoreCallback((taxiPassengerScoreUpdateOrderReqBean) -> getPresenter().arrivedAndScore(taxiPassengerScoreUpdateOrderReqBean));
|
||||
}
|
||||
@@ -173,9 +171,10 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
|
||||
/**
|
||||
* VR mode 转换
|
||||
*
|
||||
* @param isVRMode
|
||||
*/
|
||||
public void switchVRFlatMode(boolean isVRMode){
|
||||
public void switchVRFlatMode(boolean isVRMode) {
|
||||
if (mRootView != null) {
|
||||
mRootView.setVisibility(isVRMode ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
@@ -187,6 +186,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private int mPrevAPStatus = -1;
|
||||
|
||||
public void onAutopilotStatusChanged(int status) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status) {
|
||||
@@ -199,7 +199,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
onAutopilotStatusSuccessDone();
|
||||
}
|
||||
// 3. 其他过程直接更新
|
||||
if (mPrevAPStatus != status){
|
||||
if (mPrevAPStatus != status) {
|
||||
autopilotStatusAnimchanged(status);
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
@@ -210,7 +210,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
// mAutopilotTv.setText(isInAutopilot?"自动驾驶":"开启自动驾驶");
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_auto_nor);
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
} else {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
@@ -240,20 +240,21 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
removeListener();
|
||||
}
|
||||
|
||||
private void removeListener(){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
private void removeListener() {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(null);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void changeOverview(UIStatus uiStatus){
|
||||
if(uiStatus.status==UIStatus.LIVE){
|
||||
public void changeOverview(UIStatus uiStatus) {
|
||||
if (uiStatus.status == UIStatus.LIVE) {
|
||||
CallerHmiManager.INSTANCE.hideSmallFragment();
|
||||
showOrHideServingOrderFragment(true,false);
|
||||
}else if(uiStatus.status==UIStatus.OVERVIEW){
|
||||
showOrHideServingOrderFragment(true, false);
|
||||
} else if (uiStatus.status == UIStatus.OVERVIEW) {
|
||||
CallerHmiManager.INSTANCE.showSmallFragment();
|
||||
showOrHideServingOrderFragment(false,false);
|
||||
showOrHideServingOrderFragment(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,25 +265,26 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
|
||||
/**
|
||||
* 显示或隐藏订单信息
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
public void showOrHideServingOrderFragment(boolean isShow,boolean showOrHideLefeMenu){
|
||||
public void showOrHideServingOrderFragment(boolean isShow, boolean showOrHideLefeMenu) {
|
||||
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
if (isShow){
|
||||
if (ochServingOrderFragment == null){
|
||||
if (isShow) {
|
||||
if (ochServingOrderFragment == null) {
|
||||
ochServingOrderFragment = new TaxiPassengerServingOrderFragment().newInstance();
|
||||
}
|
||||
if(showOrHideLefeMenu) {
|
||||
if (showOrHideLefeMenu) {
|
||||
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true);
|
||||
}
|
||||
if (ochServingOrderFragment.isHidden()){
|
||||
if (ochServingOrderFragment.isHidden()) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
return;
|
||||
}
|
||||
if (ochServingOrderFragment.isAdded()){
|
||||
if (ochServingOrderFragment.isAdded()) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
@@ -293,13 +295,13 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.add(R.id.module_mogo_och_navi_panel_container, ochServingOrderFragment)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
|
||||
}else {
|
||||
if (ochServingOrderFragment != null){
|
||||
} else {
|
||||
if (ochServingOrderFragment != null) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE)
|
||||
.hide(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
}
|
||||
if(showOrHideLefeMenu) {
|
||||
if (showOrHideLefeMenu) {
|
||||
OverlayLeftViewUtils.INSTANCE.dismissOverlayView(true);
|
||||
CallerHmiManager.INSTANCE.hideSmallFragment();
|
||||
}
|
||||
@@ -311,18 +313,19 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* 乘客验证成功,页面显示,按钮置于不可点击
|
||||
* 司机端确认可点击开启自动驾驶, 按钮置为可点击
|
||||
* 订单前往目的地,页面消失
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
public void showOrHideStartAutopilotView(boolean isShow, boolean isClickable){
|
||||
if (isShow){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void showOrHideStartAutopilotView(boolean isShow, boolean isClickable) {
|
||||
if (isShow) {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
mStartAutopilotView = new WeakReference<>(new TaxiPassengerStartAutopilotView(getContext()));
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(this);
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mStartAutopilotView.get());
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mStartAutopilotView.get());
|
||||
updateStartAutopilotBtnStatus(isClickable);
|
||||
}else {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
} else {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(null);
|
||||
@@ -331,15 +334,15 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
public void updateStartAutopilotBtnStatus(boolean isClickable){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void updateStartAutopilotBtnStatus(boolean isClickable) {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().handleStartAutopilotBtnStatus(isClickable);
|
||||
}
|
||||
|
||||
public void onAutopilotStatusSuccessDone(){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void onAutopilotStatusSuccessDone() {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().onAutopilotStatusSuccess();
|
||||
@@ -351,36 +354,38 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* ② 到达上车点 隐藏到达终点的页面(上一个订单没有评价)
|
||||
* ③ 到达目的地 显示到达终点的页面
|
||||
* ④ debug 使用
|
||||
* @param isShow true 展示 false 隐藏
|
||||
*
|
||||
* @param isShow true 展示 false 隐藏
|
||||
* @param arrivedEndStation 目的地
|
||||
* @param orderNo 订单No
|
||||
* @param orderNo 订单No
|
||||
*/
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation,String orderNo){
|
||||
if (isShow){
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation, String orderNo) {
|
||||
if (isShow) {
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
initArrivedView();
|
||||
}
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get(),R.style.och_window_anim_alpha);
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mArrivedEndView.get(), R.style.och_window_anim_alpha);
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation,orderNo);
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation, orderNo);
|
||||
}
|
||||
//如果在全屏 回收需要300毫秒 后期优化使用单独的播放器
|
||||
},500);
|
||||
}else {
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
}, 500);
|
||||
} else {
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
return;
|
||||
}
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedEndView.get());
|
||||
}
|
||||
}
|
||||
|
||||
// 20 司机到达上车点
|
||||
public void preOrderThankPageTenlogic(String startSiteAddr,
|
||||
String endSiteAddr,
|
||||
String passengerNum,
|
||||
String carNumber,
|
||||
String phone){
|
||||
String phone) {
|
||||
showOrHideArrivedEndLayout(false, "", "");
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
@@ -399,33 +404,34 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
String phone) {
|
||||
try {
|
||||
if (isShow) {
|
||||
if(mArrivedCheckView==null||mArrivedCheckView.get()==null){
|
||||
if (mArrivedCheckView == null || mArrivedCheckView.get() == null) {
|
||||
initCheckView();
|
||||
}
|
||||
mArrivedCheckView.get().setData(startSiteAddr, endSiteAddr, passengerNum, carNumber,phone);
|
||||
mArrivedCheckView.get().setData(startSiteAddr, endSiteAddr, passengerNum, carNumber, phone);
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mArrivedCheckView.get());
|
||||
} else {
|
||||
if(mArrivedCheckView==null||mArrivedCheckView.get()==null){
|
||||
if (mArrivedCheckView == null || mArrivedCheckView.get() == null) {
|
||||
return;
|
||||
}
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedCheckView.get());
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户评分后接口回调
|
||||
* 用户评分后接口回调
|
||||
*
|
||||
* @param isSuccess true 打分成功 false 打分失败
|
||||
*/
|
||||
public void showArrivedEndLayout2Thank(boolean isSuccess) {
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
initArrivedView();
|
||||
}
|
||||
if(isSuccess){
|
||||
if (isSuccess) {
|
||||
mArrivedEndView.get().scoreSuccess();
|
||||
}else {
|
||||
} else {
|
||||
mArrivedEndView.get().scoreFail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,8 @@ import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerMapViewCallback;
|
||||
@@ -40,12 +39,14 @@ import com.mogo.och.taxi.passenger.utils.TaxiPassengerMapAssetStyleUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* 乘客屏小地图
|
||||
*/
|
||||
public class TaxiPassengerMapDirectionView
|
||||
extends RelativeLayout
|
||||
implements IMoGoMapLocationListener, ITaxiPassengerMapDirectionView, AMap.OnCameraChangeListener {
|
||||
implements IMoGoChassisLocationGCJ02Listener, ITaxiPassengerMapDirectionView, AMap.OnCameraChangeListener {
|
||||
|
||||
//小地图名称
|
||||
public static final String TAG = "TPMapDirectionView";
|
||||
@@ -104,14 +105,14 @@ public class TaxiPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
@@ -178,13 +179,12 @@ public class TaxiPassengerMapDirectionView
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@org.jetbrains.annotations.Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (location == null){
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (gnssInfo == null){
|
||||
return;
|
||||
}
|
||||
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
LatLng currentLatLng = new LatLng(gnssInfo.getLatitude(), gnssInfo.getLongitude());
|
||||
|
||||
if (mCoordinatesLatLng.size() > 1) {
|
||||
//圈定地图显示范围
|
||||
@@ -200,13 +200,13 @@ public class TaxiPassengerMapDirectionView
|
||||
} else {
|
||||
//设置希望展示的地图缩放级别
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder()
|
||||
.target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
.target(mCarMarker.getPosition()).tilt(0).bearing((float) gnssInfo.getHeading()).zoom(zoomLevel).build();
|
||||
mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
}
|
||||
//更新车辆位置
|
||||
if (mCarMarker != null) {
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "location.getBearing() = " + location.getBearing());
|
||||
mCarMarker.setRotateAngle(360 - location.getBearing());
|
||||
mCarMarker.setRotateAngle((float) (360 - gnssInfo.getHeading()));
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "onCarLocationChanged2--loacation :" + location.getLatitude()+", "+location.getLongitude());
|
||||
mCarMarker.setToTop();
|
||||
|
||||
@@ -4,7 +4,6 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAX
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorInflater;
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
@@ -22,7 +21,6 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -44,6 +42,8 @@ import com.mogo.och.taxi.passenger.utils.TPRouteDataTestUtils;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/8
|
||||
@@ -352,8 +352,8 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
|
||||
}
|
||||
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
updateSpeedView(location.getSpeed());
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
updateSpeedView((float) location.getVehicleSpeed());
|
||||
}
|
||||
|
||||
public void onLimitingVelocityChange(int limitingVelocity) {
|
||||
|
||||
@@ -274,9 +274,10 @@ object OverlayLeftViewUtils {
|
||||
*
|
||||
*/
|
||||
fun transmissionIndex(index:Int){
|
||||
if(!ProcessUtils.isMainProcess(Utils.getApp())) {
|
||||
// TODO 需要与,杨亚坤,确认为啥要限制仅在主进程
|
||||
// if(!ProcessUtils.isMainProcess(Utils.getApp())) {
|
||||
LeftMenuOpen.transmissionIndex(index)
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
fun transmissionIndexGet(index: Int){
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
android:layout_marginEnd="155dp"
|
||||
android:layout_marginBottom="231dp"
|
||||
android:orientation="vertical"
|
||||
app:bgColor="@color/transparent_white_30"
|
||||
app:bgColor="@color/color_B3FFFFFF"
|
||||
app:blurRadius="@dimen/dp_60"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -57,7 +57,6 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
@@ -65,7 +64,6 @@ dependencies {
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
|
||||
@@ -4,9 +4,9 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.LocationUtils;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.commons.utils.LocationUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ColorUtils;
|
||||
import com.mogo.map.MogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
@@ -32,7 +32,7 @@ public class TaxiOverlayManager {
|
||||
// 引导线颜色
|
||||
mPolylineColors = new ArrayList<>();
|
||||
mContext = context;
|
||||
mogoOverlayManager = MogoOverlayManager.getInstance();
|
||||
mogoOverlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,15 +11,16 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.ui.TaxiFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -45,8 +46,7 @@ class TaxiProvider implements IMogoOCH , IMogoStatusChangedListener {
|
||||
*/
|
||||
private void stepIntoVrMode() {
|
||||
CallerLogger.INSTANCE.d( M_TAXI + TAG, "进入vr模式" );
|
||||
MogoMapUIController.getInstance()
|
||||
.stepInVrMode( false );
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).stepInVrMode(false);
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.taxi.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,7 +11,7 @@ public interface ITaxiControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class TaxiConst {
|
||||
}
|
||||
|
||||
// OCH arouter 路由path
|
||||
const val PATH = "/och/api"
|
||||
const val PATH = "/driver/api"
|
||||
|
||||
// 到达起始点围栏
|
||||
const val ARRIVE_AT_START_STATION_DISTANCE = 15 //围栏由20m改为50m 再次改为15m
|
||||
|
||||
@@ -27,12 +27,13 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -75,8 +76,8 @@ import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderTypeEnum;
|
||||
import com.mogo.och.taxi.constant.TaxtServingStatusManager;
|
||||
import com.mogo.och.taxi.network.TaxiServiceManager;
|
||||
import com.mogo.och.taxi.utils.TaxiAnalyticsManager;
|
||||
import com.mogo.och.taxi.utils.OrderUtil;
|
||||
import com.mogo.och.taxi.utils.TaxiAnalyticsManager;
|
||||
import com.mogo.och.taxi.utils.TaxiTrajectoryManager;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
@@ -133,7 +134,7 @@ public class TaxiModel {
|
||||
private int mPreRouteIndex = 0;
|
||||
|
||||
private double mLongitude, mLatitude;
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private LoginService loginService;
|
||||
|
||||
@@ -223,10 +224,10 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//定位监听, 传false是高德坐标系
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
@@ -267,7 +268,7 @@ public class TaxiModel {
|
||||
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
@@ -995,7 +996,7 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
//根据围栏判断,是否到达起点
|
||||
private void judgeStartStation(MogoLocation location) {
|
||||
private void judgeStartStation(MessagePad.GnssInfo location) {
|
||||
if (mCurrentOCHOrder == null || mCurrentOCHOrder.startSiteGcjPoint == null
|
||||
|| mCurrentOCHOrder.startSiteGcjPoint.size() < 2) {
|
||||
return;
|
||||
@@ -1052,31 +1053,31 @@ public class TaxiModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationLIstener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationLIstener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (null == location) return;
|
||||
if (null == gnssInfo) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiOrderStatusEnum.OnTheWayToStart) {
|
||||
judgeStartStation(location);
|
||||
judgeStartStation(gnssInfo);
|
||||
}
|
||||
if (getCurOrderStatus() == TaxiOrderStatusEnum.OnTheWayToEnd &&
|
||||
mPrevAPStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
judgeEndStation(location);
|
||||
judgeEndStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
mLocation = location;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
mLocation = gnssInfo;
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void judgeEndStation(MogoLocation location) {
|
||||
private void judgeEndStation(MessagePad.GnssInfo location) {
|
||||
if (mCurrentOCHOrder == null || mCurrentOCHOrder.endSiteGcjPoint == null
|
||||
|| mCurrentOCHOrder.endSiteGcjPoint.size() < 2) {
|
||||
return;
|
||||
@@ -1252,12 +1253,8 @@ public class TaxiModel {
|
||||
public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) {
|
||||
}
|
||||
};
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.taxi.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
|
||||
@@ -12,7 +11,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -20,14 +18,14 @@ import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
import com.mogo.och.common.module.biz.callback.ILoginCallback;
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.constant.TaxiDriverRoleEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRespBean;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean;
|
||||
import com.mogo.och.taxi.callback.ITaxiADASStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiControllerStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiOrderStatusCallback;
|
||||
import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.constant.TaxiDriverRoleEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.constant.TaxtServingStatusManager;
|
||||
import com.mogo.och.taxi.model.TaxiModel;
|
||||
import com.mogo.och.taxi.ui.TaxiFragment;
|
||||
@@ -36,6 +34,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/1/18
|
||||
@@ -314,10 +314,10 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location){
|
||||
runOnUIThread(() -> {
|
||||
mView.updateSpeedView(location.getSpeed());
|
||||
mView.updateSpeedView((float) location.getVehicleSpeed());
|
||||
mView.updateLocation(location.getLatitude(),location.getLongitude());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,14 +31,15 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
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.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.common.module.utils.AnimatorDrawableUtil;
|
||||
import com.mogo.och.taxi.R;
|
||||
|
||||
@@ -85,22 +86,22 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
R.drawable.anim_flow_00003, R.drawable.anim_flow_00004, R.drawable.anim_flow_00005,
|
||||
R.drawable.anim_flow_00006, R.drawable.anim_flow_00007, R.drawable.anim_flow_00008,
|
||||
R.drawable.anim_flow_00009, R.drawable.anim_flow_00010, R.drawable.anim_flow_00011,
|
||||
R.drawable.anim_flow_00012, R.drawable.anim_flow_00013,R.drawable.anim_flow_00014,
|
||||
R.drawable.anim_flow_00012, R.drawable.anim_flow_00013, R.drawable.anim_flow_00014,
|
||||
R.drawable.anim_flow_00015, R.drawable.anim_flow_00016, R.drawable.anim_flow_00017,
|
||||
R.drawable.anim_flow_00018,R.drawable.anim_flow_00019, R.drawable.anim_flow_00020,
|
||||
R.drawable.anim_flow_00021,R.drawable.anim_flow_00022,R.drawable.anim_flow_00023,
|
||||
R.drawable.anim_flow_00024, R.drawable.anim_flow_00025,R.drawable.anim_flow_00026,
|
||||
R.drawable.anim_flow_00018, R.drawable.anim_flow_00019, R.drawable.anim_flow_00020,
|
||||
R.drawable.anim_flow_00021, R.drawable.anim_flow_00022, R.drawable.anim_flow_00023,
|
||||
R.drawable.anim_flow_00024, R.drawable.anim_flow_00025, R.drawable.anim_flow_00026,
|
||||
R.drawable.anim_flow_00027, R.drawable.anim_flow_00028, R.drawable.anim_flow_00029,
|
||||
R.drawable.anim_flow_00030,R.drawable.anim_flow_00031, R.drawable.anim_flow_00032,
|
||||
R.drawable.anim_flow_00033,R.drawable.anim_flow_00034,R.drawable.anim_flow_00035,
|
||||
R.drawable.anim_flow_00036, R.drawable.anim_flow_00037,R.drawable.anim_flow_00038,
|
||||
R.drawable.anim_flow_00030, R.drawable.anim_flow_00031, R.drawable.anim_flow_00032,
|
||||
R.drawable.anim_flow_00033, R.drawable.anim_flow_00034, R.drawable.anim_flow_00035,
|
||||
R.drawable.anim_flow_00036, R.drawable.anim_flow_00037, R.drawable.anim_flow_00038,
|
||||
R.drawable.anim_flow_00039, R.drawable.anim_flow_00040, R.drawable.anim_flow_00041,
|
||||
R.drawable.anim_flow_00042,R.drawable.anim_flow_00043, R.drawable.anim_flow_00044,
|
||||
R.drawable.anim_flow_00045,R.drawable.anim_flow_00046,R.drawable.anim_flow_00047,
|
||||
R.drawable.anim_flow_00048, R.drawable.anim_flow_00049,R.drawable.anim_flow_00050,
|
||||
R.drawable.anim_flow_00042, R.drawable.anim_flow_00043, R.drawable.anim_flow_00044,
|
||||
R.drawable.anim_flow_00045, R.drawable.anim_flow_00046, R.drawable.anim_flow_00047,
|
||||
R.drawable.anim_flow_00048, R.drawable.anim_flow_00049, R.drawable.anim_flow_00050,
|
||||
R.drawable.anim_flow_00051, R.drawable.anim_flow_00052, R.drawable.anim_flow_00053,
|
||||
R.drawable.anim_flow_00054,R.drawable.anim_flow_00055, R.drawable.anim_flow_00056,
|
||||
R.drawable.anim_flow_00057,R.drawable.anim_flow_00058,R.drawable.anim_flow_00059
|
||||
R.drawable.anim_flow_00054, R.drawable.anim_flow_00055, R.drawable.anim_flow_00056,
|
||||
R.drawable.anim_flow_00057, R.drawable.anim_flow_00058, R.drawable.anim_flow_00059
|
||||
};
|
||||
|
||||
private Integer[] startManCODrawableIds = new Integer[]{
|
||||
@@ -111,29 +112,29 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
R.drawable.anim_flow_man_co_00008, R.drawable.anim_flow_man_co_00009,
|
||||
R.drawable.anim_flow_man_co_00010, R.drawable.anim_flow_man_co_00011,
|
||||
R.drawable.anim_flow_man_co_00012, R.drawable.anim_flow_man_co_00013,
|
||||
R.drawable.anim_flow_man_co_00014,R.drawable.anim_flow_man_co_00015,
|
||||
R.drawable.anim_flow_man_co_00014, R.drawable.anim_flow_man_co_00015,
|
||||
R.drawable.anim_flow_man_co_00016, R.drawable.anim_flow_man_co_00017,
|
||||
R.drawable.anim_flow_man_co_00018,R.drawable.anim_flow_man_co_00019,
|
||||
R.drawable.anim_flow_man_co_00018, R.drawable.anim_flow_man_co_00019,
|
||||
R.drawable.anim_flow_man_co_00020, R.drawable.anim_flow_man_co_00021,
|
||||
R.drawable.anim_flow_man_co_00022,R.drawable.anim_flow_man_co_00023,
|
||||
R.drawable.anim_flow_man_co_00022, R.drawable.anim_flow_man_co_00023,
|
||||
R.drawable.anim_flow_man_co_00024, R.drawable.anim_flow_man_co_00025,
|
||||
R.drawable.anim_flow_man_co_00026,R.drawable.anim_flow_man_co_00027,
|
||||
R.drawable.anim_flow_man_co_00026, R.drawable.anim_flow_man_co_00027,
|
||||
R.drawable.anim_flow_man_co_00028, R.drawable.anim_flow_man_co_00029,
|
||||
R.drawable.anim_flow_man_co_00030,R.drawable.anim_flow_man_co_00031,
|
||||
R.drawable.anim_flow_man_co_00030, R.drawable.anim_flow_man_co_00031,
|
||||
R.drawable.anim_flow_man_co_00032, R.drawable.anim_flow_man_co_00033,
|
||||
R.drawable.anim_flow_man_co_00034,R.drawable.anim_flow_man_co_00035,
|
||||
R.drawable.anim_flow_man_co_00034, R.drawable.anim_flow_man_co_00035,
|
||||
R.drawable.anim_flow_man_co_00036, R.drawable.anim_flow_man_co_00037,
|
||||
R.drawable.anim_flow_man_co_00038,R.drawable.anim_flow_man_co_00039,
|
||||
R.drawable.anim_flow_man_co_00038, R.drawable.anim_flow_man_co_00039,
|
||||
R.drawable.anim_flow_man_co_00040, R.drawable.anim_flow_man_co_00041,
|
||||
R.drawable.anim_flow_man_co_00042,R.drawable.anim_flow_man_co_00043,
|
||||
R.drawable.anim_flow_man_co_00042, R.drawable.anim_flow_man_co_00043,
|
||||
R.drawable.anim_flow_man_co_00044, R.drawable.anim_flow_man_co_00045,
|
||||
R.drawable.anim_flow_man_co_00046,R.drawable.anim_flow_man_co_00047,
|
||||
R.drawable.anim_flow_man_co_00046, R.drawable.anim_flow_man_co_00047,
|
||||
R.drawable.anim_flow_man_co_00048, R.drawable.anim_flow_man_co_00049,
|
||||
R.drawable.anim_flow_man_co_00050,R.drawable.anim_flow_man_co_00051,
|
||||
R.drawable.anim_flow_man_co_00050, R.drawable.anim_flow_man_co_00051,
|
||||
R.drawable.anim_flow_man_co_00052, R.drawable.anim_flow_man_co_00053,
|
||||
R.drawable.anim_flow_man_co_00054,R.drawable.anim_flow_man_co_00055,
|
||||
R.drawable.anim_flow_man_co_00054, R.drawable.anim_flow_man_co_00055,
|
||||
R.drawable.anim_flow_man_co_00056, R.drawable.anim_flow_man_co_00057,
|
||||
R.drawable.anim_flow_man_co_00058,R.drawable.anim_flow_man_co_00059
|
||||
R.drawable.anim_flow_man_co_00058, R.drawable.anim_flow_man_co_00059
|
||||
};
|
||||
|
||||
@Override
|
||||
@@ -168,34 +169,27 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
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) {
|
||||
//视角切换
|
||||
long start = SystemClock.elapsedRealtime();
|
||||
try {
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setOnClickListener(v -> {
|
||||
//视角切换
|
||||
long start = SystemClock.elapsedRealtime();
|
||||
try {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, TaxiConst.TYPE_MARKER_TAXI_ORDER);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
}
|
||||
} finally {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "cost:" + (SystemClock.elapsedRealtime() - start));
|
||||
}
|
||||
|
||||
} finally {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "cost:" + (SystemClock.elapsedRealtime() - start));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
mSettingBtn = findViewById(R.id.module_och_taxi_setting_layout);
|
||||
@@ -214,7 +208,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
}
|
||||
|
||||
mAICollectBtn = findViewById(R.id.module_och_taxi_ai_collect_ll);
|
||||
if (mAICollectBtn != null){
|
||||
if (mAICollectBtn != null) {
|
||||
CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn);
|
||||
}
|
||||
|
||||
@@ -224,11 +218,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
public void onClickImpl(View v) {
|
||||
// 如果能自动驾驶,就自动驾驶,不能就提示
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING) {
|
||||
return; //远程代驾状态下不可开启自动驾驶,只能等远程代驾主动退出
|
||||
}else if (!(boolean)ctvAutopilotStatusRL.getTag()){
|
||||
} else if (!(boolean) ctvAutopilotStatusRL.getTag()) {
|
||||
ToastUtils.showShort(getResources().getString(R.string.module_och_taxi_auto_disable_tip1));
|
||||
}else {
|
||||
} else {
|
||||
startAutopilot();
|
||||
}
|
||||
}
|
||||
@@ -236,14 +230,14 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
// debug下调用测试面板 长按速度值 任意模式下调试都打开
|
||||
// if (DebugConfig.isDebug()) {
|
||||
mSpeedView.setOnLongClickListener(v -> {
|
||||
if (groupTestPanel.getVisibility() == View.VISIBLE) {
|
||||
groupTestPanel.setVisibility(View.GONE);
|
||||
} else {
|
||||
groupTestPanel.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
mSpeedView.setOnLongClickListener(v -> {
|
||||
if (groupTestPanel.getVisibility() == View.VISIBLE) {
|
||||
groupTestPanel.setVisibility(View.GONE);
|
||||
} else {
|
||||
groupTestPanel.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// }
|
||||
|
||||
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
@@ -282,13 +276,16 @@ 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);
|
||||
}else {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
private void updateSwitchMapIcon() {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,25 +334,25 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
});
|
||||
}
|
||||
|
||||
public void stopAnimAndUpdateBtnStatus(){
|
||||
public void stopAnimAndUpdateBtnStatus() {
|
||||
startOrStopLoadingAnim(false);
|
||||
startAutopilotDone(false);
|
||||
}
|
||||
|
||||
public void onManMachineCoDriving(int manMachineCoDriving){
|
||||
if (mPrevAPStatus != manMachineCoDriving){
|
||||
public void onManMachineCoDriving(int manMachineCoDriving) {
|
||||
if (mPrevAPStatus != manMachineCoDriving) {
|
||||
autopilotStatusAnimchanged(manMachineCoDriving);
|
||||
}
|
||||
mPrevAPStatus = manMachineCoDriving;
|
||||
}
|
||||
|
||||
public void updateCtvAutopilotStatusTag(boolean tag){
|
||||
public void updateCtvAutopilotStatusTag(boolean tag) {
|
||||
ctvAutopilotStatusRL.setTag(tag);
|
||||
}
|
||||
|
||||
public void onCheckPilotConditionSafe(boolean isSafe){
|
||||
public void onCheckPilotConditionSafe(boolean isSafe) {
|
||||
updateCtvAutopilotStatusTag(isSafe);
|
||||
if (isSafe){
|
||||
if (isSafe) {
|
||||
updateOrderBottomBtnUI();
|
||||
}
|
||||
}
|
||||
@@ -370,38 +367,38 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
mAutopilotTv.setTextColor(getResources().getColor(R.color.taxi_autopilot_text_color_normal));
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_ic_autopilot);
|
||||
|
||||
if (animatorDrawableUtil == null){
|
||||
if (animatorDrawableUtil == null) {
|
||||
animatorDrawableUtil = new AnimatorDrawableUtil();
|
||||
}
|
||||
animatorDrawableUtil.setAnimation(mAnimFlowIv, Arrays.asList(startAutopilotDrawableIds));
|
||||
animatorDrawableUtil.start(true,100,null);
|
||||
animatorDrawableUtil.start(true, 100, null);
|
||||
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
|
||||
mAutopilotTv.setText("自动驾驶");
|
||||
mAutopilotTv.setTextColor(getResources().getColor(R.color.taxi_autopilot_text_color_normal));
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_ic_autopilot);
|
||||
if (animatorDrawableUtil != null){
|
||||
if (animatorDrawableUtil != null) {
|
||||
animatorDrawableUtil.stop();
|
||||
mAnimFlowIv.setImageResource(0);
|
||||
}
|
||||
|
||||
// ctvAutopilotStatusRL.setBackground(getResources().getDrawable(R.drawable.taxi_autopilot_bg_selector));
|
||||
animatorDrawableUtil = null;
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING == status){
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING == status) {
|
||||
mAutopilotTv.setText("远程代驾");
|
||||
mAutopilotTv.setTextColor(getResources().getColor(R.color.taxi_autopilot_text_color_normal));
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_ic_autopilot);
|
||||
if (animatorDrawableUtil == null){
|
||||
if (animatorDrawableUtil == null) {
|
||||
animatorDrawableUtil = new AnimatorDrawableUtil();
|
||||
}
|
||||
animatorDrawableUtil.setAnimation(mAnimFlowIv, Arrays.asList(startManCODrawableIds));
|
||||
animatorDrawableUtil.start(true,100,null);
|
||||
animatorDrawableUtil.start(true, 100, null);
|
||||
|
||||
}else {
|
||||
} else {
|
||||
mAutopilotTv.setText("自动驾驶");
|
||||
mAutopilotTv.setTextColor(getResources().getColor(R.color.taxi_autopilot_text_color_disable));
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_ic_autopilot_disable);
|
||||
if (animatorDrawableUtil != null){
|
||||
if (animatorDrawableUtil != null) {
|
||||
animatorDrawableUtil.stop();
|
||||
mAnimFlowIv.setImageResource(0);
|
||||
}
|
||||
@@ -471,18 +468,18 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() { //未启动成功10s后做处理
|
||||
if (isStarting){ //判断动画是否在进行
|
||||
if (isStarting) { //判断动画是否在进行
|
||||
//并且根据状态来设置自动驾驶启动成功还是失败
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
startAutopilotDone(true);
|
||||
}else {
|
||||
} else {
|
||||
startAutopilotDone(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},TIMER_START_AUTOPILOT_INTERVAL);
|
||||
}, TIMER_START_AUTOPILOT_INTERVAL);
|
||||
}
|
||||
|
||||
public void hidPanel() {
|
||||
@@ -557,7 +554,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
}
|
||||
}
|
||||
|
||||
private void closeAmapViewIFHadeAdd(){
|
||||
private void closeAmapViewIFHadeAdd() {
|
||||
if (ochAmapNaviFragment != null) {
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
ochAmapNaviFragment.onDestroy();
|
||||
@@ -567,7 +564,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
}
|
||||
}
|
||||
|
||||
private void closeRouteViewIFHadeAdd(){
|
||||
private void closeRouteViewIFHadeAdd() {
|
||||
if (taxiRottingNaviFragment != null) {
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
taxiRottingNaviFragment.onDestroy();
|
||||
@@ -602,6 +599,5 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
}
|
||||
|
||||
|
||||
|
||||
public abstract void startNaviToEndStation(boolean isShow);
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ 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;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
@@ -47,6 +47,7 @@ import com.mogo.och.taxi.model.TaxiModel;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -750,39 +751,33 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
private void setOrRemoveMapMaker(boolean isAdd, String uuid, List<Double> station,int resourceId){
|
||||
if (isAdd){
|
||||
//开启线程执行起终点marker设置
|
||||
Runnable setMapMarkerRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + "setMapMaker= " + Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + station.get(1) + ",longitude=" + station.get(0));
|
||||
Runnable setMapMarkerRunnable = () -> {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + "setMapMaker= " + Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + station.get(1) + ",longitude=" + station.get(0));
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(TaxiConst.TYPE_MARKER_TAXI_ORDER)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.set3DMode(true)
|
||||
.gps(true)
|
||||
.controlAngle(true)
|
||||
.icon3DRes(resourceId)
|
||||
.latitude(station.get(1))
|
||||
.longitude(station.get(0));
|
||||
IMogoMarker marker = MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).addMarker(uuid, options);
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(station.get(0)
|
||||
, station.get(1), -1);
|
||||
if (null != centerLine && marker != null) {// 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(TaxiConst.TYPE_MARKER_TAXI_ORDER)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.set3DMode(true)
|
||||
.gps(true)
|
||||
.controlAngle(true)
|
||||
.icon3DRes(resourceId)
|
||||
.latitude(station.get(1))
|
||||
.longitude(station.get(0));
|
||||
IMogoMarker marker = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp())).addMarker(uuid, options);
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(station.get(0)
|
||||
, station.get(1), -1);
|
||||
if (null != centerLine && marker != null) {// 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致
|
||||
marker.setRotateAngle(centerLine.getAngle().floatValue());
|
||||
}
|
||||
};
|
||||
OCHThreadPoolManager.getsInstance().execute(setMapMarkerRunnable);
|
||||
}else {
|
||||
//开启线程移除起终点marker设置
|
||||
Runnable removeMapMarkerRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + "RemoveMapMaker=" + Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + station.get(1) + ",longitude=" + station.get(0));
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).removeMarkers(uuid);
|
||||
}
|
||||
Runnable removeMapMarkerRunnable = () -> {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + "RemoveMapMaker=" + Thread.currentThread().getName(),
|
||||
uuid + "=latitude=" + station.get(1) + ",longitude=" + station.get(0));
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp())).removeMarkers(uuid);
|
||||
};
|
||||
OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable);
|
||||
}
|
||||
|
||||
@@ -29,9 +29,8 @@ import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.R;
|
||||
import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
|
||||
@@ -39,12 +38,14 @@ import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* taxi司机端前往目的地小地图导航
|
||||
*/
|
||||
public class TaxiMapDirectionView
|
||||
extends RelativeLayout
|
||||
implements IMoGoMapLocationListener, ITaxiMapDirectionView, AMap.OnCameraChangeListener {
|
||||
implements IMoGoChassisLocationGCJ02Listener, ITaxiMapDirectionView, AMap.OnCameraChangeListener {
|
||||
|
||||
//小地图名称
|
||||
public static final String TAG = "TPMapDirectionView";
|
||||
@@ -98,14 +99,14 @@ public class TaxiMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
@@ -174,13 +175,12 @@ public class TaxiMapDirectionView
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@org.jetbrains.annotations.Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (location == null){
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (gnssInfo == null){
|
||||
return;
|
||||
}
|
||||
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
LatLng currentLatLng = new LatLng(gnssInfo.getLatitude(), gnssInfo.getLongitude());
|
||||
|
||||
if (mCoordinatesLatLng.size() > 1) {
|
||||
//圈定地图显示范围
|
||||
@@ -196,13 +196,13 @@ public class TaxiMapDirectionView
|
||||
} else {
|
||||
//设置希望展示的地图缩放级别
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder()
|
||||
.target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
.target(mCarMarker.getPosition()).tilt(0).bearing((float) gnssInfo.getHeading()).zoom(zoomLevel).build();
|
||||
mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
}
|
||||
//更新车辆位置
|
||||
if (mCarMarker != null) {
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "location.getBearing() = " + location.getBearing());
|
||||
mCarMarker.setRotateAngle(360 - location.getBearing());
|
||||
mCarMarker.setRotateAngle((float) (360 - gnssInfo.getHeading()));
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "onCarLocationChanged2--loacation :" + location.getLatitude()+", "+location.getLongitude());
|
||||
mCarMarker.setToTop();
|
||||
|
||||
@@ -48,7 +48,7 @@ adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei ob
|
||||
|
||||
|
||||
// (旧版本)使用命令行触发各种测试场景演示
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
|
||||
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ez TextPanelOpenStatus true --ei TextPanelOpenType 11
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
### 鹰眼 (MOGO-Autopilot) 平台接入说明
|
||||
```gradle
|
||||
// 新版本架构SDK
|
||||
MOGO_CORE_SDK_VERSION = 0.0.9
|
||||
|
||||
// 所有UI展示层
|
||||
com.mogo.eagle.core.function.impl:hmi:${MOGO_CORE_SDK_VERSION}
|
||||
// 自动驾驶/工控机相关的功能实现
|
||||
com.mogo.eagle.core.function.impl:autopilot:${MOGO_CORE_SDK_VERSION}
|
||||
// 车辆检测模块功能实现
|
||||
com.mogo.eagle.core.function.impl:check:${MOGO_CORE_SDK_VERSION}
|
||||
// 地图层
|
||||
com.mogo.eagle.core.function.impl:map:${MOGO_CORE_SDK_VERSION}
|
||||
// 超视距服务
|
||||
com.mogo.eagle.core.function.impl:monitoring:${MOGO_CORE_SDK_VERSION}
|
||||
// 推送通知服务
|
||||
com.mogo.eagle.core.function.impl:notice:${MOGO_CORE_SDK_VERSION}
|
||||
// 自研OBU功能服务
|
||||
com.mogo.eagle.core.function.impl:obu-mogo:${MOGO_CORE_SDK_VERSION}
|
||||
// 小地图功能实现
|
||||
com.mogo.eagle.core.function.impl:smp:${MOGO_CORE_SDK_VERSION}
|
||||
// 道路协同功能实现
|
||||
com.mogo.eagle.core.function.impl:v2x:${MOGO_CORE_SDK_VERSION}
|
||||
// 模块功能定义接口,回调监听接口定义
|
||||
com.mogo.eagle.core.function:api:${MOGO_CORE_SDK_VERSION}
|
||||
// 负责模块之间调用,回调监听注册
|
||||
com.mogo.eagle.core.function:call:${MOGO_CORE_SDK_VERSION}
|
||||
// 数据bean基础,用来统一模块间数据调用
|
||||
com.mogo.eagle.core:data:${MOGO_CORE_SDK_VERSION}
|
||||
// 项目公用资源
|
||||
com.mogo.eagle.core:res:${MOGO_CORE_SDK_VERSION}
|
||||
// 项目工具类
|
||||
com.mogo.eagle.core:utils:${MOGO_CORE_SDK_VERSION}
|
||||
// 网络服务
|
||||
com.mogo.eagle.core:network:${MOGO_CORE_SDK_VERSION}
|
||||
```
|
||||
|
||||
|
||||
```gradle
|
||||
MOGO_COMMONS_VERSION = 2.0.66
|
||||
// modules
|
||||
moduleshare : "com.mogo.module:module-share:${MOGO_COMMONS_VERSION}",
|
||||
mogocommons : "com.mogo.commons:mogo-commons:${MOGO_COMMONS_VERSION}",
|
||||
mogoutils : "com.mogo.commons:mogo-utils:${MOGO_COMMONS_VERSION}",
|
||||
mapamap : "com.mogo.map:map-amap:${MOGO_COMMONS_VERSION}",
|
||||
mapautomap : "com.mogo.map:map-autonavi:${MOGO_COMMONS_VERSION}",
|
||||
mapcustom : "com.mogo.map:map-custom:${MOGO_COMMONS_VERSION}",
|
||||
mogomap : "com.mogo.map:mogo-map:${MOGO_COMMONS_VERSION}",
|
||||
mogomapapi : "com.mogo.map:mogo-map-api:${MOGO_COMMONS_VERSION}",
|
||||
mogocustommap : "com.zhidaoauto.machine:map:${MOGO_COMMONS_VERSION}",
|
||||
|
||||
modulecommon : "com.mogo.module:module-common:${MOGO_COMMONS_VERSION}",
|
||||
modulemain : "com.mogo.module:module-main:${MOGO_COMMONS_VERSION}",
|
||||
modulemap : "com.mogo.module:module-map:${MOGO_COMMONS_VERSION}",
|
||||
moduleservice : "com.mogo.module:module-service:${MOGO_COMMONS_VERSION}",
|
||||
mogoservice : "com.mogo.service:mogo-service:${MOGO_COMMONS_VERSION}",
|
||||
mogoserviceapi : "com.mogo.service:mogo-service-api:${MOGO_COMMONS_VERSION}",
|
||||
moduleapps : "com.mogo.module:module-apps:${MOGO_COMMONS_VERSION}",
|
||||
moduleextensions : "com.mogo.module:module-extensions:${MOGO_COMMONS_VERSION}",
|
||||
|
||||
// V2X
|
||||
moduleV2x : "com.mogo.module:module-v2x:${MOGO_COMMONS_VERSION}",
|
||||
modulesearch : "com.mogo.module:module-search:${MOGO_COMMONS_VERSION}",
|
||||
// push
|
||||
modulepush : "com.mogo.module:module-push:${MOGO_COMMONS_VERSION}",
|
||||
modulepushbase : "com.mogo.module:module-push-base:${MOGO_COMMONS_VERSION}",
|
||||
modulepushnoop : "com.mogo.module:module-push-noop:${MOGO_COMMONS_VERSION}",
|
||||
// 左侧面板
|
||||
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_COMMONS_VERSION}",
|
||||
// 左侧面板空实现
|
||||
moduleleftpanelnoop : "com.mogo.module:module-left-panel-noop:${MOGO_COMMONS_VERSION}",
|
||||
// 基础服务实现
|
||||
mogobaseservicesdk : "com.mogo.base:services-sdk:${MOGO_COMMONS_VERSION}",
|
||||
mogowebsocket : "com.mogo.module.carchatting:module-carchatt-socket:${MOGO_COMMONS_VERSION}",
|
||||
mogologlib : "com.mogo.module:module-loglib:${MOGO_COMMONS_VERSION}",
|
||||
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${MOGO_COMMONS_VERSION}",
|
||||
skinsupport : "com.mogo.skin:skin-support:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportimpl : "com.mogo.skin:skin-support-impl:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportnoop : "com.mogo.skin:skin-support-noop:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportlight : "com.mogo.skin:skin-light:${MOGO_COMMONS_VERSION}",
|
||||
crashreport : "com.mogo.test:crashreport:${MOGO_COMMONS_VERSION}",
|
||||
crashreportbugly : "com.mogo.test:crashreport-bugly:${MOGO_COMMONS_VERSION}",
|
||||
crashreportnoop : "com.mogo.test:crashreport-noop:${MOGO_COMMONS_VERSION}",
|
||||
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportbase : "com.mogo.skin:skin-support-base:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportappcompat : "com.mogo.skin:skin-support-appcompat:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportcardview : "com.mogo.skin:skin-support-cardview:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportconstraintlayout : "com.mogo.skin:skin-support-constraint-layout:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportdesign : "com.mogo.skin:skin-support-design:${MOGO_COMMONS_VERSION}",
|
||||
|
||||
```
|
||||
113
app/build.gradle
113
app/build.gradle
@@ -1,4 +1,7 @@
|
||||
import java.text.SimpleDateFormat
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.json.JsonOutput
|
||||
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
@@ -193,7 +196,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "product", "basic", "env"
|
||||
flavorDimensions "business","product", "basic", "env"
|
||||
|
||||
productFlavors {
|
||||
// launcher app
|
||||
@@ -208,18 +211,33 @@ android {
|
||||
buildConfigField 'String', 'MAP_SDK_VERSION', "\"${MAP_SDK_VERSION}\""
|
||||
buildConfigField 'String', 'MAP_SDK_OPT_VERSION', "\"${MAP_SDK_OPERATION_VERSION}\""
|
||||
}
|
||||
busbase {
|
||||
dimension "business"
|
||||
}
|
||||
taxibase {
|
||||
dimension "business"
|
||||
}
|
||||
sweeper {
|
||||
dimension "business"
|
||||
}
|
||||
shuttle{
|
||||
dimension "business"
|
||||
}
|
||||
// 配置网络环境,QA、线上、演示
|
||||
qa {
|
||||
dimension "env"
|
||||
buildConfigField 'int', 'NET_ENV', '2'
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("qa").replace("\"","\\\"")}\""
|
||||
}
|
||||
online {
|
||||
dimension "env"
|
||||
buildConfigField 'int', 'NET_ENV', '3'
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("online").replace("\"","\\\"")}\""
|
||||
}
|
||||
demo {
|
||||
dimension "env"
|
||||
buildConfigField 'int', 'NET_ENV', '4'
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("demo").replace("\"","\\\"")}\""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +248,53 @@ android {
|
||||
apply from: "./productFlavors/fPadLenovoOchBusPassenger.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchTaxiPassenger.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchSweeper.gradle"
|
||||
apply from: "./productFlavors/fMultiDisplayOchBus.gradle"
|
||||
apply from: "./productFlavors/fMultiDisplayOchTaxi.gradle"
|
||||
|
||||
variantFilter { variant ->
|
||||
def names = variant.flavors*.name
|
||||
//要检查特定的构建类型,请使用variant.buildType.name ==“ <buildType>”
|
||||
// region 过滤sweper 的flavors
|
||||
if (names.contains("sweeper")&&!names.contains("fPadLenovoOchSweeper")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
setIgnore(true)
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region 过滤shuttle 的flavors
|
||||
if (names.contains("shuttle")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if(names.contains("fPadLenovoOchBus")){
|
||||
}else if(names.contains("fPadLenovoOchBusPassenger")){
|
||||
}else {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
// endregion
|
||||
// region 过滤taxibase 的flavors
|
||||
if (names.contains("taxibase")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if(names.contains("fPadLenovoOchTaxi")){
|
||||
}else if(names.contains("fPadLenovoOchTaxiPassenger")){
|
||||
}else if(names.contains("fPadLenovo")){
|
||||
}else if(names.contains("fMultiDisplayOchTaxi")){
|
||||
}else {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
// endregion
|
||||
// region 过滤taxibase 的flavors
|
||||
if (names.contains("busbase")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if(names.contains("fPadLenovoOchBus")){
|
||||
}else if(names.contains("fPadLenovoOchBusPassenger")){
|
||||
}else if(names.contains("fMultiDisplayOchBus")){
|
||||
}else {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/io.netty.versions.properties'
|
||||
@@ -263,6 +328,7 @@ dependencies {
|
||||
// releaseImplementation rootProject.ext.dependencies.releaseleakcanary
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.lancetx_runtime
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
|
||||
// // 暂不使用Shizuku-API
|
||||
// implementation rootProject.ext.dependencies.shizuku_provider
|
||||
@@ -272,15 +338,11 @@ dependencies {
|
||||
|
||||
androidTestImplementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
androidTestImplementation rootProject.ext.dependencies.mogo_core_res
|
||||
androidTestImplementation rootProject.ext.dependencies.mogo_core_function_notice
|
||||
} else {
|
||||
implementation project(':tts:tts-pad')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
|
||||
androidTestImplementation project(':core:mogo-core-function-call')
|
||||
androidTestImplementation project(':core:mogo-core-res')
|
||||
androidTestImplementation project(':core:function-impl:mogo-core-function-notice')
|
||||
|
||||
}
|
||||
|
||||
apply from: "./functions/och.gradle"
|
||||
@@ -396,3 +458,44 @@ boolean isReleaseBuild() {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Object readFileToJson(env){
|
||||
try {
|
||||
def businessType = project.hasProperty('business')
|
||||
if(businessType){
|
||||
println("businessType:${businessType}----${business}")
|
||||
}
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/config.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
def flavorNames = variantName()
|
||||
def jsonOutput = new JsonOutput()
|
||||
config.each {key, value ->
|
||||
// 匹配flavor对应的 json
|
||||
if(flavorNames.toLowerCase().contains(key)){
|
||||
return jsonOutput.toJson(value.get(env))
|
||||
}
|
||||
}
|
||||
// 保底原则
|
||||
return jsonOutput.toJson(config.get("busbase").get(env))
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
def variantName() {
|
||||
def taskName = getGradle().getStartParameter().getTaskRequests().toString()
|
||||
def split = taskName.split(":")
|
||||
if (split.length > 2){
|
||||
return split[2].toString().split("]")[0].replace("assemble","")
|
||||
}else {
|
||||
if(taskName.contains("bus")) {
|
||||
return "busbase"
|
||||
}else {
|
||||
return "taxibase"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
46
app/config.json
Normal file
46
app/config.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"busbase": {
|
||||
"qa": {
|
||||
"och_url":"https://tech-qa.zhidaohulian.com"
|
||||
},
|
||||
"online": {
|
||||
"och_url":"https://tech.zhidaohulian.com"
|
||||
},
|
||||
"demo": {
|
||||
"och_url":"http://tech-dev.zhidaohulian.com"
|
||||
}
|
||||
},
|
||||
"taxibase": {
|
||||
"qa": {
|
||||
"och_url":"https://tech-qa.zhidaohulian.com"
|
||||
},
|
||||
"online": {
|
||||
"och_url":"https://tech.zhidaohulian.com"
|
||||
},
|
||||
"demo": {
|
||||
"och_url":"http://tech-dev.zhidaohulian.com"
|
||||
}
|
||||
},
|
||||
"shuttle": {
|
||||
"qa": {
|
||||
"och_url":"https://och-driver-qa.zhidaozhixing.com"
|
||||
},
|
||||
"online": {
|
||||
"och_url":"https://och-driver.zhidaozhixing.com"
|
||||
},
|
||||
"demo": {
|
||||
"och_url":"http://och-driver-dev.zhidaozhixing.com"
|
||||
}
|
||||
},
|
||||
"sweeper": {
|
||||
"qa": {
|
||||
"och_url":"https://och-driver-qa.zhidaozhixing.com"
|
||||
},
|
||||
"online": {
|
||||
"och_url":"https://och-driver.zhidaozhixing.com"
|
||||
},
|
||||
"demo": {
|
||||
"och_url":"http://och-driver-dev.zhidaozhixing.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,108 +1,53 @@
|
||||
// 网约车服务:仅小巴车、出租车渠道用
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
fPadLenovoImplementation(rootProject.ext.dependencies.mogoochnoop) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
|
||||
fPadLenovoImplementation(rootProject.ext.dependencies.mogoochnoop)
|
||||
// sweeper清扫车
|
||||
fPadLenovoOchSweeperImplementation(rootProject.ext.dependencies.mogoochsweeper) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchSweeperImplementation(rootProject.ext.dependencies.mogoochsweeper)
|
||||
|
||||
// Bus司机端
|
||||
fPadLenovoOchBusImplementation(rootProject.ext.dependencies.mogoochbus) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
|
||||
fPadLenovoOchBusImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
// Bus乘客端
|
||||
fPadLenovoOchBusPassengerImplementation(rootProject.ext.dependencies.mogoochbus) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchBusPassengerImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
|
||||
// taxi司机端
|
||||
fPadLenovoOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
|
||||
fPadLenovoOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi)
|
||||
// taxi乘客端
|
||||
fPadLenovoOchTaxiPassengerImplementation(rootProject.ext.dependencies.mogoochtaxi) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchTaxiPassengerImplementation(rootProject.ext.dependencies.mogoochtaxi)
|
||||
|
||||
// Bus司机端
|
||||
fMultiDisplayOchBusImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
// Bus乘客端
|
||||
fMultiDisplayOchBusImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
|
||||
// taxi司机端
|
||||
fMultiDisplayOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi)
|
||||
// taxi乘客端
|
||||
fMultiDisplayOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi)
|
||||
} else {
|
||||
fPadLenovoImplementation (project(':OCH:mogo-och-noop')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoImplementation (project(':OCH:mogo-och-noop'))
|
||||
// sweeper 清扫车
|
||||
fPadLenovoOchSweeperImplementation (project(':OCH:mogo-och-sweeper')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchSweeperImplementation (project(':OCH:mogo-och-sweeper'))
|
||||
|
||||
// Bus司机端
|
||||
fPadLenovoOchBusImplementation (project(':OCH:mogo-och-bus')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
|
||||
fPadLenovoOchBusImplementation (project(':OCH:mogo-och-bus'))
|
||||
// Bus乘客端
|
||||
fPadLenovoOchBusPassengerImplementation (project(':OCH:mogo-och-bus-passenger')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchBusPassengerImplementation (project(':OCH:mogo-och-bus-passenger'))
|
||||
|
||||
// taxi司机端
|
||||
fPadLenovoOchTaxiImplementation (project(':OCH:mogo-och-taxi')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
|
||||
fPadLenovoOchTaxiImplementation (project(':OCH:mogo-och-taxi'))
|
||||
// taxi乘客端
|
||||
fPadLenovoOchTaxiPassengerImplementation (project(':OCH:mogo-och-taxi-passenger')) {
|
||||
exclude group: 'com.mogo.commons' //by group
|
||||
exclude group: 'com.mogo.module' //by group
|
||||
exclude group: 'com.mogo.map' //by group
|
||||
exclude group: 'com.mogo.eagle.core' //by group
|
||||
exclude group: 'com.mogo.eagle.core.function' //by group
|
||||
}
|
||||
fPadLenovoOchTaxiPassengerImplementation (project(':OCH:mogo-och-taxi-passenger'))
|
||||
|
||||
// Bus司机端
|
||||
fMultiDisplayOchBusImplementation (project(':OCH:mogo-och-bus'))
|
||||
// Bus乘客端
|
||||
fMultiDisplayOchBusImplementation (project(':OCH:mogo-och-bus-passenger'))
|
||||
|
||||
// taxi司机端
|
||||
fMultiDisplayOchTaxiImplementation (project(':OCH:mogo-och-taxi'))
|
||||
// taxi乘客端
|
||||
fMultiDisplayOchTaxiImplementation (project(':OCH:mogo-och-taxi-passenger'))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
23
app/productFlavors/README.md
Normal file
23
app/productFlavors/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
APP_IDENTITY_MODE规则:
|
||||
业务线
|
||||
Taxi 出租车
|
||||
Bus 小巴
|
||||
Sweeper 清扫车
|
||||
角色
|
||||
Driver 司机屏
|
||||
Passenger 乘客屏
|
||||
车型
|
||||
Base base(东风、红旗、金旅)
|
||||
M1 m1
|
||||
M2 m2
|
||||
Van 开沃
|
||||
FT 福田
|
||||
已有:
|
||||
taxi司机屏 Taxi_Driver_Base (东风、红旗司机端)
|
||||
taxi乘客屏 Taxi_Passenger_Base (东风、红旗乘客端)
|
||||
bus司机屏 Bus_Driver_Base (金旅小巴司机端)
|
||||
Bus_Driver_Van (开沃小巴司机端)
|
||||
bus乘客屏 Bus_Passenger_Base (金旅、开沃小巴乘客端)
|
||||
Bus_Passenger_M1 (M1小巴乘客端)
|
||||
Bus_Passenger_M2 (M2小巴乘客端)
|
||||
清扫车 Sweeper_Driver_FT (福田清扫车司机端)
|
||||
@@ -1,37 +0,0 @@
|
||||
project.android.productFlavors {
|
||||
// f系列-分体机全系列,未细分
|
||||
f8xx {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f8xx",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00"
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +1,39 @@
|
||||
project.android.productFlavors {
|
||||
// f系列-网约车-小巴车
|
||||
fochbus {
|
||||
// 支持多个屏幕异显示的终端,即一个终端包含司机端、乘客端
|
||||
fMultiDisplayOchBus {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochbus",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBus",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Bus_Driver_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +1,39 @@
|
||||
project.android.productFlavors {
|
||||
// f系列-网约车-出租车
|
||||
fochtaxi {
|
||||
// 支持多个屏幕异显示的终端,即一个终端包含司机端、乘客端
|
||||
fMultiDisplayOchTaxi {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochtaxi",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Taxi_Driver_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -18,19 +18,19 @@ project.android.productFlavors {
|
||||
// 高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovo",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Taxi_Driver_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.104\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -20,19 +20,19 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBus",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,出租车0|小巴A-司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0xA0"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Bus_Driver_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -18,19 +18,19 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBusPassenger",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,出租车0|小巴A-司机0|乘客1
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0xA1"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Bus_Passenger_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -20,19 +20,19 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchSweeper",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,出租车0|小巴A|清扫车B-司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0xB0"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Sweeper_Driver_FT\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -21,20 +21,20 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,出租车0|小巴A-司机|乘客
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Taxi_Driver_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ project.android.productFlavors {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
@@ -20,20 +20,20 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxiPassenger",ACTIVITY_ROOT:false]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,出租车0|小巴A-司机0|乘客1
|
||||
buildConfigField 'int', 'APP_IDENTITY_MODE', "0x01"
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Taxi_Passenger_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,15 @@
|
||||
// 将 install 和 assemble 任务按功能分组
|
||||
afterEvaluate {
|
||||
|
||||
def launcher = [ "fPadLenovo","fPadLenovoOchSweeper", "fPadLenovoOchTaxi", "fPadLenovoOchBus", "fPadLenovoOchBusPassenger", "fPadLenovoOchTaxiPassenger"]
|
||||
def launcher = [
|
||||
"fPadLenovo",
|
||||
"fPadLenovoOchSweeper",
|
||||
"fPadLenovoOchTaxi",
|
||||
"fPadLenovoOchBus",
|
||||
"fPadLenovoOchBusPassenger",
|
||||
"fPadLenovoOchTaxiPassenger",
|
||||
"MultiDisplayOchBus",
|
||||
"MultiDisplayOchTaxi"]
|
||||
|
||||
it.getTasks().iterator().forEachRemaining {
|
||||
def task = it
|
||||
|
||||
@@ -25,17 +25,17 @@
|
||||
android:name="design_height_in_dp"
|
||||
android:value="3200"/>
|
||||
|
||||
<provider
|
||||
android:name="com.rousetime.android_startup.provider.StartupProvider"
|
||||
android:authorities="${applicationId}.android_startup"
|
||||
android:exported="false" >
|
||||
<meta-data
|
||||
android:name="com.mogo.launcher.stageone.HttpDnsStartUp"
|
||||
android:value="android.startup" />
|
||||
<meta-data
|
||||
android:name="com.mogo.launcher.stageone.MogoStartupProviderConfig"
|
||||
android:value="android.startup.provider.config" />
|
||||
</provider>
|
||||
<!-- <provider-->
|
||||
<!-- android:name="com.rousetime.android_startup.provider.StartupProvider"-->
|
||||
<!-- android:authorities="${applicationId}.android_startup"-->
|
||||
<!-- android:exported="false" >-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.mogo.launcher.stageone.HttpDnsStartUp"-->
|
||||
<!-- android:value="android.startup" />-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.mogo.launcher.stageone.MogoStartupProviderConfig"-->
|
||||
<!-- android:value="android.startup.provider.config" />-->
|
||||
<!-- </provider>-->
|
||||
|
||||
<!-- <!– 暂不使用Shizuku-API –>-->
|
||||
<!-- <provider-->
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.launcher.crash.CrashSystem;
|
||||
import com.mogo.launcher.stageone.APMStartup;
|
||||
import com.mogo.launcher.stageone.ARouterStartUp;
|
||||
import com.mogo.launcher.stageone.ConfigStartUp;
|
||||
import com.mogo.launcher.stageone.HttpDnsStartUp;
|
||||
import com.rousetime.android_startup.StartupListener;
|
||||
import com.rousetime.android_startup.StartupManager;
|
||||
import com.rousetime.android_startup.model.LoggerLevel;
|
||||
import com.rousetime.android_startup.model.StartupConfig;
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.MapParams;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -17,6 +31,45 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
*/
|
||||
public class MogoApplication extends MainMoGoApplication {
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
startUpInStage1();
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
private final StartupListener startupListener = (l, costTimesModels) -> EventBus.getDefault().postSticky(costTimesModels);
|
||||
|
||||
/**
|
||||
* 第一阶段初始化
|
||||
*/
|
||||
public void startUpInStage1() {
|
||||
StartupConfig config = null;
|
||||
if (DebugConfig.isDebug()) {
|
||||
config = new StartupConfig.Builder()
|
||||
.setLoggerLevel(LoggerLevel.DEBUG)
|
||||
.setOpenStatistics(true)
|
||||
.setListener(startupListener)
|
||||
.build();
|
||||
} else {
|
||||
config = new StartupConfig.Builder()
|
||||
.setLoggerLevel(LoggerLevel.NONE)
|
||||
.setOpenStatistics(false)
|
||||
.setAwaitTimeout(10000L)
|
||||
.setListener(startupListener)
|
||||
.build();
|
||||
}
|
||||
new StartupManager.Builder()
|
||||
.addStartup(new HttpDnsStartUp())
|
||||
.addStartup(new APMStartup())
|
||||
.addStartup(new ConfigStartUp())
|
||||
.addStartup(new ARouterStartUp())
|
||||
.setConfig(config)
|
||||
.build(this)
|
||||
.start()
|
||||
.await();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
|
||||
@@ -8,8 +8,6 @@ import com.mogo.test.crashreport.CrashReportConstants
|
||||
|
||||
class APMStartup : AndroidStartup<Boolean?>() {
|
||||
override fun create(context: Context): Boolean? {
|
||||
// bugly
|
||||
ARouter.getInstance().build(UpgradeReportConstants.PATH).navigation()
|
||||
// apm
|
||||
ARouter.getInstance().build(CrashReportConstants.PATH).navigation()
|
||||
return true
|
||||
@@ -24,6 +22,6 @@ class APMStartup : AndroidStartup<Boolean?>() {
|
||||
}
|
||||
|
||||
override fun dependenciesByName(): List<String> {
|
||||
return listOf("com.mogo.launcher.stageone.ARouterStartUp")
|
||||
return listOf("com.mogo.launcher.stageone.ARouterStartUp", "com.mogo.launcher.stageone.ConfigStartUp")
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.launcher.stageone
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo.appBuildTime
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo.workingBranchHash
|
||||
@@ -8,11 +9,18 @@ import com.mogo.eagle.core.data.app.AppConfigInfo.workingBranchName
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.net.UrlConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||
import com.mogo.launcher.BuildConfig
|
||||
import com.mogo.launcher.R
|
||||
import com.mogo.test.crashreport.CrashReportConstants
|
||||
import com.rousetime.android_startup.AndroidStartup
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.MapParams
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
|
||||
class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
@@ -37,8 +45,27 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
// FunctionBuildConfig.gpsProvider = 2
|
||||
// 演示模式,上一次勾选的数据
|
||||
FunctionBuildConfig.isDemoMode = BuildConfig.IS_DEMO_MODE
|
||||
// app安装的身份信息
|
||||
// // app安装的身份信息
|
||||
FunctionBuildConfig.appIdentityMode = BuildConfig.APP_IDENTITY_MODE
|
||||
// 各个module需要的url
|
||||
FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java)
|
||||
|
||||
Log.d("ConfigStartUp", "ProcessUtils.getCurrentProcessName():" + ProcessUtils.getCurrentProcessName())
|
||||
|
||||
// // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频
|
||||
// if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
// if (AppIdentityModeUtils.isBus(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
// FunctionBuildConfig.appIdentityMode = 0xA1
|
||||
// } else if (AppIdentityModeUtils.isTaxi(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
// FunctionBuildConfig.appIdentityMode = 0x01
|
||||
// }
|
||||
// } else {
|
||||
// if (AppIdentityModeUtils.isBus(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
// FunctionBuildConfig.appIdentityMode = 0xA0
|
||||
// } else if (AppIdentityModeUtils.isTaxi(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
// FunctionBuildConfig.appIdentityMode = 0x00
|
||||
// }
|
||||
// }
|
||||
// 不同身份对应不同的IP地址
|
||||
FunctionBuildConfig.adasConnectIP = BuildConfig.ADAS_CONNECT_IP
|
||||
}
|
||||
@@ -58,16 +85,17 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
DebugConfig.setMapVersion(BuildConfig.MAP_SDK_VERSION)
|
||||
DebugConfig.setMapOptVersion(BuildConfig.MAP_SDK_OPT_VERSION)
|
||||
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME)
|
||||
DebugConfig.setMultiDisplay(BuildConfig.IS_MULTI_DISPLAY)
|
||||
|
||||
}
|
||||
|
||||
private fun initOtherConfig(context: Context) {
|
||||
// 配置BuglyAppID:MoGoEagleEye
|
||||
CrashReportConstants.buglyAppID = "ac71228f85"
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchTaxi" || DebugConfig.getProductFlavor() == "fPadLenovoOchBus"
|
||||
|| DebugConfig.getProductFlavor() == "fPadLenovoOchTaxiPassenger"
|
||||
|| DebugConfig.getProductFlavor() == "fPadLenovoOchBusPassenger"
|
||||
|| DebugConfig.getProductFlavor() == "fPadLenovoOchSweeper") {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) ||
|
||||
AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)||
|
||||
AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
//控制HMI展示元素 将不用手动调用setXXXXXViewVisibility
|
||||
HmiBuildConfig.isShowSpeedView = false
|
||||
HmiBuildConfig.isShowAutopilotStatusView = false
|
||||
@@ -77,33 +105,72 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
HmiBuildConfig.isShowUpgradeTipsView = false
|
||||
}
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchTaxi" || DebugConfig.getProductFlavor() == "fPadLenovoOchTaxiPassenger") {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
} else if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" || DebugConfig.getProductFlavor() == "fPadLenovoOchBusPassenger") {
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
// HmiBuildConfig.isShowBrakeLightView = false
|
||||
// HmiBuildConfig.isShowTurnLightView = false
|
||||
} else if (DebugConfig.getProductFlavor() == "fPadLenovoOchSweeper") {
|
||||
} else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
|
||||
}
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchTaxiPassenger") {
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
//是否显示 限速UI
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
//是否显示 路侧监控
|
||||
HmiBuildConfig.isShowCameraView = false
|
||||
} else if (DebugConfig.getProductFlavor() == "fPadLenovoOchBusPassenger") {
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
//是否显示 限速UI
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
//是否显示 路侧监控
|
||||
HmiBuildConfig.isShowCameraView = false
|
||||
//白天模式
|
||||
FunctionBuildConfig.skinMode = 1
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
//是否显示 限速UI
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
//是否显示 路侧监控
|
||||
HmiBuildConfig.isShowCameraView = false
|
||||
//白天模式
|
||||
FunctionBuildConfig.skinMode = 1
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
//是否显示 限速UI
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
//是否显示 路侧监控
|
||||
HmiBuildConfig.isShowCameraView = false
|
||||
}
|
||||
}
|
||||
|
||||
val mapParams = MapParams.init()
|
||||
mapParams.setDebugMode(false) //todo 1-使用本地地图数据,0-使用在线地图数据
|
||||
//.setDataFileSource(1)
|
||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_UP_CAR)
|
||||
.setHDVisibileArray(intArrayOf(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部分遮挡
|
||||
//.setPointToCenter(0.5f, 0.5f)
|
||||
// 根据 FunctionBuildConfig 配置的皮肤样式设置题图的样式
|
||||
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
mapParams.setStyleMode(MapParams.MAP_STYLE_DAY_VR)
|
||||
} else {
|
||||
mapParams.setStyleMode(MapParams.MAP_STYLE_NIGHT_VR)
|
||||
}
|
||||
//todo 临时放在这 @梁利辉
|
||||
if (AppIdentityModeUtils.isBusPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
mapParams.setShadowEnable(false)
|
||||
}
|
||||
|
||||
MapAutoApi.init(context, mapParams)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,10 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -39,7 +41,6 @@ import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadPoolService
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.map.location.GDLocationClient
|
||||
import com.rousetime.android_startup.AndroidStartup
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
@@ -69,22 +70,22 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
override fun dependenciesByName(): List<String> {
|
||||
return listOf(
|
||||
"com.mogo.launcher.stageone.APMStartup",
|
||||
"com.mogo.launcher.stageone.ConfigStartUp"
|
||||
"com.mogo.launcher.stageone.APMStartup"
|
||||
)
|
||||
}
|
||||
|
||||
override fun create(context: Context): Boolean {
|
||||
this.context = context
|
||||
if (ProcessUtils.isMainProcess(context)) {
|
||||
initGDLoc()
|
||||
initHttpDns()
|
||||
}
|
||||
// TODO 需要与,陈扶风,确认为啥要限制仅在主进程
|
||||
// if (ProcessUtils.isMainProcess(context)) {
|
||||
initGDLoc()
|
||||
initHttpDns()
|
||||
// }
|
||||
return true
|
||||
}
|
||||
|
||||
private fun initGDLoc() {
|
||||
GDLocationClient.getInstance(context).start()
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.start()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,7 +130,12 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 设置AI云平台分配给三方应用的签名密钥,需要从AI云平台申请
|
||||
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
|
||||
// TODO 现在这块逻辑因为网约车业务那后台的限制,还没有更换,条件成熟后替换为 DeviceIdUtils.getWidevineIDWithMd5(context)
|
||||
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
|
||||
// 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端
|
||||
if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
clientConfig.thirdPartyDeviceId = Utils.getDevicesId() + "_passenger"
|
||||
} else {
|
||||
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
|
||||
}
|
||||
// 设置循环检测间隔时间(每隔2小时loop一次httpDnsConfig)
|
||||
clientConfig.loopCheckDelay = (60 * 60 * 2 * 1000).toLong()
|
||||
//设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作
|
||||
@@ -142,19 +148,18 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
return HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
|
||||
}
|
||||
var mogoLocation: MogoLocation? = null
|
||||
val locationClient =
|
||||
CallerMapUIServiceManager.getSingletonLocationClient(AbsMogoApplication.getApp())
|
||||
val locationClient = CallerMapLocationListenerManager.getCurrentLocation()
|
||||
if (locationClient != null) {
|
||||
mogoLocation = locationClient.lastKnowLocation
|
||||
mogoLocation = locationClient
|
||||
}
|
||||
val httpDnsSimpleLocation =
|
||||
if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0) {
|
||||
if (mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance(
|
||||
context
|
||||
).lastCityCode.isNullOrEmpty()
|
||||
if (mogoLocation.cityCode.isNullOrEmpty()
|
||||
&& !CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode.isNullOrEmpty()
|
||||
) {
|
||||
HttpDnsSimpleLocation(
|
||||
GDLocationClient.getInstance(context).lastCityCode,
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode
|
||||
?: "010",
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
)
|
||||
@@ -212,7 +217,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 异步初始化NetConfig
|
||||
asyncInit()
|
||||
// HttpDns ttl回调 --- socketTTL
|
||||
registerSocketHttpDnsTTL(HostConst.SOCKET_CENTER_DOMAIN)
|
||||
registerSocketHttpDnsTTL()
|
||||
// 开启每5s/次定位上报
|
||||
uploadLocPerFiveSecond()
|
||||
gotToken = true
|
||||
@@ -236,17 +241,14 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
ThreadPoolService.execute {
|
||||
//初始化网络配置
|
||||
NetConfigUtils.init()
|
||||
|
||||
// 初始化埋点
|
||||
AnalyticsManager.init(context, DebugConfig.isDebug())
|
||||
|
||||
// 加入启动统计
|
||||
val mStartParams: HashMap<String, Any> = HashMap()
|
||||
mStartParams["start_time"] = TimeUtils.getNowMills()
|
||||
mStartParams["app_version"] = AppUtils.getAppVersionName()
|
||||
mStartParams["app_flavor"] = DebugConfig.getProductFlavor();
|
||||
mStartParams["app_identity_mode"] = FunctionBuildConfig.appIdentityMode
|
||||
|
||||
AnalyticsManager.track("app_start_time", mStartParams)
|
||||
}
|
||||
}
|
||||
@@ -254,7 +256,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
/**
|
||||
* 请求获取最新的 DNS 微服务 域名信息
|
||||
*/
|
||||
private fun registerSocketHttpDnsTTL(host: String?) {
|
||||
private fun registerSocketHttpDnsTTL() {
|
||||
mogoHttpDns.addressChangedListener(object : OnAddressChangedListener {
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
@@ -266,7 +268,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
override fun onAddressChanged(cityCode: String, address: Map<String, String>?) {
|
||||
val dnsCacheIp = mogoHttpDns.getCachedHttpDnsIps(
|
||||
host,
|
||||
HostConst.SOCKET_CENTER_DOMAIN,
|
||||
HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_HTTP
|
||||
) ?: return
|
||||
if (dnsCacheIp != cacheIp) {
|
||||
@@ -289,19 +291,25 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
context?.let {
|
||||
MogoLocationInfoServices.getInstance().init(it)
|
||||
MogoLocationInfoServices.getInstance().start()
|
||||
val locationClient = CallerMapUIServiceManager.getSingletonLocationClient(it)
|
||||
locationClient?.addLocationListener { location: MogoLocation? ->
|
||||
MogoLocationInfoServices.getInstance().provideLocation(location)
|
||||
}
|
||||
CallerMapLocationListenerManager.addListener(
|
||||
TAG,
|
||||
object : IMoGoMapLocationListener {
|
||||
override fun onLocationChanged(
|
||||
location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location?.let {
|
||||
MogoLocationInfoServices.getInstance().provideLocation(it)
|
||||
}
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startSocketService() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "startSocketService")
|
||||
val location =
|
||||
CallerMapUIServiceManager.getSingletonLocationClient(AbsMogoApplication.getApp())!!
|
||||
.lastKnowLocation
|
||||
val location = CallerMapLocationListenerManager.getCurrentLocation()
|
||||
// 关闭长链服务
|
||||
MogoAiCloudSocketManager.getInstance(context).destroy()
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
@@ -362,8 +370,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
})
|
||||
// 开启Socket长链服务
|
||||
val lat = location.latitude
|
||||
val lon = location.longitude
|
||||
val lat =
|
||||
location?.latitude ?: CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLat
|
||||
val lon = location?.longitude
|
||||
?: CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLon
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
.init(context, DebugConfig.getSocketAppId(), lat, lon)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "com.zhidao.adas.client"
|
||||
minSdkVersion 21
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion 25
|
||||
multiDexEnabled true
|
||||
versionCode 1
|
||||
@@ -87,7 +87,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':libraries:mogo-adas-data')
|
||||
implementation project(':libraries:mogo-adas-other')
|
||||
// implementation 'com.zhidao.support.adas:high:2.8.0.0'
|
||||
// implementation 'com.zhjt.mogo.adas.data:adas-data:2.6.6.0'
|
||||
// compileOnly project(':core:mogo-core-data')
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,2 +0,0 @@
|
||||
#### 说明
|
||||
# ADAS 连接状态 LIB
|
||||
@@ -1,106 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'maven'
|
||||
}
|
||||
//ext {
|
||||
// //自动驾驶产品版本号
|
||||
// AP_VERSION = "2.6.0"
|
||||
//}
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
// versionCode Integer.valueOf(VERSION_CODE)
|
||||
// versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
//
|
||||
// buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\""
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs.srcDirs = ['libs']
|
||||
// java {
|
||||
// srcDir 'src/main/java'
|
||||
// }
|
||||
//
|
||||
// proto {
|
||||
// srcDir 'src/main/proto'
|
||||
// include '**/*.proto'
|
||||
// }
|
||||
}
|
||||
}
|
||||
//
|
||||
// protobuf {
|
||||
// protoc {
|
||||
// artifact = 'com.google.protobuf:protoc:3.6.1'
|
||||
// }
|
||||
//
|
||||
// generateProtoTasks {
|
||||
// all().each { task ->
|
||||
// task.builtins {
|
||||
// remove java
|
||||
// }
|
||||
// task.builtins {
|
||||
// java {}
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
}
|
||||
//配置需要上传到maven仓库的文件
|
||||
artifacts {
|
||||
archives androidSourcesJar
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
repository(url: RELEASE_REPOSITORY_URL) {
|
||||
authentication(userName: USERNAME, password: PASSWORD)
|
||||
}
|
||||
snapshotRepository(url: SNAPSHOT_REPOSITORY_URL) {
|
||||
authentication(userName: USERNAME, password: PASSWORD)
|
||||
}
|
||||
pom.groupId = ADAS_LIB_GROUP
|
||||
pom.artifactId = ADAS_LIB_POM_ARTIFACT_ID
|
||||
pom.version = versionName + ADAS_LIB_CHILD_VERSION
|
||||
pom.whenConfigured { pom ->
|
||||
pom.dependencies.forEach { dep ->
|
||||
if (dep.getVersion() == "unspecified") {
|
||||
println("--修改pom.xml中的dependies模块--->>" + dep.getArtifactId())
|
||||
if (dep.getArtifactId() == ADAS_DATA_LIB_POM_ARTIFACT_ID) {
|
||||
dep.setGroupId(ADAS_DATA_LIB_GROUP)
|
||||
dep.setVersion(versionName + ADAS_DATA_LIB_CHILD_VERSION)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.adas
|
||||
POM_ARTIFACT_ID=mogo-adas
|
||||
VERSION_CODE=1
|
||||
@@ -1,26 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoMap-----
|
||||
-keep class com.mogo.map.MogoNavi{
|
||||
private <init>();
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.zhidao.support.adas.connect.status" >
|
||||
</manifest>
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.zhidao.support.adas.high.common.ConnectStatusTask;
|
||||
import com.zhidao.support.adas.high.widget.ConnectStatusFloatWindow;
|
||||
|
||||
/**
|
||||
* @ProjectName: lib-adas-fpga
|
||||
* @Package: com.zhidao.lib.adas.high
|
||||
* @ClassName: AdasManager
|
||||
* @Description: java类作用描述
|
||||
* @Author: fenghl
|
||||
* @CreateDate: 2020/2/7 13:13
|
||||
* @UpdateUser: 更新者:
|
||||
* @UpdateDate: 2020/2/7 13:13
|
||||
* @UpdateRemark: 更新说明:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public class AdasConnectStatusManager {
|
||||
private static volatile AdasConnectStatusManager ourInstance;
|
||||
|
||||
private ConnectStatusFloatWindow floatWindow;
|
||||
|
||||
public static AdasConnectStatusManager getInstance() {
|
||||
if (ourInstance == null) {
|
||||
synchronized (AdasConnectStatusManager.class) {
|
||||
if (ourInstance == null) {
|
||||
ourInstance = new AdasConnectStatusManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
private AdasConnectStatusManager() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 展示连接历史
|
||||
*
|
||||
* @param activity
|
||||
*/
|
||||
public void showConnectStatusFloatWindow(Activity activity) {
|
||||
if (floatWindow == null) {
|
||||
floatWindow = new ConnectStatusFloatWindow(activity, ConnectStatusTask.getInstance().getList(), new ConnectStatusFloatWindow.OnConnectStatusFloatWindowListener() {
|
||||
@Override
|
||||
public void onClose() {
|
||||
closeConnectStatusFloatWindow();
|
||||
}
|
||||
});
|
||||
floatWindow.showFloatWindow();
|
||||
} else {
|
||||
closeConnectStatusFloatWindow();
|
||||
}
|
||||
}
|
||||
|
||||
private void closeConnectStatusFloatWindow() {
|
||||
floatWindow.hideFloatWindow();
|
||||
floatWindow = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
|
||||
public class IPCConnectState {
|
||||
public final String status;
|
||||
@ColorRes
|
||||
public final int color;
|
||||
|
||||
public IPCConnectState(String status, @ColorRes int color) {
|
||||
this.status = status;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,382 +0,0 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.IPCConnectState;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.LineNumberReader;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
* 连接状态存储任务
|
||||
*/
|
||||
public class ConnectStatusTask {
|
||||
private static final String TAG = ConnectStatusTask.class.getSimpleName();
|
||||
public static final String ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "mogo" + File.separator + "adas" + File.separator;//程序外部存储跟目录
|
||||
private static final String LOG_FILE_NAME = "ipc_connect_status.log";//文件名称
|
||||
private volatile static ConnectStatusTask INSTANCE;
|
||||
private static final int MAX_LINES = 1000;//最大存储行数
|
||||
private static final int DEL_LINES = 500;//超过最大存储行数删除的行数
|
||||
private static final int EVERY_TIME_READ_LINES = 200;//每次读取最大行数
|
||||
private LinkedBlockingQueue<String> queue;
|
||||
private BufferedWriter buff = null;
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
|
||||
private File file;
|
||||
//是否写入本地
|
||||
private final AtomicBoolean isSave = new AtomicBoolean(false);
|
||||
private Future future;
|
||||
private final AtomicBoolean isInitRead = new AtomicBoolean(false);//是否已经读取过本地文件
|
||||
private final List<OnReadListener> onReadListeners = new ArrayList<>();
|
||||
private final List<IPCConnectState> listLog = new ArrayList<>();
|
||||
|
||||
private ConnectStatusTask() {
|
||||
queue = new LinkedBlockingQueue<>();
|
||||
init(false);
|
||||
ThreadPoolManager.getsInstance().submit(new ReadThread());
|
||||
}
|
||||
|
||||
public static ConnectStatusTask getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (ConnectStatusTask.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new ConnectStatusTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public List<IPCConnectState> getList() {
|
||||
return listLog;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
init(true);
|
||||
listLog.clear();
|
||||
if (onReadListeners.size() != 0) {
|
||||
for (int i = 0; i < onReadListeners.size(); i++) {
|
||||
onReadListeners.get(i).onRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setIsLogSwitch(boolean isLogSwitch) {
|
||||
this.isLogSwitch = isLogSwitch;
|
||||
}
|
||||
|
||||
public boolean isLogSwitch() {
|
||||
return isLogSwitch;
|
||||
}
|
||||
|
||||
|
||||
public boolean isSdcardUse() {
|
||||
boolean bl = false;
|
||||
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
|
||||
bl = true;
|
||||
}
|
||||
return bl;
|
||||
}
|
||||
|
||||
private void init(boolean isClear) {
|
||||
if (isSdcardUse()) {
|
||||
try {
|
||||
file = new File(ROOT_PATH + LOG_FILE_NAME);
|
||||
if (isClear && file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
if (!file.exists()) {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
file.createNewFile();
|
||||
}
|
||||
FileWriter fw = new FileWriter(file, true);
|
||||
buff = new BufferedWriter(fw);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
start();
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (future == null) {
|
||||
future = ThreadPoolManager.getsInstance().submit(new WriteThread());
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
queue.clear();
|
||||
if (future != null && !future.isCancelled()) {
|
||||
future.cancel(true);
|
||||
}
|
||||
future = null;
|
||||
closeBufferedWriter();
|
||||
}
|
||||
|
||||
private void closeBufferedWriter() {
|
||||
if (buff != null) {
|
||||
try {
|
||||
buff.flush();
|
||||
buff.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
buff = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(String status) {
|
||||
if (isLogSwitch) {
|
||||
String time = sdf.format(new Date(System.currentTimeMillis()));
|
||||
queue.add(time + "##" + status);
|
||||
}
|
||||
}
|
||||
|
||||
private int getStatusColor(String connectStatus) {
|
||||
if (connectStatus.contains("已连接")) {
|
||||
return R.color.connect_status_connected;
|
||||
} else if (connectStatus.contains("连接中") || connectStatus.contains("重连中")) {
|
||||
return R.color.connect_status_connecting;
|
||||
} else if (connectStatus.contains("正在搜索IP")) {
|
||||
return R.color.connect_status_search_address;
|
||||
} else if (connectStatus.contains("地址不可用或不合法")) {
|
||||
return R.color.connect_status_disconnecting;
|
||||
} else {
|
||||
return R.color.connect_status_disconnected;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private synchronized void addList(String status) {
|
||||
listLog.add(0, onParse(status));
|
||||
if (onReadListeners.size() != 0) {
|
||||
for (OnReadListener listener : onReadListeners) {
|
||||
listener.onRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IPCConnectState onParse(String status) {
|
||||
status = status.replace("##", "\n");
|
||||
return new IPCConnectState(status, getStatusColor(status));
|
||||
}
|
||||
|
||||
//写入
|
||||
public class WriteThread implements Runnable {
|
||||
int lineNum = -1;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// L.i(TAG, "是否是主线程=" + Utils.isMainThread());
|
||||
if (lineNum == -1) {
|
||||
lineNum = lineNumber();
|
||||
}
|
||||
CupidLogUtils.i(TAG, "初始化获得的行数=" + lineNum);
|
||||
synchronized (this) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
try {
|
||||
String data = queue.take();
|
||||
data = data == null ? "主动断开连接" : data;
|
||||
// addList(data, true);
|
||||
// L.i(TAG, "写入Log---" + data);
|
||||
if (buff != null && !TextUtils.isEmpty(data)) {
|
||||
buff.write(data);
|
||||
buff.newLine();
|
||||
buff.flush();
|
||||
lineNum++;
|
||||
if (lineNum == MAX_LINES + 1 + DEL_LINES) {
|
||||
List<String> delLines = readAndRemoveFirstLines();
|
||||
for (String str : delLines) {
|
||||
CupidLogUtils.i(TAG, "被删除的数据=" + str);
|
||||
}
|
||||
lineNum = lineNum - DEL_LINES;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<String> readAndRemoveFirstLines() {
|
||||
List<String> strList = new ArrayList<>();
|
||||
RandomAccessFile raf = null;
|
||||
try {
|
||||
raf = new RandomAccessFile(file, "rw");
|
||||
//Initial write position
|
||||
long writePosition = raf.getFilePointer();
|
||||
for (int i = 0; i < DEL_LINES; i++) {
|
||||
String line = raf.readLine();
|
||||
if (line == null) {
|
||||
break;
|
||||
}
|
||||
strList.add(new String(line.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8));
|
||||
}
|
||||
// Shift the next lines upwards.
|
||||
long readPosition = raf.getFilePointer();
|
||||
|
||||
byte[] buff = new byte[1024];
|
||||
int n;
|
||||
while (-1 != (n = raf.read(buff))) {
|
||||
raf.seek(writePosition);
|
||||
raf.write(buff, 0, n);
|
||||
readPosition += n;
|
||||
writePosition += n;
|
||||
raf.seek(readPosition);
|
||||
}
|
||||
raf.setLength(writePosition);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (raf != null) {
|
||||
raf.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return strList;
|
||||
}
|
||||
|
||||
|
||||
//获取文件总行数
|
||||
private int lineNumber() {
|
||||
int lineNumber = 0;
|
||||
if (file != null)
|
||||
try {
|
||||
LineNumberReader lineNumberReader = new LineNumberReader(new FileReader(file));
|
||||
lineNumberReader.skip(Long.MAX_VALUE);
|
||||
//注意加1,实际上是读取换行符,所以需要+1
|
||||
lineNumber = lineNumberReader.getLineNumber() + 1;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
|
||||
//读取日志
|
||||
public void registerReadListener(OnReadListener onReadListener) {
|
||||
if (onReadListener != null) {
|
||||
if (!onReadListeners.contains(onReadListener)) {
|
||||
onReadListeners.add(onReadListener);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void unRegisterReadListener(OnReadListener onReadListener) {
|
||||
if (onReadListener != null)
|
||||
onReadListeners.remove(onReadListener);
|
||||
}
|
||||
|
||||
|
||||
public interface OnReadListener {
|
||||
void onRefresh();
|
||||
}
|
||||
|
||||
//读取
|
||||
public class ReadThread implements Runnable {
|
||||
RandomAccessFile rf = null;
|
||||
long len;
|
||||
long start;
|
||||
long nextend;
|
||||
long readLine = 0;
|
||||
boolean isRead = true;
|
||||
int lineNum = -1;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// L.i(TAG, "是否是主线程=" + Utils.isMainThread());
|
||||
if (lineNum == -1) {
|
||||
lineNum = lineNumber();
|
||||
}
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (rf == null && file != null) {
|
||||
rf = new RandomAccessFile(file, "r");
|
||||
len = rf.length();
|
||||
start = rf.getFilePointer();
|
||||
nextend = start + len - 1;
|
||||
rf.seek(nextend);
|
||||
}
|
||||
// L.i(TAG, "len=" + len);
|
||||
// L.i(TAG, "start=" + start);
|
||||
// L.i(TAG, "nextend=" + nextend);
|
||||
String line;
|
||||
int c = -1;
|
||||
while (isRead && nextend > start) {
|
||||
c = rf.read();
|
||||
if (c == '\n' || c == '\r') {
|
||||
line = rf.readLine();
|
||||
if (!TextUtils.isEmpty(line)) {
|
||||
String log = new String(line.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
listLog.add(onParse(log));
|
||||
}
|
||||
nextend--;
|
||||
readLine++;
|
||||
}
|
||||
nextend--;
|
||||
rf.seek(nextend);
|
||||
if (nextend == 0) {// 当文件指针退至文件开始处,输出第一行
|
||||
String log = new String(rf.readLine().getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
listLog.add(onParse(log));
|
||||
readLine++;
|
||||
}
|
||||
if (readLine == EVERY_TIME_READ_LINES + 1) {
|
||||
isRead = false;
|
||||
}
|
||||
// L.i(TAG, "readLine=" + readLine);
|
||||
}
|
||||
Collections.reverse(listLog);
|
||||
if (onReadListeners.size() != 0) {
|
||||
for (int i = 0; i < onReadListeners.size(); i++) {
|
||||
onReadListeners.get(i).onRefresh();
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (rf != null)
|
||||
rf.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
isInitRead.set(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package com.zhidao.support.adas.high.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.zhidao.support.adas.high.R;
|
||||
import com.zhidao.support.adas.high.bean.IPCConnectState;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
/**
|
||||
* 连接状态
|
||||
*/
|
||||
public class ConnectStatusAdapter extends RecyclerView.Adapter<ConnectStatusAdapter.InfoViewHolder> {
|
||||
private static final String POS = "%03d. ";
|
||||
private List<IPCConnectState> mDatas;
|
||||
private Context mContext;
|
||||
|
||||
public void setData(List<IPCConnectState> mDatas) {
|
||||
this.mDatas = mDatas;
|
||||
}
|
||||
|
||||
public void refreshView() {
|
||||
// notifyItemChanged(mDatas.size()-1,0);
|
||||
notifyItemRangeChanged(0, getItemCount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public InfoViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
|
||||
mContext = viewGroup.getContext();
|
||||
View remoteView = LayoutInflater.from(mContext).inflate(R.layout.item_status, viewGroup, false);
|
||||
return new InfoViewHolder(remoteView);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull InfoViewHolder viewHolder, int position) {
|
||||
if (mDatas != null) {
|
||||
IPCConnectState data = mDatas.get(position);
|
||||
viewHolder.id.setText(String.format(Locale.getDefault(), POS, getItemCount() - position));
|
||||
viewHolder.editText.setText(data.status);
|
||||
viewHolder.editText.setTextColor(mContext.getResources().getColor(data.color));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mDatas == null ? 0 : mDatas.size();
|
||||
}
|
||||
|
||||
|
||||
class InfoViewHolder extends RecyclerView.ViewHolder {
|
||||
EditText editText;
|
||||
TextView id;
|
||||
|
||||
public InfoViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
editText = itemView.findViewById(R.id.log);
|
||||
id = itemView.findViewById(R.id.id);
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
package com.zhidao.support.adas.high.widget;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.zhidao.support.adas.high.R;
|
||||
import com.zhidao.support.adas.high.bean.IPCConnectState;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xuxinchao
|
||||
* @description
|
||||
* @since: 2022/4/20
|
||||
*/
|
||||
public class ConnectStatusFloatWindow implements View.OnTouchListener {
|
||||
|
||||
|
||||
private final Activity mContext;
|
||||
private WindowManager.LayoutParams mWindowParams;
|
||||
private WindowManager mWindowManager;
|
||||
|
||||
private View mFloatLayout;
|
||||
private ImageView btn_drag;
|
||||
private float mInViewX;
|
||||
private float mInViewY;
|
||||
private float mDownInScreenX;
|
||||
private float mDownInScreenY;
|
||||
private float mInScreenX;
|
||||
private float mInScreenY;
|
||||
private RecyclerView rv_status;
|
||||
private ConnectStatusAdapter adapter;
|
||||
private List<IPCConnectState> list;
|
||||
private OnConnectStatusFloatWindowListener listener;
|
||||
|
||||
public interface OnConnectStatusFloatWindowListener {
|
||||
void onClose();
|
||||
}
|
||||
|
||||
public ConnectStatusFloatWindow(Activity context, List<IPCConnectState> list, OnConnectStatusFloatWindowListener listener) {
|
||||
this.mContext = context;
|
||||
this.list = list;
|
||||
this.listener = listener;
|
||||
initFloatWindow();
|
||||
}
|
||||
|
||||
public void refreshView() {
|
||||
if (adapter != null) {
|
||||
adapter.refreshView();
|
||||
}
|
||||
}
|
||||
|
||||
private void initRV() {
|
||||
//创建默认的线性LayoutManager 横向的GridLayoutManager
|
||||
MyLinearLayoutManager linearLayoutManager = new MyLinearLayoutManager(mContext);
|
||||
// linearLayoutManager.setStackFromEnd(true);//列表再底部开始展示,反转后由上面开始展示
|
||||
// linearLayoutManager.setReverseLayout(true);//列表翻转
|
||||
rv_status.setLayoutManager(linearLayoutManager);
|
||||
//如果可以确定每个item的高度是固定的,设置这个选项可以提高性能
|
||||
rv_status.setHasFixedSize(false);
|
||||
rv_status.setNestedScrollingEnabled(false);
|
||||
adapter = new ConnectStatusAdapter();
|
||||
adapter.setHasStableIds(true);
|
||||
rv_status.setAdapter(adapter);
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
private void initFloatWindow() {
|
||||
LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||
if (inflater == null)
|
||||
return;
|
||||
mFloatLayout = inflater.inflate(R.layout.layout_float, null);
|
||||
rv_status = mFloatLayout.findViewById(R.id.rv_status);
|
||||
View btn_close = mFloatLayout.findViewById(R.id.btn_close);
|
||||
View btn_help = mFloatLayout.findViewById(R.id.btn_help);
|
||||
View btn_save = mFloatLayout.findViewById(R.id.btn_save);
|
||||
btn_drag = mFloatLayout.findViewById(R.id.btn_drag);
|
||||
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (listener != null)
|
||||
listener.onClose();
|
||||
}
|
||||
});
|
||||
btn_help.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(v.getContext(), "功能提示\n1.将数连接状态写入本地;\n2.清空列表以及保存到本地的数据;\n3.拖拽;\n4.帮助;\n5.关闭此窗口;", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
btn_save.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
mFloatLayout.setOnTouchListener(this);
|
||||
initRV();
|
||||
mWindowParams = new WindowManager.LayoutParams();
|
||||
mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
if (Build.VERSION.SDK_INT >= 26) {//8.0新特性
|
||||
mWindowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
} else {
|
||||
mWindowParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
}
|
||||
|
||||
mWindowManager = mContext.getWindowManager();
|
||||
|
||||
mWindowParams.format = PixelFormat.RGBA_8888;
|
||||
mWindowParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
mWindowParams.gravity = Gravity.START | Gravity.TOP;
|
||||
mWindowParams.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
mWindowParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
mWindowParams.alpha = 0.82F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
return floatLayoutTouch(motionEvent);
|
||||
}
|
||||
|
||||
private boolean floatLayoutTouch(MotionEvent motionEvent) {
|
||||
switch (motionEvent.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// 获取相对View的坐标,即以此View左上角为原点
|
||||
mInViewX = motionEvent.getX();
|
||||
mInViewY = motionEvent.getY();
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.getRawX();
|
||||
mDownInScreenY = motionEvent.getRawY() - BarUtils.getStatusBarHeight();
|
||||
mInScreenX = motionEvent.getRawX();
|
||||
mInScreenY = motionEvent.getRawY() - BarUtils.getStatusBarHeight();
|
||||
btn_drag.setSelected(true);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.getRawX();
|
||||
mInScreenY = motionEvent.getRawY() - BarUtils.getStatusBarHeight();
|
||||
mWindowParams.x = (int) (mInScreenX - mInViewX);
|
||||
mWindowParams.y = (int) (mInScreenY - mInViewY);
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
mWindowManager.updateViewLayout(mFloatLayout, mWindowParams);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
btn_drag.setSelected(false);
|
||||
// 如果手指离开屏幕时,xDownInScreen和xInScreen相等,且yDownInScreen和yInScreen相等,则视为触发了单击事件。
|
||||
if (mDownInScreenX == mInScreenX && mDownInScreenY == mInScreenY) {
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void showFloatWindow() {
|
||||
if (mFloatLayout.getParent() == null) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager.getDefaultDisplay().getMetrics(metrics);
|
||||
mWindowParams.x = metrics.widthPixels;
|
||||
mWindowParams.y = metrics.heightPixels;
|
||||
mWindowManager.addView(mFloatLayout, mWindowParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void hideFloatWindow() {
|
||||
if (mFloatLayout.getParent() != null)
|
||||
mWindowManager.removeView(mFloatLayout);
|
||||
}
|
||||
|
||||
public void setFloatLayoutAlpha(boolean alpha) {
|
||||
if (alpha)
|
||||
mFloatLayout.setAlpha((float) 0.5);
|
||||
else
|
||||
mFloatLayout.setAlpha(1);
|
||||
}
|
||||
|
||||
private int sbar = -1;
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.zhidao.support.adas.high.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class MyLinearLayoutManager extends LinearLayoutManager {
|
||||
public MyLinearLayoutManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public MyLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
|
||||
super(context, orientation, reverseLayout);
|
||||
}
|
||||
|
||||
public MyLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPredictiveItemAnimations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
|
||||
//override this method and implement code as below
|
||||
try {
|
||||
super.onLayoutChildren(recycler, state);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#3B4577"
|
||||
android:pathData="M148.86,185.78c-25.64,0 -46.44,-21.63 -46.44,-48.28s20.8,-48.28 46.44,-48.28h316.74V48.28C465.6,21.63 486.4,0 512.04,0c25.73,0 46.44,21.63 46.44,48.28v40.94h316.65c25.73,0 46.44,21.63 46.44,48.28s-20.71,48.28 -46.44,48.28H148.86zM754.79,927.44l67.8,-573.76H201.38L269.18,927.44h485.6zM875.16,257.11c13.28,0 25.92,5.99 34.74,16.32 8.92,10.33 13,24.14 11.33,37.85L841.91,981.61c-2.79,24.23 -22.57,42.39 -46.07,42.39H228.13c-23.5,0 -43.28,-18.16 -46.07,-42.39L102.73,311.29c-1.58,-13.71 2.51,-27.52 11.42,-37.85 8.73,-10.33 21.37,-16.32 34.74,-16.32h726.27z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#99CCCC"
|
||||
android:pathData="M148.86,185.78c-25.64,0 -46.44,-21.63 -46.44,-48.28s20.8,-48.28 46.44,-48.28h316.74V48.28C465.6,21.63 486.4,0 512.04,0c25.73,0 46.44,21.63 46.44,48.28v40.94h316.65c25.73,0 46.44,21.63 46.44,48.28s-20.71,48.28 -46.44,48.28H148.86zM754.79,927.44l67.8,-573.76H201.38L269.18,927.44h485.6zM875.16,257.11c13.28,0 25.92,5.99 34.74,16.32 8.92,10.33 13,24.14 11.33,37.85L841.91,981.61c-2.79,24.23 -22.57,42.39 -46.07,42.39H228.13c-23.5,0 -43.28,-18.16 -46.07,-42.39L102.73,311.29c-1.58,-13.71 2.51,-27.52 11.42,-37.85 8.73,-10.33 21.37,-16.32 34.74,-16.32h726.27z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M584.41,512l362.04,362.04c20,20 20,52.42 0,72.41 -19.99,19.99 -52.41,19.99 -72.4,0L512,584.41l-362.04,362.04c-20,19.99 -52.42,19.99 -72.41,0 -19.99,-19.99 -19.99,-52.41 0,-72.41L439.59,512l-362.04,-362.04c-19.99,-20 -19.99,-52.42 0,-72.41 19.99,-19.99 52.41,-19.99 72.41,0L512,439.59l362.04,-362.04c20,-19.99 52.42,-19.99 72.41,0 19.99,19.99 19.99,52.41 0,72.41L584.41,512z"
|
||||
android:fillColor="#3B4577"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M584.41,512l362.04,362.04c20,20 20,52.42 0,72.41 -19.99,19.99 -52.41,19.99 -72.4,0L512,584.41l-362.04,362.04c-20,19.99 -52.42,19.99 -72.41,0 -19.99,-19.99 -19.99,-52.41 0,-72.41L439.59,512l-362.04,-362.04c-19.99,-20 -19.99,-52.42 0,-72.41 19.99,-19.99 52.41,-19.99 72.41,0L512,439.59l362.04,-362.04c20,-19.99 52.42,-19.99 72.41,0 19.99,19.99 19.99,52.41 0,72.41L584.41,512z"
|
||||
android:fillColor="#99CCCC"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M1020.93,527.02a39.41,39.41 0,0 0,3.06 -15.05c0,-5.25 -1.1,-10.34 -3.06,-15.12a38.45,38.45 0,0 0,-8.46 -12.62l-162.54,-162.55c-15.28,-15.28 -40.04,-15.28 -55.41,0 -15.28,15.36 -15.28,40.13 0,55.41l95.69,95.69h-339.03V133.67l95.69,95.69a39.04,39.04 0,0 0,27.67 11.44c10.03,0 20.06,-3.84 27.74,-11.44 15.28,-15.36 15.28,-40.12 0,-55.41L539.66,11.4c-1.8,-1.88 -4.08,-2.74 -6.19,-4.15 -2.11,-1.41 -3.99,-3.22 -6.43,-4.23a39.46,39.46 0,0 0,-30.17 0c-2.43,1.02 -4.23,2.82 -6.43,4.23 -2.04,1.41 -4.31,2.27 -6.2,4.15L321.71,173.95c-15.28,15.28 -15.28,40.05 0,55.41a39.21,39.21 0,0 0,55.41 0l95.69,-95.69V472.79H133.78l95.61,-95.69c15.36,-15.28 15.36,-40.05 0,-55.41 -15.28,-15.28 -40.05,-15.28 -55.41,0L11.53,484.23A37.27,37.27 0,0 0,3.05 496.85,38.37 38.37,0 0,0 0,511.98a37.99,37.99 0,0 0,3.06 15.05,37.59 37.59,0 0,0 8.46,12.7l162.46,162.47a39.03,39.03 0,0 0,27.74 11.44c10.04,0 20.06,-3.76 27.66,-11.44 15.36,-15.28 15.36,-40.12 0,-55.41L133.78,551.16h339.03v339.05l-95.69,-95.62a39.07,39.07 0,0 0,-55.41 0c-15.28,15.28 -15.28,40.05 0,55.41l162.46,162.47a39.44,39.44 0,0 0,12.85 8.46A37.89,37.89 0,0 0,511.99 1024c5.09,0 10.19,-1.02 14.89,-3.06a38.63,38.63 0,0 0,12.85 -8.46l162.54,-162.47c15.28,-15.36 15.28,-40.13 0,-55.41 -15.36,-15.36 -40.12,-15.36 -55.41,0l-95.69,95.62v-339.05h339.03l-95.69,95.62c-15.28,15.28 -15.28,40.12 0,55.41a39.03,39.03 0,0 0,27.74 11.44c10.04,0 20.06,-3.76 27.66,-11.44l162.54,-162.47a38.77,38.77 0,0 0,8.46 -12.7"
|
||||
android:fillColor="#3B4577"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M1020.93,527.02a39.41,39.41 0,0 0,3.06 -15.05c0,-5.25 -1.1,-10.34 -3.06,-15.12a38.45,38.45 0,0 0,-8.46 -12.62l-162.54,-162.55c-15.28,-15.28 -40.04,-15.28 -55.41,0 -15.28,15.36 -15.28,40.13 0,55.41l95.69,95.69h-339.03V133.67l95.69,95.69a39.04,39.04 0,0 0,27.67 11.44c10.03,0 20.06,-3.84 27.74,-11.44 15.28,-15.36 15.28,-40.12 0,-55.41L539.66,11.4c-1.8,-1.88 -4.08,-2.74 -6.19,-4.15 -2.11,-1.41 -3.99,-3.22 -6.43,-4.23a39.46,39.46 0,0 0,-30.17 0c-2.43,1.02 -4.23,2.82 -6.43,4.23 -2.04,1.41 -4.31,2.27 -6.2,4.15L321.71,173.95c-15.28,15.28 -15.28,40.05 0,55.41a39.21,39.21 0,0 0,55.41 0l95.69,-95.69V472.79H133.78l95.61,-95.69c15.36,-15.28 15.36,-40.05 0,-55.41 -15.28,-15.28 -40.05,-15.28 -55.41,0L11.53,484.23A37.27,37.27 0,0 0,3.05 496.85,38.37 38.37,0 0,0 0,511.98a37.99,37.99 0,0 0,3.06 15.05,37.59 37.59,0 0,0 8.46,12.7l162.46,162.47a39.03,39.03 0,0 0,27.74 11.44c10.04,0 20.06,-3.76 27.66,-11.44 15.36,-15.28 15.36,-40.12 0,-55.41L133.78,551.16h339.03v339.05l-95.69,-95.62a39.07,39.07 0,0 0,-55.41 0c-15.28,15.28 -15.28,40.05 0,55.41l162.46,162.47a39.44,39.44 0,0 0,12.85 8.46A37.89,37.89 0,0 0,511.99 1024c5.09,0 10.19,-1.02 14.89,-3.06a38.63,38.63 0,0 0,12.85 -8.46l162.54,-162.47c15.28,-15.36 15.28,-40.13 0,-55.41 -15.36,-15.36 -40.12,-15.36 -55.41,0l-95.69,95.62v-339.05h339.03l-95.69,95.62c-15.28,15.28 -15.28,40.12 0,55.41a39.03,39.03 0,0 0,27.74 11.44c10.04,0 20.06,-3.76 27.66,-11.44l162.54,-162.47a38.77,38.77 0,0 0,8.46 -12.7"
|
||||
android:fillColor="#99CCCC"/>
|
||||
</vector>
|
||||
@@ -1,15 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="30dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M40.96,853.95a40.96,40.96 0,0 1,-40.96 -40.96V81.92a40.96,40.96 0,0 1,40.96 -40.96h942.08a40.96,40.96 0,0 1,40.96 40.96v731.07a40.96,40.96 0,0 1,-40.96 40.96h-308.18l-132.45,146.33c-16.3,18.01 -44.6,17.96 -60.83,-0.1l-131.43,-146.23H40.96zM81.92,122.88v649.15h286.48a40.96,40.96 0,0 1,30.46 13.58l113.29,126.03 114.17,-126.14a40.96,40.96 0,0 1,30.37 -13.47H942.08V122.88H81.92z"
|
||||
android:fillColor="#3B4577"/>
|
||||
<path
|
||||
android:pathData="M470.27,261.12a40.96,40.96 0,1 1,81.92 0v212.08a40.96,40.96 0,0 1,-81.92 0V261.12z"
|
||||
android:fillColor="#3B4577"/>
|
||||
<path
|
||||
android:pathData="M564.71,627.91c0,30.04 -24.47,54.47 -54.56,54.47 -30.18,0 -54.47,-24.43 -54.47,-54.47A54.37,54.37 0,0 1,510.15 573.44c30.09,0 54.56,24.34 54.56,54.47"
|
||||
android:fillColor="#3B4577"/>
|
||||
</vector>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user