Merge branch 'dev_hengyang_base' into feature/feature_mogo_obu

# Conflicts:
#	.idea/misc.xml
#	modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java
#	modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XObuManager.java
This commit is contained in:
董宏宇
2021-08-20 16:19:23 +08:00
5 changed files with 72 additions and 83 deletions

19
.idea/misc.xml generated
View File

@@ -11,21 +11,7 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../../../layout/custom_preview.xml" value="0.390625" />
<entry key="../../../../../layout/custom_preview.xml" value="0.19947916666666668" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/camera_push_live_video.xml" value="0.27447916666666666" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/camera_view_video_layout_normal.xml" value="0.27447916666666666" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml" value="0.27447916666666666" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.2953125" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="1.0" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.3453125" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="1.25" />
<entry key="modules/mogo-module-main/src/main/res/drawable-xhdpi/module_main_warning_bkg_bottom.xml" value="0.359375" />
<entry key="modules/mogo-module-main/src/main/res/drawable-xhdpi/module_main_warning_bkg_left.xml" value="0.359375" />
<entry key="modules/mogo-module-main/src/main/res/drawable-xhdpi/module_main_warning_bkg_right.xml" value="0.359375" />
<entry key="modules/mogo-module-main/src/main/res/drawable-xhdpi/module_main_warning_bkg_top.xml" value="0.33" />
<entry key="modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml" value="0.3125" />
<entry key="modules/mogo-module-main/src/main/res/layout/module_main_activity_main_no_map.xml" value="0.33645833333333336" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_adas_dispatch.xml" value="0.184" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_adas_dispatch_affirm.xml" value="0.19166666666666668" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_map_marker_blue_info.xml" value="0.184" />
@@ -33,13 +19,14 @@
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_cars_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_cars_cancel_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_timer_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_cars.xml" value="0.5546876453218006" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_airport.xml" value="0.31746031746031744" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_cars.xml" value="0.596429428757663" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_remind.xml" value="0.35734252929687504" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml" value="0.28919677734374993" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -186,43 +186,40 @@ public class MogoApplication extends AbsMogoApplication {
// Log.d("TEST-SOCKET","socketTestData cityCode: " + socketTestData.getCityCode());
// return new HttpDnsSimpleLocation(socketTestData.getCityCode(),socketTestData.getLat(),socketTestData.getLon()); //todo 对象唯一实例优化
// });
clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() {
@Override
public HttpDnsSimpleLocation getCurrentLocation() {
MogoLocation mogoLocation =
MogoApisHandler.getInstance()
.getApis().getMapServiceApi()
.getSingletonLocationClient(getApp())
.getLastKnowLocation();
HttpDnsSimpleLocation httpDnsSimpleLocation;
if (mogoLocation != null
&& mogoLocation.getLatitude() != 0
&& mogoLocation.getLongitude() != 0) {
clientConfig.setIHttpDnsCurrentLocation(() -> {
MogoLocation mogoLocation =
MogoApisHandler.getInstance()
.getApis().getMapServiceApi()
.getSingletonLocationClient(getApp())
.getLastKnowLocation();
HttpDnsSimpleLocation httpDnsSimpleLocation;
if (mogoLocation != null
&& mogoLocation.getLatitude() != 0
&& mogoLocation.getLongitude() != 0) {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
mogoLocation.getCityCode(),
mogoLocation.getLatitude(),
mogoLocation.getLongitude());
Logger.i(TAG, "使用实时GPS信息" + httpDnsSimpleLocation);
} else {
String ciyCode = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_CITY_CODE);
String latitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LATITUDE);
String longitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LONGITUDE);
try {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
mogoLocation.getCityCode(),
mogoLocation.getLatitude(),
mogoLocation.getLongitude());
Logger.i(TAG, "使用实时GPS信息" + httpDnsSimpleLocation);
} else {
String ciyCode = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_CITY_CODE);
String latitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LATITUDE);
String longitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LONGITUDE);
try {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
ciyCode,
Double.parseDouble(latitude),
Double.parseDouble(longitude));
} catch (NumberFormatException e) {
e.printStackTrace();
httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1);
}
Logger.i(TAG, "使用缓存GPS信息" + httpDnsSimpleLocation);
ciyCode,
Double.parseDouble(latitude),
Double.parseDouble(longitude));
} catch (NumberFormatException e) {
e.printStackTrace();
httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1);
}
return httpDnsSimpleLocation;
Logger.i(TAG, "使用缓存GPS信息" + httpDnsSimpleLocation);
}
return httpDnsSimpleLocation;
});
// 初始化SDK可以设置状态回调来监听
@@ -257,7 +254,7 @@ public class MogoApplication extends AbsMogoApplication {
}
}
private void prepareSocketAndLocationServices() {
private void startSocketService() {
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
// 关闭长链服务
apis.getSocketManagerApi(getApplicationContext()).destroy();
@@ -268,7 +265,7 @@ public class MogoApplication extends AbsMogoApplication {
@Override
protected void socketTTL() {
// 鉴权成功后开启socket长链服务
prepareSocketAndLocationServices();
startSocketService();
}
private void initModules() {

View File

@@ -347,33 +347,34 @@ public class AMapViewWrapper implements IMogoMapView,
if (ui == null) {
return;
}
// TODO 这里临时修改关闭2D
Logger.d(TAG, "设置的样式 = %s", ui);
if (checkAMapView()) {
switch (ui) {
case CarUp_2D:
case CarUp_3D:
case NorthUP_2D:
setUIMode(ui);
break;
// case CarUp_2D:
// case CarUp_3D:
// case NorthUP_2D:
// setUIMode(ui);
// break;
case Type_VR:
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_LENOVO) {
mMapView.getMapAutoViewHelper().setScaleVRMode(true);
}
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR);
return;
case Type_Light:
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY);
mIsLightStyle = true;
break;
case Type_Night:
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT);
mIsLightStyle = false;
break;
case Type_AUTO_LIGHT_Night:
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true);
break;
// case Type_Light:
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY);
// mIsLightStyle = true;
// break;
// case Type_Night:
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT);
// mIsLightStyle = false;
// break;
// case Type_AUTO_LIGHT_Night:
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true);
// break;
}
}

