Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_265_220329_2.6.5' into dev_robotaxi-d-app-module_265_220329_2.6.5
# Conflicts: # OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java # OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/network/TaxiPassengerServiceManager.java # OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/MogoOCHTaxiModelNew.java
@@ -39,6 +39,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.ui.BusTrafficLightView;
|
||||
import com.mogo.och.bus.view.BusArcView;
|
||||
import com.mogo.och.bus.view.SlidePanelView;
|
||||
|
||||
@@ -69,6 +70,7 @@ public abstract class BaseOchBusTabFragment<V extends IView, P extends Presenter
|
||||
private FrameLayout flSpeed;
|
||||
private BusArcView mouduleArc;
|
||||
private ImageView mUpgradeTipIv;
|
||||
// private BusTrafficLightView mTrafficLightView;
|
||||
|
||||
public static final String TYPE_ENTRANCE = "entrance";
|
||||
|
||||
@@ -105,6 +107,9 @@ public abstract class BaseOchBusTabFragment<V extends IView, P extends Presenter
|
||||
ctvAutopilotStatusTv = findViewById(R.id.bus_autopolot_btn_tv);
|
||||
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
|
||||
|
||||
// mTrafficLightView = findViewById(R.id.bus_traffic_light_view);
|
||||
// CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
|
||||
|
||||
tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
|
||||
|
||||
flSpeed = (FrameLayout) findViewById(R.id.fl_speed);
|
||||
@@ -147,7 +152,7 @@ public abstract class BaseOchBusTabFragment<V extends IView, P extends Presenter
|
||||
initListener();
|
||||
ctvAutopilotStatus.setOnClickListener(v -> {
|
||||
// 如果能自动驾驶,就自动驾驶,不能就提示
|
||||
// if (MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE){
|
||||
// if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE){
|
||||
// return;
|
||||
// }
|
||||
// if (autopilotLoadingAnimator != null){
|
||||
@@ -420,7 +425,7 @@ public abstract class BaseOchBusTabFragment<V extends IView, P extends Presenter
|
||||
* 开启自动驾驶中间动画
|
||||
*/
|
||||
public void startAutopilotAnimation() {
|
||||
// if (MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
|
||||
// if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_tv));
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_normal));
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
|
||||
@@ -6,10 +6,10 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.bus.bean.OchBusOperationStatusRequest;
|
||||
@@ -35,8 +35,7 @@ public class OCHBusServiceManager {
|
||||
|
||||
private static final String TAG = OCHBusServiceManager.class.getSimpleName();
|
||||
|
||||
private IOchBusApiService mService;
|
||||
private String baseUrl = OchBusConst.getBaseUrl();
|
||||
private final IOchBusApiService mService;
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final OCHBusServiceManager INSTANCE = new OCHBusServiceManager();
|
||||
@@ -47,7 +46,7 @@ public class OCHBusServiceManager {
|
||||
}
|
||||
|
||||
private OCHBusServiceManager(){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
mService = MoGoRetrofitFactory.getInstance(OchBusConst.getBaseUrl()).create(IOchBusApiService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,9 +55,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void queryBusRoutes(Context context,OCHServiceCallback<OchBusRoutesResponse> callback) {
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
//获取当前高德坐标
|
||||
|
||||
mService.querySiteByCoordinate(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
@@ -76,9 +72,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void resetStationStatus(Context context, int lineId, OCHServiceCallback<OchBusRoutesResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.resetStationStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new OchBusResetDrivingLineRequest(lineId))
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -93,9 +86,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void leaveStation(Context context,int seq,int siteId,OCHServiceCallback<OchBusRoutesResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.leaveStation(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OchBusUpdateSiteStatusRequest(seq,siteId,OchBusOrderModel.getInstance().mLongitude
|
||||
@@ -113,9 +103,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void arriveSiteStation(Context context,int seq,int siteId,OCHServiceCallback<BaseData> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.arriveSiteStation(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OchBusUpdateSiteStatusRequest(seq,siteId
|
||||
@@ -134,9 +121,6 @@ public class OCHBusServiceManager {
|
||||
*/
|
||||
public void queryStationLeaveAwayPassengers(Context context,int seq,int siteId
|
||||
,OCHServiceCallback<QueryLeaveAwayPassengersResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.queryStationLeaveAwayPassengers( MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new QueryLeaveAwayPassengersRequest(seq,siteId))
|
||||
.subscribeOn( Schedulers.io() )
|
||||
@@ -150,9 +134,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void stopTakeOrder(Context context,OCHServiceCallback<BaseData> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.stopTakeOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OchBusOperationStatusRequest(OchBusOrderModel.getInstance().mLongitude
|
||||
@@ -168,9 +149,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void startTakeOrder(Context context,OCHServiceCallback<BaseData> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.startTakeOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OchBusOperationStatusRequest(OchBusOrderModel.getInstance().mLongitude
|
||||
@@ -186,9 +164,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void queryOperationStatus(Context context,OCHServiceCallback<OchBusOperationStatusResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.queryOperationStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.subscribeOn( Schedulers.io() )
|
||||
@@ -202,9 +177,6 @@ public class OCHBusServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void queryBusOrders(Context context, OCHServiceCallback<OchBusOrdersResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.queryBusOrders(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -213,9 +185,6 @@ public class OCHBusServiceManager {
|
||||
}
|
||||
|
||||
public void queryBusLines(Context context, OCHServiceCallback<BusQueryLinesResponse> callback){
|
||||
if (mService == null){
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create(IOchBusApiService.class,baseUrl);
|
||||
}
|
||||
mService.queryBusLines(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -232,10 +201,6 @@ public class OCHBusServiceManager {
|
||||
*/
|
||||
public void runCarHeartbeat(Context context, double lon, double lat,
|
||||
OCHServiceCallback<BaseData> callback) {
|
||||
if ( mService == null ) {
|
||||
mService = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(IOchBusApiService.class, baseUrl);
|
||||
}
|
||||
mService.runCarHeartbeat(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new CarHeartbeatReqBean(
|
||||
MoGoAiCloudClientConfig.getInstance().getSn(), lon, lat))
|
||||
|
||||
@@ -15,7 +15,6 @@ 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.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
@@ -41,7 +40,6 @@ import com.mogo.och.bus.net.OCHBusServiceManager;
|
||||
import com.mogo.och.bus.net.OCHServiceCallback;
|
||||
import com.mogo.och.bus.util.OchBusAnalyticsUtil;
|
||||
import com.mogo.och.bus.util.PinYinUtil;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
@@ -289,27 +287,8 @@ public class OchBusOrderModel {
|
||||
@Override
|
||||
public void onCarLocationChanged2( Location location ) {
|
||||
// CallerLogger.INSTANCE.d(M_BUS + TAG,"location = "+location.getLongitude()+","+location.getLatitude());
|
||||
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.setAccuracy(location.getAccuracy());
|
||||
mogoLocation.setProvider(location.getProvider());
|
||||
mogoLocation.setLongitude(location.getLongitude());
|
||||
mogoLocation.setLatitude(location.getLatitude());
|
||||
mogoLocation.setSpeed(location.getSpeed());
|
||||
mogoLocation.setBearing(location.getBearing());
|
||||
// TODO: 2021/9/2 因0830新版server后台只能过滤locType=1&&satellites>=4的定位数据,暂固化值,后续优化
|
||||
mogoLocation.setLocType(1);
|
||||
mogoLocation.setSatellite(4);
|
||||
/**
|
||||
* TODO: 2021/10/20
|
||||
* 因ALocationClient实际无坐标返回,所以此处从custom map中AMapViewWrapper获取坐标并反馈回用于坐标上传
|
||||
* {@link com.mogo.map.impl.custom.location.ALocationClient}
|
||||
*/
|
||||
apis.getLocationInfoApi().provideLocation(mogoLocation);
|
||||
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
}
|
||||
@@ -431,7 +410,7 @@ public class OchBusOrderModel {
|
||||
OchBusStation nextStation = stationList.get( currentStationIndex);
|
||||
|
||||
// if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
|
||||
// == Integer.parseInt(DebugConfig.getAutoPilotStatus())) {
|
||||
// == CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()) {
|
||||
// TipToast.shortTip("自动驾驶状态为不可用!");
|
||||
// }
|
||||
AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.mogo.och.bus.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.R;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Bus司机端:红绿灯view
|
||||
*
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
public class BusTrafficLightView extends IViewTrafficLight {
|
||||
|
||||
private ImageView mLightIconIV;
|
||||
private GradientTextView mLightTimeTV;
|
||||
private int mCurrentLightId;
|
||||
|
||||
public BusTrafficLightView(@Nullable Context context) {
|
||||
this(context, null, 0);
|
||||
}
|
||||
|
||||
public BusTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public BusTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.bus_traffic_light_view, this, true);
|
||||
mLightIconIV = findViewById(R.id.bus_traffic_light_iv);
|
||||
mLightTimeTV = findViewById(R.id.bus_traffic_light_time_tv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
@Override
|
||||
public void disableWarningTrafficLight() {
|
||||
super.disableWarningTrafficLight();
|
||||
UiThreadHandler.post(() -> {
|
||||
mCurrentLightId = 0;
|
||||
BusTrafficLightView.this.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param redNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
@Override
|
||||
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
|
||||
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
|
||||
switch (mCurrentLightId) {
|
||||
case 1:
|
||||
changeCountdownRed(redNum);
|
||||
break;
|
||||
case 2:
|
||||
changeCountdownYellow(yellowNum);
|
||||
break;
|
||||
case 3:
|
||||
changeCountdownGreen(greenNum);
|
||||
break;
|
||||
default:
|
||||
UiThreadHandler.post(() -> {
|
||||
mLightTimeTV.setText("");
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownRed(int redNum) {
|
||||
super.changeCountdownRed(redNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (redNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_red_color_up),
|
||||
getResources().getColor(R.color.bus_traffic_light_red_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(redNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownGreen(int greenNum) {
|
||||
super.changeCountdownGreen(greenNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (greenNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_green_color_up),
|
||||
getResources().getColor(R.color.bus_traffic_light_green_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(greenNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownYellow(int yellowNum) {
|
||||
super.changeCountdownYellow(yellowNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (yellowNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_yellow_color_up),
|
||||
getResources().getColor(R.color.bus_traffic_light_yellow_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(yellowNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
*/
|
||||
private void updateTrafficLightIcon(int lightId) {
|
||||
UiThreadHandler.post(() -> {
|
||||
switch (lightId) {
|
||||
case 1:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.bus_light_red_nor);
|
||||
BusTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 2:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.bus_lightyellow_nor);
|
||||
BusTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 3:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.bus_light_green_nor);
|
||||
BusTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
default:
|
||||
BusTrafficLightView.this.setVisibility(GONE);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.mogo.och.bus.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/22
|
||||
*/
|
||||
public class GradientTextView extends AppCompatTextView {
|
||||
|
||||
private LinearGradient mLinearGradient;
|
||||
private Paint mPaint;
|
||||
private int mViewWidth = 0;//文字的宽度
|
||||
private int mViewHeight = 0;//文字的高度
|
||||
private Rect mTextBound = new Rect();
|
||||
private int[] mColorList;//存放颜色的数组
|
||||
private boolean isVertrial;//默认是横向
|
||||
|
||||
private float mRadius;
|
||||
private float mdx;
|
||||
private float mdy;
|
||||
private int mColor;
|
||||
|
||||
public GradientTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public GradientTextView(Context context,
|
||||
AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
//设置默认的颜色
|
||||
mColorList = new int[]{0xFFFFFFFF, 0xFFFFFFF};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
|
||||
if (isVertrial) {
|
||||
mViewHeight = getMeasuredHeight();
|
||||
} else {
|
||||
mViewWidth = getMeasuredWidth();
|
||||
}
|
||||
mPaint = getPaint();
|
||||
String mTipText = getText().toString();
|
||||
|
||||
setStyle();
|
||||
|
||||
mPaint.getTextBounds(mTipText, 0, mTipText.length(), mTextBound);
|
||||
|
||||
mPaint.setShadowLayer(mRadius, mdx, mdy, mColor);
|
||||
|
||||
//画出文字
|
||||
canvas.drawText(mTipText, getMeasuredWidth() / 2 - mTextBound.width() / 2, getMeasuredHeight() / 2 + mTextBound.height() / 2, mPaint);
|
||||
}
|
||||
|
||||
/**
|
||||
* true表示纵向渐变,false变身横向渐变
|
||||
*
|
||||
* @param vertrial
|
||||
*/
|
||||
public void setVertrial(boolean vertrial) {
|
||||
isVertrial = vertrial;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置渐变的颜色
|
||||
*
|
||||
* @param mColorList
|
||||
*/
|
||||
public void setmColorList(int[] mColorList) {
|
||||
if (mColorList != null && mColorList.length < 2) {
|
||||
throw new RuntimeException("ClorList's length must be > 2");
|
||||
} else {
|
||||
|
||||
this.mColorList = mColorList;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyle() {
|
||||
mPaint.setAntiAlias(true);
|
||||
mPaint.setDither(true);
|
||||
mPaint.setFilterBitmap(true);
|
||||
//前面4个参数分别表示渐变的开始x轴,开始y轴,结束的x轴,结束的y轴,mcolorList表示渐变的颜色数组
|
||||
mLinearGradient = new LinearGradient(0, 0, mViewWidth, mViewHeight, mColorList, null, Shader.TileMode.CLAMP);
|
||||
mPaint.setShader(mLinearGradient);
|
||||
mPaint.setStrokeJoin(Paint.Join.ROUND);
|
||||
mPaint.setStrokeCap(Paint.Cap.ROUND);
|
||||
mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置投影层
|
||||
* @param radius
|
||||
* @param dx
|
||||
* @param dy
|
||||
* @param color
|
||||
*/
|
||||
public void setShadowLayerCustom(float radius, float dx, float dy, int color) {
|
||||
this.mRadius = radius;
|
||||
this.mdx = dx;
|
||||
this.mdy = dy;
|
||||
this.mColor = color;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#ff000000"/>
|
||||
<corners android:radius="@dimen/bus_traffic_light_layout_corner"/>
|
||||
</shape>
|
||||
@@ -230,4 +230,13 @@
|
||||
app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable,btnAutopilotRunning"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- <com.mogo.och.bus.ui.BusTrafficLightView-->
|
||||
<!-- android:id="@+id/bus_traffic_light_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- android:layout_marginRight="@dimen/bus_traffic_light_layout_margin_right"-->
|
||||
<!-- android:layout_marginTop="@dimen/bus_traffic_light_layout_margin_top"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/bus_traffic_light_layout_width"
|
||||
android:layout_height="@dimen/bus_traffic_light_layout_height"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/bus_traffic_light_bg_width"
|
||||
android:layout_height="@dimen/bus_traffic_light_bg_height"
|
||||
android:background="@drawable/bg_bus_traffic_light_background"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginLeft="@dimen/bus_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/bus_traffic_light_bg_margin_top"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_traffic_light_iv"
|
||||
android:layout_width="@dimen/bus_traffic_light_icon_size"
|
||||
android:layout_height="@dimen/bus_traffic_light_icon_size"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.mogo.och.bus.ui.GradientTextView
|
||||
android:id="@+id/bus_traffic_light_time_tv"
|
||||
android:layout_width="@dimen/bus_traffic_light_time_view_width"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/bus_traffic_light_time_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -124,4 +124,16 @@
|
||||
|
||||
<dimen name="bus_switch_line_btn_margin_b">20px</dimen>
|
||||
|
||||
<dimen name="bus_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="bus_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="bus_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="bus_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -121,4 +121,17 @@
|
||||
<dimen name="bus_switch_line_btn_height">120px</dimen>
|
||||
<dimen name="bus_switch_line_btn">86px</dimen>
|
||||
<dimen name="bus_switch_line_btn_margin_b">50px</dimen>
|
||||
|
||||
<dimen name="bus_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="bus_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="bus_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="bus_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -38,4 +38,10 @@
|
||||
<color name="bus_switch_btn_bg_half">#19FFFFFF</color>
|
||||
<color name="bus_white">#FFFFFF</color>
|
||||
|
||||
<color name="bus_traffic_light_red_color_up">#FFFFA28B</color>
|
||||
<color name="bus_traffic_light_red_color_down">#FFDA1100</color>
|
||||
<color name="bus_traffic_light_green_color_up">#FF60FFD3</color>
|
||||
<color name="bus_traffic_light_green_color_down">#FF006D43</color>
|
||||
<color name="bus_traffic_light_yellow_color_up">#FFFFE198</color>
|
||||
<color name="bus_traffic_light_yellow_color_down">#FFFF9B00</color>
|
||||
</resources>
|
||||
@@ -137,4 +137,17 @@
|
||||
<dimen name="bus_switch_line_btn_height">72px</dimen>
|
||||
<dimen name="bus_switch_line_btn">52px</dimen>
|
||||
<dimen name="bus_switch_line_btn_margin_b">20px</dimen>
|
||||
|
||||
<dimen name="bus_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="bus_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="bus_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="bus_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="bus_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="bus_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -17,7 +17,6 @@ import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
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.v2x.LimitingVelocityListener;
|
||||
@@ -431,23 +430,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
|
||||
private final IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged2( Location location ) {
|
||||
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.setAccuracy(location.getAccuracy());
|
||||
mogoLocation.setProvider(location.getProvider());
|
||||
mogoLocation.setLongitude(location.getLongitude());
|
||||
mogoLocation.setLatitude(location.getLatitude());
|
||||
mogoLocation.setSpeed(location.getSpeed());
|
||||
mogoLocation.setBearing(location.getBearing());
|
||||
// TODO: 2021/9/2 因0830新版server后台只能过滤locType=1&&satellites>=4的定位数据,暂固话值,后续优化
|
||||
mogoLocation.setLocType(1);
|
||||
mogoLocation.setSatellite(4);
|
||||
|
||||
apis.getLocationInfoApi().provideLocation(mogoLocation);
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (location != null && checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiPassengerOrderStatusEnum.OnTheWayToEndStation) {
|
||||
@@ -462,7 +448,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
};
|
||||
|
||||
private IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(@Nullable MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.content.Context;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -35,13 +36,11 @@ public class TaxiPassengerServiceManager {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private String baseUrl = TaxiPassengerConst.getBaseUrl();
|
||||
private TaxiPassengerServiceApi mOCHTaxiServiceApi;
|
||||
|
||||
private TaxiPassengerServiceManager() {
|
||||
if (mOCHTaxiServiceApi == null){
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(TaxiPassengerServiceApi.class, baseUrl);
|
||||
mOCHTaxiServiceApi = MoGoRetrofitFactory.getInstance(TaxiPassengerConst.getBaseUrl()).create(TaxiPassengerServiceApi.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,10 +60,6 @@ public class TaxiPassengerServiceManager {
|
||||
*/
|
||||
public void queryOrdersInAndWaitService(Context context,
|
||||
TaxiPassengerServiceCallback<TaxiPassengerOrdersInServiceQueryRespBean> callback) {
|
||||
if (mOCHTaxiServiceApi == null) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(TaxiPassengerServiceApi.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrdersInAndWaitService(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,getDriverAppSn()) //获取到司机端的sn
|
||||
@@ -80,10 +75,6 @@ public class TaxiPassengerServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void queryOrderRemaining(Context context, String orderNo, TaxiPassengerServiceCallback<TaxiPassengerOrderQueryRemainingResp> callback){
|
||||
if (mOCHTaxiServiceApi == null) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(TaxiPassengerServiceApi.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderRemaining(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,orderNo)
|
||||
@@ -114,10 +105,6 @@ public class TaxiPassengerServiceManager {
|
||||
*/
|
||||
public void queryOrderById(Context context, String orderNo,
|
||||
TaxiPassengerServiceCallback<TaxiPassengerOrderQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(TaxiPassengerServiceApi.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderById(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new TaxiPassengerOrderQueryReqBean(getDriverAppSn(), orderNo))
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/taxi_p_traffic_light_time_size"
|
||||
android:textStyle="bold"
|
||||
android:text="300"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center" />
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<dimen name="taxi_p_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_view_width">127px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_size">60px</dimen>
|
||||
|
||||
<dimen name="taxi_p_v2x_notification_view_margin_left">31px</dimen>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<dimen name="taxi_p_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_view_width">127px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="taxi_p_traffic_light_time_size">60px</dimen>
|
||||
|
||||
<dimen name="taxi_p_v2x_notification_view_margin_left">31px</dimen>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.taxi.model;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -19,7 +18,6 @@ import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
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.call.autopilot.CallerAutoPilotManager;
|
||||
@@ -58,7 +56,6 @@ import com.mogo.och.taxi.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.taxi.utils.OchTaxiAnalyticsUtil;
|
||||
import com.mogo.och.taxi.utils.OrderUtil;
|
||||
import com.mogo.och.taxi.utils.PinYinUtil;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
@@ -793,8 +790,9 @@ public class MogoOCHTaxiModelNew {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
|
||||
== Integer.parseInt(DebugConfig.getAutoPilotStatus())) {
|
||||
== CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()) {
|
||||
// TODO: 2021/11/28 工控机存在刚开始状态为0,但是可以开启变为2,工控机解决前不显示此toast
|
||||
// TipToast.shortTip("自动驾驶状态为不可用!");
|
||||
}
|
||||
@@ -856,6 +854,12 @@ public class MogoOCHTaxiModelNew {
|
||||
// mOrderStatusCallback.onCurrentOrderDistToStartChanged((long) distance, 0);
|
||||
// }
|
||||
|
||||
if (distance > OCHTaxiConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
distance = CoordinateUtils.calculateLineDistance(startLon, startLat,
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat());
|
||||
}
|
||||
|
||||
if (distance <= OCHTaxiConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
updateOCHOrderStatus(OrderStatusEnum.ArriveAtStartStation);
|
||||
return;
|
||||
@@ -925,19 +929,6 @@ public class MogoOCHTaxiModelNew {
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged2(Location location) {
|
||||
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.setAccuracy(location.getAccuracy());
|
||||
mogoLocation.setProvider(location.getProvider());
|
||||
mogoLocation.setLongitude(location.getLongitude());
|
||||
mogoLocation.setLatitude(location.getLatitude());
|
||||
mogoLocation.setSpeed(location.getSpeed());
|
||||
mogoLocation.setBearing(location.getBearing());
|
||||
// TODO: 2021/9/2 因0830新版server后台只能过滤locType=1&&satellites>=4的定位数据,暂固话值,后续优化
|
||||
mogoLocation.setLocType(1);
|
||||
mogoLocation.setSatellite(4);
|
||||
|
||||
apis.getLocationInfoApi().provideLocation(mogoLocation);
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (location != null && checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == OrderStatusEnum.OnTheWayToStartStation) {
|
||||
|
||||
@@ -6,10 +6,10 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.taxi.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.taxi.bean.DriverServiceDataRespBean;
|
||||
import com.mogo.och.taxi.bean.DriverStatusQueryRespBean;
|
||||
@@ -51,13 +51,11 @@ public class OCHTaxiServiceManagerNew {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private String baseUrl = OCHTaxiConst.getBaseUrl();
|
||||
private OCHTaxiServiceApiNew mOCHTaxiServiceApi;
|
||||
|
||||
private OCHTaxiServiceManagerNew() {
|
||||
if (mOCHTaxiServiceApi == null){
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
mOCHTaxiServiceApi = MoGoRetrofitFactory.getInstance(OCHTaxiConst.getBaseUrl()).create(OCHTaxiServiceApiNew.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,10 +66,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrdersInAndWaitService(Context context,
|
||||
OCHTaxiServiceCallback<OrdersInServiceQueryRespBean> callback) {
|
||||
if (mOCHTaxiServiceApi == null) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrdersInAndWaitService(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
@@ -87,10 +81,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryNewBookingOrder(Context context,
|
||||
OCHTaxiServiceCallback<OrdersNewBookingQueryRespBean> callback) {
|
||||
if (mOCHTaxiServiceApi == null) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryNewBookingOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
@@ -107,10 +97,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void grabOrder(Context context, String orderNo,
|
||||
OCHTaxiServiceCallback<OrderGrabRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.grabOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderGrabReqBean(
|
||||
@@ -128,10 +114,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrderGrabStatus(Context context, String orderNo,
|
||||
OCHTaxiServiceCallback<OrderGrabStatusQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderGrabStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderGrabReqBean(
|
||||
@@ -149,10 +131,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrderRouteInfo(Context context, String orderNo,
|
||||
OCHTaxiServiceCallback<OrderQueryRouteInfoRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderRouteInfo(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderQueryRouteInfoReqBean(
|
||||
@@ -171,10 +149,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrderById(Context context, String orderNo,
|
||||
OCHTaxiServiceCallback<OrderQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderById(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderQueryReqBean(
|
||||
@@ -193,10 +167,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrderInService(Context context,
|
||||
OCHTaxiServiceCallback<OrderQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrderInService(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
@@ -215,10 +185,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void cancelOrder(Context context, String orderNo, int cancelType, String cancelReason,
|
||||
OCHTaxiServiceCallback<BaseData> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.cancelOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderCancelReqBean(
|
||||
@@ -237,10 +203,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryOrdersList(Context context, int page, int size,
|
||||
OCHTaxiServiceCallback<OrdersListQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryOrdersList(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrdersListQueryReqBean(
|
||||
@@ -259,10 +221,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void updateOrderStatus(Context context, String orderNo, int orderStatus,
|
||||
OCHTaxiServiceCallback<BaseData> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.updateOrderStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderStatusUpdateReqBean(
|
||||
@@ -280,10 +238,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void updateDriverServiceStatus(Context context, int status,
|
||||
OCHTaxiServiceCallback<BaseData> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.updateDriverServiceStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new DriverStatusUpdateReqBean(
|
||||
@@ -300,10 +254,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryDriverServiceStatus(Context context,
|
||||
OCHTaxiServiceCallback<DriverStatusQueryRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryDriverServiceStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
@@ -321,10 +271,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void runCarHeartbeat(Context context, double lon, double lat,
|
||||
OCHTaxiServiceCallback<BaseData> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.runCarHeartbeat(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new CarHeartbeatReqBean(
|
||||
@@ -341,10 +287,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void queryDriverServiceData(Context context,
|
||||
OCHTaxiServiceCallback<DriverServiceDataRespBean> callback) {
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.queryServiceData(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
@@ -361,10 +303,6 @@ public class OCHTaxiServiceManagerNew {
|
||||
*/
|
||||
public void updateOrderRoute(Context context, String orderNo, List<OrderRouteUpdateReqBean.Result> points,
|
||||
OCHTaxiServiceCallback<BaseData> callback){
|
||||
if ( mOCHTaxiServiceApi == null ) {
|
||||
mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(OCHTaxiServiceApiNew.class, baseUrl);
|
||||
}
|
||||
mOCHTaxiServiceApi.updateOrderRoute(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new OrderRouteUpdateReqBean(orderNo,points))
|
||||
|
||||
@@ -77,6 +77,7 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
|
||||
protected ImageView mBadcaseBtn;
|
||||
protected ImageView mUpgradeTipIv;
|
||||
protected OCHNaviFragment ochNaviFragment = null;
|
||||
// protected TaxiTrafficLightView mTrafficLightView;
|
||||
|
||||
private Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@@ -95,6 +96,10 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
|
||||
mAutopilotImage = findViewById(R.id.module_och_autopilot_iv);
|
||||
mAutopilotTv = findViewById(R.id.module_och_autopilot_tv);
|
||||
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
|
||||
|
||||
// mTrafficLightView = findViewById(R.id.taxi_traffic_light_view);
|
||||
// CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
|
||||
|
||||
mPersonalBtn = findViewById(R.id.module_och_taxi_personal_layout);
|
||||
mSpeedView = findViewById(R.id.module_mogo_och_speed_tv);
|
||||
mCloseNaviIcon = findViewById(R.id.taxi_close_navi_icon);
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.mogo.och.taxi.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/22
|
||||
*/
|
||||
public class GradientTextView extends AppCompatTextView {
|
||||
|
||||
private LinearGradient mLinearGradient;
|
||||
private Paint mPaint;
|
||||
private int mViewWidth = 0;//文字的宽度
|
||||
private int mViewHeight = 0;//文字的高度
|
||||
private Rect mTextBound = new Rect();
|
||||
private int[] mColorList;//存放颜色的数组
|
||||
private boolean isVertrial;//默认是横向
|
||||
|
||||
private float mRadius;
|
||||
private float mdx;
|
||||
private float mdy;
|
||||
private int mColor;
|
||||
|
||||
public GradientTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public GradientTextView(Context context,
|
||||
AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
//设置默认的颜色
|
||||
mColorList = new int[]{0xFFFFFFFF, 0xFFFFFFF};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
|
||||
if (isVertrial) {
|
||||
mViewHeight = getMeasuredHeight();
|
||||
} else {
|
||||
mViewWidth = getMeasuredWidth();
|
||||
}
|
||||
mPaint = getPaint();
|
||||
String mTipText = getText().toString();
|
||||
|
||||
setStyle();
|
||||
|
||||
mPaint.getTextBounds(mTipText, 0, mTipText.length(), mTextBound);
|
||||
|
||||
mPaint.setShadowLayer(mRadius, mdx, mdy, mColor);
|
||||
|
||||
//画出文字
|
||||
canvas.drawText(mTipText, getMeasuredWidth() / 2 - mTextBound.width() / 2, getMeasuredHeight() / 2 + mTextBound.height() / 2, mPaint);
|
||||
}
|
||||
|
||||
/**
|
||||
* true表示纵向渐变,false变身横向渐变
|
||||
*
|
||||
* @param vertrial
|
||||
*/
|
||||
public void setVertrial(boolean vertrial) {
|
||||
isVertrial = vertrial;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置渐变的颜色
|
||||
*
|
||||
* @param mColorList
|
||||
*/
|
||||
public void setmColorList(int[] mColorList) {
|
||||
if (mColorList != null && mColorList.length < 2) {
|
||||
throw new RuntimeException("ClorList's length must be > 2");
|
||||
} else {
|
||||
|
||||
this.mColorList = mColorList;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyle() {
|
||||
mPaint.setAntiAlias(true);
|
||||
mPaint.setDither(true);
|
||||
mPaint.setFilterBitmap(true);
|
||||
//前面4个参数分别表示渐变的开始x轴,开始y轴,结束的x轴,结束的y轴,mcolorList表示渐变的颜色数组
|
||||
mLinearGradient = new LinearGradient(0, 0, mViewWidth, mViewHeight, mColorList, null, Shader.TileMode.CLAMP);
|
||||
mPaint.setShader(mLinearGradient);
|
||||
mPaint.setStrokeJoin(Paint.Join.ROUND);
|
||||
mPaint.setStrokeCap(Paint.Cap.ROUND);
|
||||
mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置投影层
|
||||
* @param radius
|
||||
* @param dx
|
||||
* @param dy
|
||||
* @param color
|
||||
*/
|
||||
public void setShadowLayerCustom(float radius, float dx, float dy, int color) {
|
||||
this.mRadius = radius;
|
||||
this.mdx = dx;
|
||||
this.mdy = dy;
|
||||
this.mColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.mogo.och.taxi.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.taxi.R;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Taxi司机端:红绿灯view
|
||||
*
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
public class TaxiTrafficLightView extends IViewTrafficLight {
|
||||
|
||||
private ImageView mLightIconIV;
|
||||
private GradientTextView mLightTimeTV;
|
||||
private int mCurrentLightId;
|
||||
|
||||
public TaxiTrafficLightView(@Nullable Context context) {
|
||||
this(context, null, 0);
|
||||
}
|
||||
|
||||
public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_traffic_light_view, this, true);
|
||||
mLightIconIV = findViewById(R.id.taxi_traffic_light_iv);
|
||||
mLightTimeTV = findViewById(R.id.taxi_traffic_light_time_tv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
@Override
|
||||
public void disableWarningTrafficLight() {
|
||||
super.disableWarningTrafficLight();
|
||||
UiThreadHandler.post(() -> {
|
||||
mCurrentLightId = 0;
|
||||
TaxiTrafficLightView.this.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param redNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
@Override
|
||||
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
|
||||
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
|
||||
switch (mCurrentLightId) {
|
||||
case 1:
|
||||
changeCountdownRed(redNum);
|
||||
break;
|
||||
case 2:
|
||||
changeCountdownYellow(yellowNum);
|
||||
break;
|
||||
case 3:
|
||||
changeCountdownGreen(greenNum);
|
||||
break;
|
||||
default:
|
||||
UiThreadHandler.post(() -> {
|
||||
mLightTimeTV.setText("");
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownRed(int redNum) {
|
||||
super.changeCountdownRed(redNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (redNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_red_color_up),
|
||||
getResources().getColor(R.color.taxi_traffic_light_red_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(redNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownGreen(int greenNum) {
|
||||
super.changeCountdownGreen(greenNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (greenNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_green_color_up),
|
||||
getResources().getColor(R.color.taxi_traffic_light_green_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(greenNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownYellow(int yellowNum) {
|
||||
super.changeCountdownYellow(yellowNum);
|
||||
UiThreadHandler.post(() -> {
|
||||
if (yellowNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_yellow_color_up),
|
||||
getResources().getColor(R.color.taxi_traffic_light_yellow_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(yellowNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
*/
|
||||
private void updateTrafficLightIcon(int lightId) {
|
||||
UiThreadHandler.post(() -> {
|
||||
switch (lightId) {
|
||||
case 1:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.taxi_light_red_nor);
|
||||
TaxiTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 2:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.taxi_lightyellow_nor);
|
||||
TaxiTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 3:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.taxi_light_green_nor);
|
||||
TaxiTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
default:
|
||||
TaxiTrafficLightView.this.setVisibility(GONE);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#ff000000"/>
|
||||
<corners android:radius="@dimen/taxi_traffic_light_layout_corner"/>
|
||||
</shape>
|
||||
@@ -269,4 +269,14 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/taxi_close_navi_icon"/>
|
||||
|
||||
<!-- <com.mogo.och.taxi.ui.TaxiTrafficLightView-->
|
||||
<!-- android:id="@+id/taxi_traffic_light_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- android:layout_marginRight="@dimen/taxi_traffic_light_layout_margin_right"-->
|
||||
<!-- android:layout_marginTop="@dimen/taxi_traffic_light_layout_margin_top"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/taxi_traffic_light_layout_width"
|
||||
android:layout_height="@dimen/taxi_traffic_light_layout_height"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/taxi_traffic_light_bg_width"
|
||||
android:layout_height="@dimen/taxi_traffic_light_bg_height"
|
||||
android:background="@drawable/bg_taxi_traffic_light_background"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginLeft="@dimen/taxi_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/taxi_traffic_light_bg_margin_top"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_traffic_light_iv"
|
||||
android:layout_width="@dimen/taxi_traffic_light_icon_size"
|
||||
android:layout_height="@dimen/taxi_traffic_light_icon_size"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.mogo.och.taxi.ui.GradientTextView
|
||||
android:id="@+id/taxi_traffic_light_time_tv"
|
||||
android:layout_width="@dimen/taxi_traffic_light_time_view_width"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/taxi_traffic_light_time_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -88,4 +88,17 @@
|
||||
<dimen name="taxi_tab_autoaploit_height">220px</dimen>
|
||||
|
||||
<dimen name="taxi_diver_role_size">16px</dimen>
|
||||
|
||||
<dimen name="taxi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="taxi_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -89,4 +89,16 @@
|
||||
|
||||
<dimen name="taxi_diver_role_size">16px</dimen>
|
||||
|
||||
<dimen name="taxi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="taxi_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -15,4 +15,11 @@
|
||||
<color name="taxi_autopilot_text_color_checked">#FF52BBFF</color>
|
||||
|
||||
<color name="taxi_role_text_color">#4DFFFFFF</color>
|
||||
|
||||
<color name="taxi_traffic_light_red_color_up">#FFFFA28B</color>
|
||||
<color name="taxi_traffic_light_red_color_down">#FFDA1100</color>
|
||||
<color name="taxi_traffic_light_green_color_up">#FF60FFD3</color>
|
||||
<color name="taxi_traffic_light_green_color_down">#FF006D43</color>
|
||||
<color name="taxi_traffic_light_yellow_color_up">#FFFFE198</color>
|
||||
<color name="taxi_traffic_light_yellow_color_down">#FFFF9B00</color>
|
||||
</resources>
|
||||
@@ -87,4 +87,16 @@
|
||||
|
||||
<dimen name="taxi_diver_role_size">16px</dimen>
|
||||
|
||||
<dimen name="taxi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="taxi_traffic_light_layout_margin_top">23px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="taxi_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="taxi_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="taxi_traffic_light_time_size">60px</dimen>
|
||||
</resources>
|
||||
@@ -15,7 +15,7 @@
|
||||
android:resizeableActivity="false"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
android:theme="@style/Main"
|
||||
tools:replace="android:label">
|
||||
|
||||
<!-- 配置APP ID -->
|
||||
|
||||
@@ -107,9 +107,13 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxi")
|
||||
|| DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche;
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false;
|
||||
} else if (DebugConfig.getProductFlavor().equals("fPadLenovoOchBus")
|
||||
|| DebugConfig.getProductFlavor().equals("fPadLenovoOchBusPassenger")) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache;
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false;
|
||||
HmiBuildConfig.isShowBrakeLightView = false;
|
||||
HmiBuildConfig.isShowTurnLightView = false;
|
||||
}
|
||||
@@ -117,8 +121,6 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")) {
|
||||
//是否显示 限速UI
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false;
|
||||
//是否显示 红绿等
|
||||
HmiBuildConfig.isShowTrafficLightView = false;
|
||||
//是否显示 路侧监控
|
||||
HmiBuildConfig.isShowCameraView = false;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,4 @@
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
|
||||
|
||||
<color name="app_window_background">#1C1C1C</color>
|
||||
</resources>
|
||||
|
||||
@@ -8,31 +8,5 @@
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.App" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:statusBarColor" tools:ignore="NewApi">@null</item>
|
||||
<item name="android:windowEnterAnimation">@null</item>
|
||||
<item name="android:windowExitAnimation">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowBackground">@color/app_window_background</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation</item>
|
||||
</style>
|
||||
|
||||
<style name="Animation">
|
||||
<item name="android:activityOpenEnterAnimation">@null</item>
|
||||
<item name="android:activityOpenExitAnimation">@null</item>
|
||||
<item name="android:activityCloseEnterAnimation">@null</item>
|
||||
<item name="android:activityCloseExitAnimation">@null</item>
|
||||
<item name="android:taskOpenEnterAnimation">@null</item>
|
||||
<item name="android:taskOpenExitAnimation">@null</item>
|
||||
<item name="android:taskCloseEnterAnimation">@null</item>
|
||||
<item name="android:taskCloseExitAnimation">@null</item>
|
||||
<item name="android:taskToFrontEnterAnimation">@null</item>
|
||||
<item name="android:taskToFrontExitAnimation">@null</item>
|
||||
<item name="android:taskToBackEnterAnimation">@null</item>
|
||||
<item name="android:taskToBackExitAnimation">@null</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -12,8 +12,8 @@ ext {
|
||||
commonIndependentAmapApiValue : "1c3fbc5f5e183619ffb1e7bc01e6751f",
|
||||
compileSdkVersion : 29,
|
||||
buildToolsVersion : "29.0.2",
|
||||
minSdkVersion : 19,
|
||||
targetSdkVersion : 19,
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 21,
|
||||
minSdkVersionPadLenovo : 23,
|
||||
targetSdkVersionPadLenovo : 23,
|
||||
]
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_ADAS
|
||||
@@ -19,6 +18,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
|
||||
@@ -37,8 +37,6 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showAdUpgradeStatu
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showDockerRebootResult
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo
|
||||
@@ -125,21 +123,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
)
|
||||
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo?) {
|
||||
invokeAutopilotCarStateData(gnssInfo)
|
||||
// 同步给MAP地图
|
||||
if (gnssInfo != null) {
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLat = gnssInfo.latitude
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon = gnssInfo.longitude
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.satelliteTime =
|
||||
java.lang.Double.valueOf(gnssInfo.satelliteTime).toLong()
|
||||
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(
|
||||
gnssInfo
|
||||
)
|
||||
SnapshotLocationDataCenter.getInstance().syncAdasLocationInfo(gnssInfo)
|
||||
// 同步给MAP地图
|
||||
CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(gnssInfo)
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(gnssInfo.satelliteTime.toLong(),gnssInfo.longitude, gnssInfo.latitude)
|
||||
}
|
||||
//根据加速度判断 是否刹车
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrakeLightByAcceleration(gnssInfo.acceleration)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
|
||||
@@ -24,12 +29,11 @@ import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA;
|
||||
|
||||
public class MoGoHandAdasMsgManager implements
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotVehicleStateListener,
|
||||
IMoGoAutopilotCarConfigListener{
|
||||
IMoGoAutopilotCarConfigListener,
|
||||
IMoGoAutopilotCarStateListener {
|
||||
|
||||
private final String TAG = "AdasEventManager";
|
||||
|
||||
@@ -39,6 +43,7 @@ public class MoGoHandAdasMsgManager implements
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotCarConfigListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
public static MoGoHandAdasMsgManager getInstance() {
|
||||
@@ -91,17 +96,13 @@ public class MoGoHandAdasMsgManager implements
|
||||
} else {
|
||||
isShowTurnLight = false;
|
||||
}
|
||||
// CallerLogger.INSTANCE.d(M_DEVA + TAG, "onAutopilotLightSwitchData -- newState:" + state + ",oldState:" + lightSwitch.getNumber());
|
||||
CallerHmiManager.INSTANCE.showTurnLight(state);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrakeLightData(boolean brakeLight) {
|
||||
// CallerLogger.INSTANCE.d(M_DEVA + TAG, "onAutopilotBrakeLightData -- brakeLight = $brakeLight ---$isShowTurnLight");
|
||||
// if (!isShowTurnLight) {
|
||||
// CallerHmiManager.INSTANCE.showBrakeLight(brakeLight ? 1 : 0);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,22 +138,20 @@ public class MoGoHandAdasMsgManager implements
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据加速度判断是否刹车
|
||||
* @param acceleration
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotBrakeLightByAcceleration(double acceleration) {
|
||||
//设置刹车信息
|
||||
if (acceleration < -2.5) {
|
||||
brakeLight = 1;
|
||||
} else {
|
||||
brakeLight = 0;
|
||||
public void onAutopilotCarStateData(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
//根据加速度判断 是否刹车
|
||||
if (gnssInfo != null) {
|
||||
//设置刹车信息
|
||||
if (gnssInfo.getAcceleration() < -2.5) {
|
||||
brakeLight = 1;
|
||||
} else {
|
||||
brakeLight = 0;
|
||||
}
|
||||
if (!isShowTurnLight) {
|
||||
ThreadUtils.runOnUiThread(() -> CallerHmiManager.INSTANCE.showBrakeLight(brakeLight));
|
||||
}
|
||||
}
|
||||
// CallerLogger.INSTANCE.d(M_DEVA + TAG, "onAutopilotBrakeLightByAcceleration -- acceleration = " + acceleration);
|
||||
if (!isShowTurnLight) {
|
||||
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,7 +61,7 @@ internal class BadCaseView: ConstraintLayout {
|
||||
close?.onClick {
|
||||
onDismiss?.invoke()
|
||||
}
|
||||
fitsSystemWindows = true
|
||||
//fitsSystemWindows = true
|
||||
cancel?.also {
|
||||
it.background = shape(solid = Color.parseColor("#3B4577"), radius = 16)
|
||||
it.onClick {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_NETWORK
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OLD_ROUTE
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OTHER
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI_P
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
@@ -35,6 +36,7 @@ class SceneManager {
|
||||
private const val BUS = "BUS"
|
||||
private const val TAXI = "TAXI"
|
||||
private const val TAXI_P = "TAXI-P"
|
||||
private const val OTHER = "OTHER"
|
||||
|
||||
val sceneManager: SceneManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
SceneManager()
|
||||
@@ -57,6 +59,7 @@ class SceneManager {
|
||||
sceneModuleTAG.map[BUS] = SceneModule(false, M_BUS)
|
||||
sceneModuleTAG.map[TAXI] = SceneModule(false, M_TAXI)
|
||||
sceneModuleTAG.map[TAXI_P] = SceneModule(false, M_TAXI_P)
|
||||
sceneModuleTAG.map[OTHER] = SceneModule(false, M_OTHER)
|
||||
|
||||
sceneLogTAG.map[TAXI] = SceneTAG(false)
|
||||
sceneLogTAG.map[BUS] = SceneTAG(false)
|
||||
|
||||
@@ -195,14 +195,23 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 V2X 通知 代理View
|
||||
*/
|
||||
override fun setProxyNotificationView(view: IViewNotification) {
|
||||
mViewNotification = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
override fun setProxyTrafficLightView(view: IViewTrafficLight) {
|
||||
mViewTrafficLight = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 限速 代理View
|
||||
*/
|
||||
override fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
|
||||
mViewLimitingVelocity = view
|
||||
}
|
||||
@@ -237,7 +246,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
.setTag("ToolsViewFloat")
|
||||
.setLayout(toolsView!!)
|
||||
.setSidePattern(SidePattern.LEFT)
|
||||
.setGravity(Gravity.LEFT, offsetY = 72)
|
||||
.setGravity(Gravity.LEFT)
|
||||
.setImmersionStatusBar(true)
|
||||
.setWindowHeight(WindowManager.LayoutParams.MATCH_PARENT)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
@@ -756,7 +765,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
.setTag("CameraListFloat")
|
||||
.setLayout(cameraListView!!)
|
||||
.setSidePattern(SidePattern.RIGHT)
|
||||
.setGravity(Gravity.RIGHT, -40, 280)
|
||||
.setGravity(Gravity.RIGHT, -40, 255)
|
||||
.setImmersionStatusBar(true)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||
import com.mogo.eagle.core.data.notice.NoticeValue;
|
||||
import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
@@ -173,13 +174,11 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
parameters.vehicleType = 10;
|
||||
//云平台使用的是火星坐标,自动驾驶需要wgs84
|
||||
double[] gcj02 = CoordinateUtils.transformGcj02toWgs84(mTrafficStyleInfo.getLat(), mTrafficStyleInfo.getLon());
|
||||
AutopilotControlParameters.AutoPilotLonLat startLocation = new AutopilotControlParameters.AutoPilotLonLat
|
||||
(MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat());
|
||||
parameters.startLatLon = startLocation;
|
||||
AutopilotControlParameters.AutoPilotLonLat endLocation = new AutopilotControlParameters.AutoPilotLonLat
|
||||
parameters.startLatLon = new AutopilotControlParameters.AutoPilotLonLat
|
||||
(CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon());
|
||||
parameters.endLatLon = new AutopilotControlParameters.AutoPilotLonLat
|
||||
(gcj02[0], gcj02[1]);
|
||||
parameters.endLatLon = endLocation;
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
|
||||
}
|
||||
|
||||
|
||||
@@ -845,6 +845,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
SceneConstant.M_TAXI -> cbTaxiLog.isChecked = log
|
||||
//TAXI_P日志标签
|
||||
SceneConstant.M_TAXI_P -> cbTaxiPLog.isChecked = log
|
||||
//其他模块日志(暂未区分具体模块)
|
||||
SceneConstant.M_OTHER -> cbOtherLog.isChecked = log
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -942,6 +944,12 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
sceneMap[SceneConstant.M_TAXI_P] = taxiPModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//其他未分类模块日志
|
||||
cbOtherLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val otherModule = SceneModule(isChecked, SceneConstant.M_OTHER)
|
||||
sceneMap[SceneConstant.M_OTHER] = otherModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
|
||||
//开始停止抓取全量日志
|
||||
tbLogCatch.isChecked =
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
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.CallerAutoPilotStatusListenerManager.getCurWgs84Lat
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -84,10 +86,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
currentAutopilot.endName = "HYJC"
|
||||
currentAutopilot.isSpeakVoice = false
|
||||
currentAutopilot.startLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLat,
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon
|
||||
)
|
||||
AutopilotControlParameters.AutoPilotLonLat(getCurWgs84Lat(),getCurWgs84Lon())
|
||||
currentAutopilot.endLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867)
|
||||
currentAutopilot.vehicleType = 10
|
||||
|
||||
@@ -53,6 +53,18 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewSpeedChart"
|
||||
app:layout_goneMarginStart="@dimen/module_mogo_autopilot_status_margin_left" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCameraIcon"
|
||||
android:layout_width="130px"
|
||||
android:layout_height="130px"
|
||||
android:layout_marginTop="38px"
|
||||
android:layout_marginEnd="40px"
|
||||
android:background="@drawable/icon_camera_nor"
|
||||
app:layout_constraintEnd_toStartOf="@id/viewTrafficLightVr"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TrafficLightView
|
||||
android:id="@+id/viewTrafficLightVr"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -66,14 +78,6 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.SpeedLimitStatusView-->
|
||||
<!-- android:id="@+id/viewSpeedLimitStatusView"-->
|
||||
<!-- android:layout_width="130px"-->
|
||||
<!-- android:layout_height="130px"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/viewTrafficLightVr"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/viewTrafficLightVr"-->
|
||||
<!-- tools:ignore="MissingConstraints"/>-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.PerspectiveSwitchView
|
||||
android:id="@+id/viewPerspectiveSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -97,49 +101,38 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewPerspectiveSwitch"
|
||||
app:layout_goneMarginStart="50px" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vsBadCaseToolsView"
|
||||
android:layout_width="@dimen/module_hmi_check_size"
|
||||
android:layout_height="@dimen/module_hmi_check_size"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginBottom="40px"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/icon_car_ap_badcase_entrance"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivToolsIcon"
|
||||
app:layout_goneMarginStart="50px"/>
|
||||
app:layout_goneMarginStart="50px" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUpgradeTips"
|
||||
android:layout_width="22px"
|
||||
android:layout_height="22px"
|
||||
app:layout_constraintCircle="@id/ivToolsIcon"
|
||||
app:layout_constraintCircleAngle="45"
|
||||
app:layout_constraintCircleRadius="60px"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30px"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
app:layout_constraintCircle="@id/ivToolsIcon"
|
||||
app:layout_constraintCircleAngle="45"
|
||||
app:layout_constraintCircleRadius="60px"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCameraIcon"
|
||||
android:layout_width="130px"
|
||||
android:layout_height="130px"
|
||||
android:layout_marginTop="38px"
|
||||
android:layout_marginEnd="40px"
|
||||
android:background="@drawable/icon_camera_nor"
|
||||
app:layout_constraintEnd_toStartOf="@id/viewTrafficLightVr"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
|
||||
android:id="@+id/viewLimitingVelocity"
|
||||
android:layout_width="130px"
|
||||
android:layout_height="130px"
|
||||
android:layout_marginTop="30px"
|
||||
android:layout_marginEnd="40px"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
@@ -149,7 +142,6 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
android:layout_marginEnd="40px"
|
||||
app:layout_goneMarginEnd="40px"
|
||||
app:layout_goneMarginTop="40px"
|
||||
tools:visibility="visible" />
|
||||
@@ -159,23 +151,23 @@
|
||||
android:id="@+id/turnLightView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="42px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="42px" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--刹车ui-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.BrakeViewStatus
|
||||
android:id="@+id/brakeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="42px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="42px" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1368,7 +1368,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="TAXI_P日志" />
|
||||
android:text="乘客屏日志" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbOtherLog"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="其他模块日志" />
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister;
|
||||
|
||||
@@ -305,7 +305,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
// 开启Socket长链服务
|
||||
double lat = location.getLatitude();
|
||||
double lon = location.getLongitude();
|
||||
CallerLogger.INSTANCE.d(M_MAIN + TAG,"emArrow lat : " + lat + " , lon : " + lon);
|
||||
apis.getSocketManagerApi(getApplicationContext()).init(getApplicationContext(), DebugConfig.getSocketAppId(),lat,lon);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
CallerLogger.INSTANCE.d(M_MAIN + TAG, "5秒已过,启动基础服务……");
|
||||
loadBaseModules();
|
||||
initADAS();
|
||||
initGpsSimulatorListener();
|
||||
HdMapBuildConfig.isMapLoaded = true;
|
||||
}, 5_000L
|
||||
@@ -97,12 +96,6 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
MogoModulesManager.getInstance().loadBaseModule();
|
||||
}
|
||||
|
||||
private void initADAS() {
|
||||
if (mServiceApis != null) {
|
||||
mServiceApis.getAdasControllerApi().init(AbsMogoApplication.getApp());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(MogoLocation location) {
|
||||
EventDispatchCenter.getInstance().onLocationChanged(location);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/module_main_window_background_color"
|
||||
android:background="@drawable/main_splash_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 地图 -->
|
||||
@@ -13,109 +13,104 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_special_effect"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingTop="25dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wu1"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_special_effect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:src="@drawable/wu1"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wu2"
|
||||
android:layout_width="wrap_content"
|
||||
<ImageView
|
||||
android:id="@+id/iv_wu1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:src="@drawable/wu1"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wu2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:src="@drawable/wu2"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!--预警视图 OBU、云端下发、自车感知、自车策略-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_waring_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 快捷操作浮层 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_entrance_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:src="@drawable/wu2"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
|
||||
|
||||
<!--预警视图 OBU、云端下发、自车感知、自车策略-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_waring_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 浮层-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_floating_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 快捷操作浮层 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_entrance_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
|
||||
<!-- 目的地车友 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_message_history_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
|
||||
|
||||
<!-- 浮层-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_floating_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 右边事件面板 -->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/module_main_id_event_panel_fragment_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"-->
|
||||
<!-- android:paddingLeft="@dimen/module_main_event_panel_fragment_paddingLeft"-->
|
||||
<!-- android:paddingTop="@dimen/module_main_event_panel_fragment_paddingTop"-->
|
||||
<!-- android:paddingRight="@dimen/module_main_event_panel_fragment_paddingRight"-->
|
||||
<!-- android:paddingBottom="@dimen/module_main_event_panel_fragment_paddingBottom" />-->
|
||||
|
||||
<!-- 目的地车友 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_message_history_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
|
||||
|
||||
<!--搜索视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!--搜索视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<!--网约车视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_och_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!--网约车视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_och_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--小地图视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_smp_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!--小地图视图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_smp_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--冷启动过渡Logo-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/module_main_id_cover_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/main_splash_bg">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/main_bitmap_splash_icon"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.47" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!--冷启动过渡Logo-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/module_main_id_cover_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/main_splash_bg">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/main_bitmap_splash_icon"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.47" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_main_window_background_color">#212831</color>
|
||||
|
||||
</resources>
|
||||
@@ -2,8 +2,12 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Main" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:statusBarColor" tools:ignore="NewApi">@null</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowOverscan">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent
|
||||
</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowEnterAnimation">@null</item>
|
||||
<item name="android:windowExitAnimation">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
|
||||
import com.mogo.map.MogoLocationClient
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.constants.HostConst
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
@@ -25,10 +24,6 @@ class CronTaskManager(private var context: Context?) {
|
||||
private const val CRON_TASK_TYPE = 1011
|
||||
}
|
||||
|
||||
private val netWork by lazy {
|
||||
MogoApisHandler.getInstance().apis.networkApi
|
||||
}
|
||||
|
||||
// 请求路侧摄像头
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
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.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
|
||||
@@ -17,9 +19,6 @@ import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter
|
||||
import com.mogo.module.common.drawer.TrafficMarkerDrawer
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
@@ -169,21 +168,13 @@ class MogoPrivateObuManager private constructor() {
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
try {
|
||||
data.putOpt("receiverDataTime", System.currentTimeMillis())
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
try {
|
||||
data.putOpt("adasSatelliteTime", System.currentTimeMillis())
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统,1-工控机,2-OBU
|
||||
if (2 == FunctionBuildConfig.gpsProvider) {
|
||||
MogoMapUIController.getInstance().syncLocation2Map(data)
|
||||
SnapshotLocationDataCenter.getInstance().syncAdasLocationInfo(data)
|
||||
// 同步给MAP地图
|
||||
CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(data)
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(System.currentTimeMillis(),position.longitude, position.latitude)
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.content.IntentFilter
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings.System
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -29,6 +28,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooC
|
||||
import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_EXTRA_KEY
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_HANDLER_ACTION
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME
|
||||
@@ -56,7 +56,6 @@ import com.mogo.module.common.entity.*
|
||||
import com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum.FOURS_BLOCK_UP
|
||||
import com.mogo.module.common.utils.Const
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
|
||||
@@ -209,8 +208,8 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
v2XMessageEntity.isOnlyShow = true
|
||||
v2XMessageEntity.isNeedAddLine = false
|
||||
v2XMessageEntity.content = roadEventEntity
|
||||
val intent = Intent(Const.BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(Const.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity)
|
||||
val intent = Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity)
|
||||
LocalBroadcastManager.getInstance(context()).sendBroadcast(intent)
|
||||
//埋点
|
||||
TrackUtils.trackV2XMarkerClick(2)
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
|
||||
@@ -13,7 +14,6 @@ import com.mogo.map.MogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
@@ -78,8 +78,8 @@ public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager {
|
||||
|
||||
// 当前车辆位置
|
||||
MogoLatLng carLocation = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon()
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon()
|
||||
);
|
||||
|
||||
if (carLocation != null) {
|
||||
|
||||
@@ -4,9 +4,7 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.call.chat.CallerChatManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
@@ -17,9 +18,9 @@ import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -65,38 +66,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
// 存储本地,出行动态作展示
|
||||
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
|
||||
v2XMessageEntity.getContent().getNoveltyInfo());
|
||||
} else if (sceneType == 3) {//触发H5推送事件
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioPushEventData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 4) {//触发H5推送直播事件
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioPushLiveEventData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 5) {//H5推送触发V2X动画
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioAnimationEventData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 6) {//查看前车直播
|
||||
//V2XVoiceCallLiveBiz.getInstance().getFrontCarLive();
|
||||
} else if (sceneType == 7) {//查看前方路口直播
|
||||
//V2XVoiceCallLiveBiz.getInstance().getOpenRoadCameraLive();
|
||||
} else if (sceneType == 8) {//触发疲劳驾驶
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioFatigueDrivingData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 9) {//触发他人发起道路求助事件
|
||||
V2XMessageEntity<List<V2XSpecialCarRes.V2XMarkerEntity>> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioSeekHelpData();
|
||||
@@ -137,7 +106,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
V2XRefreshModel model = BridgeApi.INSTANCE.refreshModel();
|
||||
model.
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData("F803EB2046PZD00149");
|
||||
} */else if (sceneType == 17) {//最优路线推荐
|
||||
} */ else if (sceneType == 17) {//最优路线推荐
|
||||
V2XMessageEntity<V2XOptimalRouteDataRes> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XOptimalRoute();
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
@@ -43,8 +44,8 @@ public class V2XWarningMarker implements IV2XMarker {
|
||||
private final List fillPoints = new ArrayList();//停止线经纬度合集
|
||||
private boolean isFirstLocation = false;
|
||||
private MogoLatLng carLocation = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon()
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon()
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/4/3 6:54 PM
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public class ADASUtils {
|
||||
/**
|
||||
* 广播给ADAS进行展示
|
||||
*
|
||||
* @param v2XRoadEventEntity 广播信息
|
||||
*/
|
||||
public static void broadcastToADAS(Context context, V2XRoadEventEntity v2XRoadEventEntity) {
|
||||
try {
|
||||
V2XPushMessageEntity v2XAlarmMessage = new V2XPushMessageEntity();
|
||||
v2XAlarmMessage.setTts(v2XRoadEventEntity.getTts());
|
||||
v2XAlarmMessage.setAlarmContent(v2XRoadEventEntity.getAlarmContent());
|
||||
v2XAlarmMessage.setExpireTime(v2XRoadEventEntity.getExpireTime());
|
||||
v2XAlarmMessage.setSceneId(v2XRoadEventEntity.getPoiType());
|
||||
|
||||
broadcastToADAS(context, v2XAlarmMessage);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 广播给ADAS进行展示
|
||||
*
|
||||
* @param alarmMessage 广播信息
|
||||
*/
|
||||
public static void broadcastToADAS(Context context, V2XPushMessageEntity alarmMessage) {
|
||||
try {
|
||||
Intent intent = new Intent("com.mogo.launcher.v2x");
|
||||
intent.putExtra("v2x_warning_type", alarmMessage.getSceneId());
|
||||
intent.putExtra("v2x_warning_timeout", alarmMessage.getExpireTime());
|
||||
intent.putExtra("v2x_warning_tts", alarmMessage.getTts());
|
||||
intent.putExtra("v2x_warning_info", alarmMessage.getAlarmContent());
|
||||
context.sendBroadcast(intent);
|
||||
|
||||
// 这里是兼容 1+16G 版本没有ADAS的时候自身进行TTS
|
||||
if (!AppUtils.isAppInstalled(context, "com.zhidao.autopilot")) {
|
||||
speakTTSVoice(alarmMessage.getTts(), null);
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.i(M_V2X + "ADASUtils", "向ADAS分发服务器下发的事件," + alarmMessage.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void speakTTSVoice(@Nullable String msg, IMogoVoiceCmdCallBack callBack) {
|
||||
if (!TextUtils.isEmpty(msg)) {
|
||||
CallerLogger.INSTANCE.w(M_V2X + "ADASUtils", "调用TTS播放语音:" + msg);
|
||||
AIAssist.getInstance(Utils.getApp()).speakTTSVoice(msg, VoicePreemptType.PREEMPT_TYPE_IMMEADIATELY, callBack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
@@ -31,8 +32,8 @@ public class LocationUtils {
|
||||
public static MogoLatLng getCurrentLatLon() {
|
||||
// 当前车辆位置
|
||||
MogoLatLng latLon = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon()
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon()
|
||||
);
|
||||
IMogoLocationClient locationClient = CallerMapUIServiceManager.INSTANCE.getSingletonLocationClient(AbsMogoApplication.getApp());
|
||||
if (locationClient != null) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.utils
|
||||
import android.content.Context
|
||||
import android.graphics.Rect
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.utilcode.util.WindowUtils
|
||||
@@ -42,8 +43,8 @@ class MapUtils {
|
||||
mBoundRect.right = paddingRight
|
||||
// 当前车辆位置
|
||||
val carLocation = MogoLatLng(
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLat,
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84Lat(),
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84Lon()
|
||||
)
|
||||
// 调整自适应的地图镜头
|
||||
carLocation?.let {
|
||||
|
||||
@@ -9,9 +9,9 @@ import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.entity.V2XWarningEntity;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
@@ -126,39 +126,6 @@ public class TestOnLineCarUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟H5推送数据
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarioPushEventData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_push_event_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试数据
|
||||
*/
|
||||
@@ -198,138 +165,6 @@ public class TestOnLineCarUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟H5推送直播数据
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarioPushLiveEventData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_push_live_event_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟H5推送场景动画数据
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarioAnimationEventData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_push_animation_event_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟H5推送场景--十字路口碰撞
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarioCrossCrash() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_push_cross_crash);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟 疲劳驾驶
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarioFatigueDrivingData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_fatigue_driving_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity =
|
||||
GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟 道路求助
|
||||
@@ -399,39 +234,6 @@ public class TestOnLineCarUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 逆向车辆路线预判
|
||||
*/
|
||||
public static V2XMessageEntity<V2XPushMessageEntity> getV2XScenarionVRReverseCarData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_push_vr_reverse_car_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 模拟最优路线推送
|
||||
|
||||
@@ -46,7 +46,7 @@ import java.util.List;
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
|
||||
|
||||
/**
|
||||
* author : donghongyu EmArrow
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-02-06 23:07
|
||||
* update : 2021-04-01 17:30
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androud="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!--周边-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_surrounding_event"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:gravity="center_vertical"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
<!-- android:layout_centerInParent="true"-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center|center_horizontal"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/v2x_item_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!--列表相关-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginBottom="@dimen/module_v2x_panel_surrounding_marginbottom">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!--空数据显示-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toLeftOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/center_empty"
|
||||
android:layout_width="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_height="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toRightOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/v2x_white_refresh"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.mogo.module.common.view.NetworkLoadingView
|
||||
android:id="@+id/loading_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_height">
|
||||
<!-- android:layout_marginBottom="@dimen/module_v2x_surrounding_item_margin_left"-->
|
||||
|
||||
<!-- android:layout_marginLeft="@dimen/module_v2x_surrounding_item_margin_left"-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- @dimen/module_v2x_surrounding_item_width-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
<!-- android:src="@drawable/mogo_image_nongwu_nor" bg_v2x_event_surrounding_item_bottom-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/v2x_surrounding_bottom_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_type"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_item_bottom_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_bottom_image_height"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_item_marigin_left" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_poitype"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_item_marigin_bottom_left"
|
||||
android:layout_toRightOf="@+id/iv_event_type"
|
||||
android:gravity="center_vertical"
|
||||
android:text="求助"
|
||||
android:textColor="@color/v2x_item_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_item_bottom_left_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info_total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_item_marigin_left"
|
||||
android:text="23条"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:textSize="@dimen/module_v2x_surrounding_item_bottom_right_textsize" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/module_services_online_car_panel_background"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgTabSelect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_panel_tab_height"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbScenarioHistory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_48"
|
||||
android:paddingEnd="@dimen/dp_35"
|
||||
android:text="出行动态"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#CE757575" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbSurroundingEvent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_35"
|
||||
android:paddingEnd="@dimen/dp_35"
|
||||
android:text="周边事件"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_36" />
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#CE757575" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbShareEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_35"
|
||||
android:paddingEnd="@dimen/dp_35"
|
||||
android:text="我的分享"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_36" />
|
||||
</RadioGroup>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vpEventPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rgTabSelect" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnHidePanels"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_79"
|
||||
android:layout_marginRight="@dimen/dp_50"
|
||||
android:background="@drawable/module_common_close_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rgTabSelect"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/rgTabSelect" />
|
||||
|
||||
|
||||
<!--顶部layout-->
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:layout_width="43px"
|
||||
android:layout_height="43px"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:src="@drawable/v2x_back_image"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="18px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="19px"
|
||||
android:layout_marginTop="26px"
|
||||
app:layout_constraintLeft_toRightOf="@+id/back_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:visibility="gone"
|
||||
android:textSize="18px" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_detail_recycleview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:layout_marginTop="90px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/back_image"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left" />
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="58px"-->
|
||||
<!-- android:background="@drawable/v2x_shadow_shape_view"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.mogo.eagle.core.function.v2x.events.view.V2XListEmptyView
|
||||
android:id="@+id/viewEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/clHistoryList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_48"
|
||||
android:paddingEnd="@dimen/dp_48">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="今日出行遇到的交通事件"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="@dimen/dp_30"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:listitem="@layout/item_v2x_illegal_parking" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_50"
|
||||
android:layout_marginRight="@dimen/dp_50"
|
||||
android:layout_marginBottom="14px"
|
||||
android:background="@drawable/bg_v2x_event_description"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_guide_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:alpha="0.8"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="20px"
|
||||
android:paddingTop="@dimen/dp_26"
|
||||
android:text="小窍门:分享路况,点赞其他车主,有助于提高热心指数"
|
||||
android:textColor="@color/v2x_share_des_title_color"
|
||||
android:textSize="@dimen/share_top_text_size">
|
||||
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="14px">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/share_des_num_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shre_num_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center"
|
||||
android:paddingBottom="@dimen/des_text_margin_bottom"
|
||||
android:text="分享次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/share_index_des_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="46px"
|
||||
android:layout_marginTop="20px"
|
||||
android:alpha="0.3"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_approve"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/share_des_num_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_approve_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:paddingBottom="@dimen/des_text_margin_bottom"
|
||||
android:text="车友认同次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/share_index_des_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="46px"
|
||||
android:layout_marginTop="20px"
|
||||
android:alpha="0.3"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/v2x_index_rating_top">
|
||||
|
||||
<com.mogo.module.common.view.CustomRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:OtherHeartImg="false" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_index_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/share_approve_des"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/share_index_bottom_padding"
|
||||
android:text="热心指数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/share_index_des_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/no_share_image"
|
||||
android:layout_width="@dimen/share_empty_icon_width"
|
||||
android:layout_height="@dimen/share_empty_icon_width"
|
||||
android:layout_marginTop="@dimen/share_empty_margin_top"
|
||||
android:src="@drawable/icon_share_empty" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_null_des"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/no_share_image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/share_empty_btn_padding"
|
||||
android:alpha="0.7"
|
||||
android:gravity="bottom"
|
||||
android:text="你还没有分享过道路事件,快去试试吧"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/share_empty_btn_padding"
|
||||
android:paddingBottom="@dimen/dp_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_button"
|
||||
android:layout_width="@dimen/v2x_share_btn_width"
|
||||
android:layout_height="@dimen/v2x_share_btn_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_toLeftOf="@id/center"
|
||||
android:background="@drawable/v2x_bkg_dark_light_same"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:onClick="shareEventAction"
|
||||
android:text="去分享"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
<View
|
||||
android:id="@+id/center"
|
||||
android:layout_width="@dimen/share_btn_middle_padding"
|
||||
android:layout_height="@dimen/share_btn_middle_padding"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/refresh_button"
|
||||
android:layout_width="@dimen/v2x_share_btn_width"
|
||||
android:layout_height="@dimen/v2x_share_btn_height"
|
||||
android:layout_toRightOf="@id/center"
|
||||
android:background="@drawable/module_dw_common_corner_bkg_light"
|
||||
android:gravity="center"
|
||||
android:text="刷新"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/road_case_liset_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_50"
|
||||
android:layout_marginRight="@dimen/dp_50"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:background="@drawable/bg_v2x_event_list_item">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/road_case_useless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/road_case_style"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/useless_padding_right"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/v2x_share_item_unlike" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useless_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/road_case_style"
|
||||
android:layout_alignLeft="@+id/road_case_useless"
|
||||
android:paddingLeft="@dimen/num_padding_left"
|
||||
android:text="10000"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/share_item_text_size" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/road_case_useful"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/road_case_style"
|
||||
android:layout_toLeftOf="@id/road_case_useless"
|
||||
android:clickable="false"
|
||||
android:paddingRight="@dimen/useful_image_padding_right"
|
||||
android:src="@drawable/v2x_share_item_like" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useful_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/road_case_style"
|
||||
android:layout_alignLeft="@+id/road_case_useful"
|
||||
android:gravity="left"
|
||||
android:paddingLeft="@dimen/num_padding_left"
|
||||
android:text="10009"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/share_item_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_45"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_35"
|
||||
android:ellipsize="end"
|
||||
android:gravity="left"
|
||||
android:lines="1"
|
||||
android:text="东城区北三环附近打卡"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/share_item_address"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_share_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/road_case_address"
|
||||
android:layout_alignLeft="@id/road_case_style"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:alpha="0.5"
|
||||
android:gravity="left"
|
||||
android:text="时间:"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="@dimen/share_item_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/road_case_share_time"
|
||||
android:layout_alignLeft="@+id/road_case_address"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginBottom="@dimen/dp_36"
|
||||
android:background="@drawable/bg_v2x_event_type_read"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingRight="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:text="道路类型"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/panel_list_item_title_size" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/road_case_share_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
<com.mogo.module.common.view.NetworkLoadingView
|
||||
android:id="@+id/network_loading_imageview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
</com.mogo.module.common.view.NetworkLoadingView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/surrounding_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_v2x_surrounding_event_list_item">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_road_type_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_30"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@+id/surrounding_road_like"
|
||||
app:layout_constraintStart_toStartOf="@id/surrounding_road_type"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="小黄庄北街与北三环辅路交叉口" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="16px"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="6px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
|
||||
tools:text="小蘑菇" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="16px"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="6px"
|
||||
app:layout_constraintStart_toEndOf="@+id/surrounding_username"
|
||||
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
|
||||
tools:text="2020-1-12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_road_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="6px"
|
||||
android:layout_marginBottom="@dimen/dp_36"
|
||||
android:background="@drawable/bg_v2x_event_type_read"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="6px"
|
||||
android:paddingTop="3px"
|
||||
android:paddingRight="6px"
|
||||
android:paddingBottom="3px"
|
||||
android:text="违章停车"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="14px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/surrounding_username" />
|
||||
|
||||
<com.mogo.eagle.core.function.v2x.events.view.HeartLikeView
|
||||
android:id="@+id/surrounding_road_like"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
app:showGrayBack="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/surrounding_road_unlike"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.v2x.events.view.HeartUnLikeView
|
||||
android:id="@+id/surrounding_road_unlike"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="26px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/topResource"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@drawable/v2x_stop_line" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bottomBg"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/module_v2n_tip_width"
|
||||
android:layout_height="@dimen/module_v2n_tip_height"
|
||||
android:layout_marginLeft="@dimen/dp_190"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/v2x_front_warning_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/warning_type_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/module_v2n_image_margin_left"
|
||||
android:src="@drawable/icon_warning_v2x_collision_warning" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warning_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/warning_distance_right"
|
||||
android:maxWidth="@dimen/module_v2n_tip_text_width"
|
||||
android:text="1米"
|
||||
android:textColor="@color/v2x_FF3036"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warning_content_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@+id/warning_distance"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/module_v2n_tip_text_margin_right"
|
||||
android:layout_toRightOf="@+id/warning_type_image"
|
||||
android:text="前车碰撞预警"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -28,6 +28,7 @@ class AutopilotStatusInfo : Serializable {
|
||||
var locationStatus = false
|
||||
var locationLat = 0.0
|
||||
var locationLon = 0.0
|
||||
var satelliteTime = 0L
|
||||
|
||||
/**
|
||||
* 车速 m/s
|
||||
|
||||
@@ -37,14 +37,6 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_UTILS_ANALYTICS = "/utils/analytics";
|
||||
|
||||
|
||||
/**
|
||||
* 网络服务接口路径
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_SERVICES_NETWORK = "/networkservices/api";
|
||||
|
||||
/**
|
||||
* netty 长链
|
||||
*/
|
||||
@@ -117,13 +109,6 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_DATA_MANAGER = "/datamanager/api";
|
||||
|
||||
/**
|
||||
* adas 控制
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_ADAS_CONTROLLER = "/adascontroller/api";
|
||||
|
||||
/**
|
||||
* 接口集合
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
* @date 2021/8/17 8:41 下午
|
||||
* 交通元素数据,
|
||||
*/
|
||||
class /**/TrafficData {
|
||||
class TrafficData {
|
||||
/**
|
||||
* 交通元素类型, 车、人、摩托、大巴车、卡车、自行车
|
||||
*/
|
||||
|
||||
@@ -19,8 +19,4 @@ interface IMoGoAutopilotVehicleStateListener {
|
||||
*/
|
||||
fun onAutopilotBrakeLightData(brakeLight: Boolean)
|
||||
|
||||
/**
|
||||
* 车辆刹车灯 根据加速度
|
||||
*/
|
||||
fun onAutopilotBrakeLightByAcceleration(acceleration: Double)
|
||||
}
|
||||
@@ -37,6 +37,38 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
return GsonUtils.toJson(mAutopilotStatusInfo)
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过Gnss定位更新来同步更新自动驾驶状态
|
||||
*/
|
||||
fun updateAutoPilotLatLon(satelliteTime: Long, lon: Double, lat: Double) {
|
||||
mAutopilotStatusInfo.locationLat = lat
|
||||
mAutopilotStatusInfo.locationLon = lon
|
||||
mAutopilotStatusInfo.satelliteTime = satelliteTime
|
||||
mAutopilotStatusInfo.locationStatus = true
|
||||
invokeAutoPilotStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时刻WGS84 lat
|
||||
*/
|
||||
fun getCurWgs84Lat(): Double {
|
||||
return mAutopilotStatusInfo.locationLat
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时刻WGS84 lon
|
||||
*/
|
||||
fun getCurWgs84Lon(): Double {
|
||||
return mAutopilotStatusInfo.locationLon
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时刻WGS84 卫星时间
|
||||
*/
|
||||
fun getCurWgs84SatelliteTime(): Long {
|
||||
return mAutopilotStatusInfo.satelliteTime
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加 ADAS状态 监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
|
||||
@@ -13,7 +13,7 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
|
||||
// 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步
|
||||
private val M_AUTOPILOT_VEHICLE_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotVehicleStateListener> =
|
||||
ConcurrentHashMap()
|
||||
ConcurrentHashMap()
|
||||
|
||||
/**
|
||||
* 添加 ADAS车辆状态&定位 监听
|
||||
@@ -21,8 +21,8 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
fun addListener(
|
||||
@Nullable tag: String,
|
||||
@Nullable listener: IMoGoAutopilotVehicleStateListener
|
||||
@Nullable tag: String,
|
||||
@Nullable listener: IMoGoAutopilotVehicleStateListener
|
||||
) {
|
||||
if (M_AUTOPILOT_VEHICLE_LISTENERS.containsKey(tag)) {
|
||||
return
|
||||
@@ -77,16 +77,5 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆刹车根据加速度判断
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotBrakeLightByAcceleration(accrleration: Double) {
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotBrakeLightByAcceleration(accrleration)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class Scene {
|
||||
val routeMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OLD_ROUTE] = routeMap
|
||||
//初始化其他模块,方便定位索引
|
||||
val otherMap = SceneLogCache(mutableMapOf(), true)
|
||||
val otherMap = SceneLogCache(mutableMapOf(), false)
|
||||
sceneCache[M_OTHER] = otherMap
|
||||
//初始化TAXI
|
||||
val taxiMap = SceneLogCache(mutableMapOf(), false)
|
||||
|
||||