Merge branch 'dev_hengyang_base' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev_hengyang_base
This commit is contained in:
1
.idea/runConfigurations.xml
generated
1
.idea/runConfigurations.xml
generated
@@ -3,7 +3,6 @@
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:radius="17px" />
|
||||
<corners android:radius="32px" />
|
||||
<solid android:color="#3B4577"/>
|
||||
</shape>
|
||||
</item>
|
||||
@@ -12,7 +12,7 @@
|
||||
android:right="3px"
|
||||
android:top="3px">
|
||||
<shape>
|
||||
<corners android:radius="17px" />
|
||||
<corners android:radius="32px" />
|
||||
<solid android:color="#3B4577"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -132,12 +132,12 @@ class MogoOCHTaxiModel {
|
||||
.getApis()
|
||||
.getIntentManagerApi()
|
||||
.registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
restoreOrderInfo();
|
||||
}
|
||||
if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
querryCarStatus();
|
||||
}
|
||||
// if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
// restoreOrderInfo();
|
||||
// }
|
||||
// if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
// querryCarStatus();
|
||||
// }
|
||||
}
|
||||
|
||||
public void querryCarStatus() {
|
||||
@@ -148,7 +148,7 @@ class MogoOCHTaxiModel {
|
||||
@Override
|
||||
public void onSuccess(OCHCarStatusResponse data) {
|
||||
super.onSuccess(data);
|
||||
Logger.e(TAG,"OCHCarStatusResponse:"+data.data.status);
|
||||
Logger.e(TAG,"querryCarStatus:"+data.data.status);
|
||||
mOCHRHCarstatus = data.data.status;
|
||||
//更新view
|
||||
OCHTaxiUiController.getInstance().onOperationChanged(mOCHRHCarstatus==1);
|
||||
@@ -159,13 +159,13 @@ class MogoOCHTaxiModel {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.e(TAG,"OCHCarStatusResponse:"+e.getMessage());
|
||||
Logger.e(TAG,"querryCarStatus:"+e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message,code);
|
||||
Logger.e(TAG,"OCHCarStatusResponse:"+message);
|
||||
Logger.e(TAG,"querryCarStatus:"+message);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -189,19 +189,9 @@ class MogoOCHTaxiModel {
|
||||
Logger.d(TAG,"restoreOrderInfo:"+orderInfo);
|
||||
if ( !TextUtils.isEmpty( orderInfo ) ) {
|
||||
mCurrentOCHOrder = GsonUtil.objectFromJson( orderInfo, OCHTaxiOrderResponse.class );
|
||||
if ( mCurrentOCHOrder == null ) {
|
||||
// 解决本地没有缓存订单号的问题
|
||||
query2RestoreOrderStatus( null );
|
||||
} else {
|
||||
query2RestoreOrderStatus( mCurrentOCHOrder.orderNo );
|
||||
}
|
||||
} else {
|
||||
// 解决本地没有缓存订单号的问题
|
||||
query2RestoreOrderStatus( null );
|
||||
}
|
||||
} else {
|
||||
query2RestoreOrderStatus( mCurrentOCHOrder.orderNo );
|
||||
}
|
||||
query2RestoreOrderStatus(mCurrentOCHOrder == null ? null : mCurrentOCHOrder.orderNo);
|
||||
}
|
||||
|
||||
// private void restoreOrderInfo_() {
|
||||
@@ -244,7 +234,7 @@ class MogoOCHTaxiModel {
|
||||
@Override
|
||||
public void onSuccess( OCHTaxiOrderResponse2 data ) {
|
||||
|
||||
if ( data == null || data.data == null ) {
|
||||
if ( data == null || data.data == null) {
|
||||
Logger.d( TAG, "订单已取消或已完成" );
|
||||
clearCurrentOCHOrder();
|
||||
OCHTaxiUiController.getInstance().onOrderStatusChanged(OCHOrderStatus.None.getCode());
|
||||
@@ -359,7 +349,8 @@ class MogoOCHTaxiModel {
|
||||
Logger.d( TAG, "onIntentReceived = %s", intentStr );
|
||||
if ( ConnectivityManager.CONNECTIVITY_ACTION.equals( intentStr ) ) {
|
||||
if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
restoreOrderInfo();
|
||||
// restoreOrderInfo();
|
||||
querryCarStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,6 +375,7 @@ class MogoOCHTaxiModel {
|
||||
@Override
|
||||
public void onSuccess(OCHCarStatusResponse o) {
|
||||
super.onSuccess(o);
|
||||
Logger.d(TAG,"OCHCarStatusResponse:"+o.data.status);
|
||||
mOCHRHCarstatus = o.data.status;
|
||||
// mIsWork = mOCHRHCarstatus.status == 1;
|
||||
// mOCHRHCarstatus.status = status;
|
||||
|
||||
@@ -385,6 +385,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
|
||||
|
||||
@Override
|
||||
public void onOperationChanged(boolean launch) {
|
||||
Logger.e(TAG,"onOperationChanged:"+ launch);
|
||||
isOperationStatus = launch;
|
||||
if ( launch ) {
|
||||
tvOperationStatus.setText( "收车" );
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
android:text="自动驾驶"
|
||||
android:textColor="@color/module_mogo_och_autopilot_text_color_normal"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
@@ -50,7 +49,7 @@
|
||||
android:text="出车"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/module_mogo_och_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textSize="@dimen/module_mogo_och_operation_status_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
<dimen name="module_mogo_och_autopilot_status_bg_width">460px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_bg_height">140px</dimen>
|
||||
|
||||
<dimen name="module_mogo_och_operation_status_bg_width">140px</dimen>
|
||||
<dimen name="module_mogo_och_operation_status_bg_height">140px</dimen>
|
||||
<dimen name="module_mogo_och_operation_status_bg_width">120px</dimen>
|
||||
<dimen name="module_mogo_och_operation_status_bg_height">120px</dimen>
|
||||
|
||||
<dimen name="module_mogo_och_operation_status_padding">92px</dimen>
|
||||
<dimen name="module_mogo_och_operation_status_padding">83px</dimen>
|
||||
|
||||
<dimen name="module_mogo_och_autopilot_order_m_t">30px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_order_bg_width">466px</dimen>
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
|
||||
<!-- <dimen name="module_mogo_och_autopilot_status_text_size">44px</dimen>-->
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">49px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">46px</dimen>
|
||||
<dimen name="module_mogo_och_operation_status_text_size">36px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_padding_top">13px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_drawable_padding">12px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_m_l">350px</dimen>
|
||||
|
||||
@@ -180,8 +180,6 @@ MOGO_AICLOUD_SERVICES_APK_VERSION=1.0.0-SNAPSHOT
|
||||
# mogoAiCloud sdk services
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=1.0.0-SNAPSHOT
|
||||
|
||||
#地图版本
|
||||
MAP_SDK_VERSION=1.0.0-vr-8.5.50
|
||||
|
||||
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
@@ -189,4 +187,4 @@ applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
versionCode=80007
|
||||
versionName=8.0.7
|
||||
MAP_SDK_VERSION=1.0.0-vr-8.5.50
|
||||
MAP_SDK_VERSION=1.0.0-vr-8.5.51
|
||||
@@ -100,7 +100,7 @@ public class ArcView extends View {
|
||||
mArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
//抗锯齿
|
||||
mArcPaint.setAntiAlias(true);
|
||||
mArcPaint.setColor(Color.parseColor("#222A66"));
|
||||
mArcPaint.setColor(Color.parseColor("#151D4C"));
|
||||
//设置透明度(数值为0-255)
|
||||
mArcPaint.setAlpha(100);
|
||||
//设置画笔的画出的形状
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.drawer.AdasRecognizedResultDrawer;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XObuEventEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
@@ -29,6 +30,8 @@ import com.mogo.module.v2x.utils.DrivingDirectionUtils;
|
||||
import com.mogo.module.v2x.utils.ObuConfig;
|
||||
import com.mogo.module.v2x.utils.TestOnLineCarUtils;
|
||||
import com.mogo.module.v2x.utils.ToastUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -46,6 +49,7 @@ import com.zhidao.mogo.module.obu.obu.bean.MogoObuTrafficLightInfo;
|
||||
|
||||
import com.zhidao.support.obu.MogoObuManager;
|
||||
import com.zhidao.support.obu.OnMogoObuListener;
|
||||
import com.zhidao.support.obu.constants.ObuConstants;
|
||||
import com.zhidao.support.obu.model.CvxAppInitIndInfo;
|
||||
import com.zhidao.support.obu.model.CvxHvCarIndInfo;
|
||||
import com.zhidao.support.obu.model.CvxHvInfoIndInfo;
|
||||
@@ -56,6 +60,7 @@ import com.zhidao.support.obu.model.CvxV2vThreatIndInfo;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -94,6 +99,7 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
private final Handler handler = new Handler(this);
|
||||
private final ObuTypeExchangeReceiver obuTypeExchangeReceiver = new ObuTypeExchangeReceiver();
|
||||
private ObuManager obuManager;
|
||||
final String icw_data = "02000114010000000000001effd7892b11a4440af70100142a03000907e506100e2917019000005662010a45000b0000220847162c000037970010000a17f6215c459478b6010347ac045000090a0006012c01f4009600080073007300730073000b000000000000000000000000000000002b000037780000247300003261000000000000426c827f47001200100000000000000000000021220000349a006c0010000a17f63ecb45947ba301030000332c0010000a17f642e945947bea010300004d580010000a17f6435545947e4e0103000054c40010000a17f6413a45947f96010300005c300010000a17f62c2845947d140103000070e40010000a17f5fdb14594786001030000992000060004ffec2710";
|
||||
|
||||
public void init(Context context) {
|
||||
Logger.d(MODULE_NAME, "obuManager初始化--");
|
||||
@@ -111,10 +117,11 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
MogoObuManager.getInstance().init(context);
|
||||
MogoObuManager.getInstance().connect();
|
||||
MogoObuManager.getInstance().registerListener(mogoObuListener);
|
||||
MogoObuManager.getInstance().unregisterListener();
|
||||
|
||||
//TODO 测试
|
||||
// MogoObuManager.getInstance().test(icw_data);
|
||||
|
||||
// UiThreadHandler.postDelayed( () -> {
|
||||
// //TODO 测试
|
||||
// MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(3, MogoReceiver.ACTION_V2X_FRONT_WARNING);
|
||||
// handleSdkObu(1);
|
||||
//
|
||||
@@ -191,19 +198,66 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
@Override
|
||||
public void onCvxV2vThreatIndInfo(CvxV2vThreatIndInfo info) {
|
||||
//预警信息
|
||||
Logger.e("liyz", "onCvxRvInfoIndInfo ------> " + info.toString());
|
||||
Logger.e("liyz", "onCvxV2vThreatIndInfo ------> " + info.toString());
|
||||
//预警类型 threat_level 3
|
||||
if (info != null) {
|
||||
if (info.getThreat_info() != null && info.getControl() != null &&
|
||||
info.getThreat_info().getThreat_level() == 3) { //看看2的情况
|
||||
//预警方位
|
||||
int direction = V2XUtils.getDirection((float) info.getExt_info().getAzimuth());
|
||||
Log.d("liyz", "direction = " + direction + "---azimuth = " + (float) info.getExt_info().getAzimuth());
|
||||
MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(direction, MogoReceiver.ACTION_V2X_FRONT_WARNING);
|
||||
|
||||
//预警数据的组装,车辆实时移动和变色。
|
||||
//预警方位
|
||||
//预警类型
|
||||
//处理预警类型
|
||||
int appId = info.getThreat_info().getApp_id();
|
||||
handleSdkObu(getEventType(appId));
|
||||
}
|
||||
|
||||
//预警数据的组装,车辆实时移动和变色 TODO 这里需要obu提供他车列表
|
||||
AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult(getResultList(info));
|
||||
} else {
|
||||
Log.e("liyz", "info == null ");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private int getEventType(int appid) {
|
||||
if (appid == ObuConstants.USE_CASE_ID.EBW) {
|
||||
return ObuConstant.TYPE_URGENCY_COLLISION_WARNING;
|
||||
} else if (appid == ObuConstants.USE_CASE_ID.ICW) {
|
||||
return ObuConstant.TYPE_CROSS_COLLISION_WARNING;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private List<ADASRecognizedResult> resultList = null;
|
||||
|
||||
private List<ADASRecognizedResult> getResultList(CvxV2vThreatIndInfo info) {
|
||||
if (resultList == null) {
|
||||
resultList = new ArrayList<>();
|
||||
}
|
||||
|
||||
ADASRecognizedResult adasRecognizedResult = new ADASRecognizedResult();
|
||||
adasRecognizedResult.uuid = info.getVehicle_id();
|
||||
if (info.getBasic_info() != null && info.getBasic_info().getPosition() != null) {
|
||||
adasRecognizedResult.lat = info.getBasic_info().getPosition().getLatitude();
|
||||
adasRecognizedResult.lon = info.getBasic_info().getPosition().getLongitude();
|
||||
}
|
||||
adasRecognizedResult.type = 3; //小轿车
|
||||
adasRecognizedResult.heading = info.getBasic_info().getHeading();
|
||||
adasRecognizedResult.speed = info.getBasic_info().getSpeed();
|
||||
|
||||
resultList.add(adasRecognizedResult);
|
||||
|
||||
return resultList;
|
||||
|
||||
}
|
||||
|
||||
// public void release() {
|
||||
// NebulaObuClient.getInstance().unregisterObu();
|
||||
// NebulaObuClient.getInstance().unregisterObuListener();
|
||||
// MogoObuManager.getInstance().unregisterListener();
|
||||
// }
|
||||
|
||||
/**
|
||||
@@ -216,7 +270,6 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
//
|
||||
// @Override
|
||||
// public void onConnectFail(boolean isNeedReconnect) {
|
||||
// Logger.d("liyz", "onConnectFail ------> ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
@@ -225,7 +278,6 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
//
|
||||
// @Override
|
||||
// public void onObuInfo(ObuInfo info) {
|
||||
// Logger.d("liyz", "onObuInfo ------> " + info.toString());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
@@ -243,22 +295,20 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
|
||||
private void handleSdkObu(int type) {
|
||||
V2XMessageEntity<V2XObuEventEntity> messageEntity = new V2XMessageEntity<>();
|
||||
messageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_OBU_EVENT);
|
||||
|
||||
V2XObuEventEntity urgencyEvent = new V2XObuEventEntity();
|
||||
if (type == 1) { //交叉路口碰撞预警 TODO
|
||||
if (type == ObuConstant.TYPE_CROSS_COLLISION_WARNING) { //交叉路口碰撞预警
|
||||
urgencyEvent.setType(ObuConstant.TYPE_CROSS_COLLISION_WARNING);
|
||||
urgencyEvent.setDesc(V2XObuEventScenario.URGENCY_CROING_WARN_TEXT);
|
||||
} else if (type == 2) { // 前车紧急制动预警
|
||||
} else if (type == ObuConstant.TYPE_URGENCY_COLLISION_WARNING) { // 前车紧急制动预警
|
||||
urgencyEvent.setType(ObuConstant.TYPE_URGENCY_COLLISION_WARNING);
|
||||
urgencyEvent.setDesc(V2XObuEventScenario.URGENCY_COLLISION_WARN_TEXT);
|
||||
} else {
|
||||
urgencyEvent.setType(ObuConstant.TYPE_URGENCY_COLLISION_WARNING);
|
||||
urgencyEvent.setDesc(V2XObuEventScenario.URGENCY_COLLISION_WARN_TEXT);
|
||||
// urgencyEvent.setType(ObuConstant.TYPE_URGENCY_COLLISION_WARNING);
|
||||
// urgencyEvent.setDesc(V2XObuEventScenario.URGENCY_COLLISION_WARN_TEXT);
|
||||
}
|
||||
|
||||
messageEntity.setContent(urgencyEvent);
|
||||
@@ -457,7 +507,7 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
|
||||
// 暂无设计图,先简单显示
|
||||
V2XObuEventEntity tmpEvent = new V2XObuEventEntity();
|
||||
tmpEvent.setType(eventType);
|
||||
tmpEvent.setDesc(info.getType()+"--"+info.getDescribe());
|
||||
tmpEvent.setDesc(info.getType() + "--" + info.getDescribe());
|
||||
messageEntity.setContent(tmpEvent);
|
||||
V2XObuEventScenario.getInstance().init(messageEntity);
|
||||
break;
|
||||
|
||||
@@ -779,4 +779,16 @@ public class V2XUtils {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static int getDirection(float degree) {
|
||||
if (degree > 45 && degree < 135) {
|
||||
return 1; //前方
|
||||
} else if (degree > 135 && degree < 225) {
|
||||
return 4; //右方
|
||||
} else if ((degree < 45 && degree > 0) || degree < 360 && degree > 315) {
|
||||
return 3; //左方
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="328dp" android:height="98dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="360" android:endColor="#ff616381" android:startColor="#ff48495e" />
|
||||
<gradient android:angle="360" android:endColor="#5060BC" android:startColor="#5060BC" />
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#3D4053"
|
||||
android:background="#3B4577"
|
||||
android:gravity="center"
|
||||
app:roundLayoutRadius="@dimen/dp_30"
|
||||
tools:layout_height="@dimen/module_v2x_event_see_live_window_height">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_event_see_live_window_height"
|
||||
android:background="@color/live_video_background_color"
|
||||
android:background="#3B4577"
|
||||
app:roundLayoutRadius="@dimen/dp_20">
|
||||
|
||||
<com.mogo.module.v2x.view.SimpleLiveVideoPlayer
|
||||
|
||||
Reference in New Issue
Block a user