View File

@@ -284,17 +284,17 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
newAdasRecognizedMarkersCaches.put(uniqueKey, marker);
if (shouldShowSpeed(recognizedListResult.type)) {
Message msg = mRenderThreadHandler.obtainMessage();
msg.obj = new SpeedData(marker
, recognizedListResult.speed
, recognizedListResult.uuid
, recognizedListResult.type
, recognizedListResult.heading
, MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode());
msg.what = MSG_DISPLAY_SPEED;
msg.sendToTarget();
}
// if (shouldShowSpeed(recognizedListResult.type)) {
// Message msg = mRenderThreadHandler.obtainMessage();
// msg.obj = new SpeedData(marker
// , recognizedListResult.speed
// , recognizedListResult.uuid
// , recognizedListResult.type
// , recognizedListResult.heading
// , MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode());
// msg.what = MSG_DISPLAY_SPEED;
// msg.sendToTarget();
// }
Log.d("ADAS数据延时", "render 刷新一台车 cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)));
}

View File

@@ -11,6 +11,7 @@ import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.common.MogoApisHandler;
@@ -81,6 +82,7 @@ public class EnvStatusManager {
"网络状态",
"App版本",
"Map版本",
"SN",
"HV状态",
"RV状态"
};
@@ -100,10 +102,12 @@ public class EnvStatusManager {
if (!TextUtils.isEmpty(mapVersion)) {
stringBuilder.append(mapVersion).append("\n");
}
} else if (i == 10) {
} else if(i == 10){
stringBuilder.append(MoGoAiCloudClientConfig.getInstance().getSn()).append("\n");
} else if (i == 11) {
boolean isHv = SharedPrefsMgr.getInstance( mContext ).getBoolean("OBU_HV", false );
stringBuilder.append("true".equals(isHv) ? "已连接" : "未连接").append("\n");
} else if (i == 11) {
} else if (i == 12) {
boolean isRv = SharedPrefsMgr.getInstance( mContext ).getBoolean("OBU_RV", false );
stringBuilder.append("true".equals(isRv) ? "已连接" : "未连接").append("\n");
} else {