Merge branch 'test_MogoAP_eagle-220_211207_8.0.15.2'
This commit is contained in:
@@ -61,8 +61,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
// 初始化App 配置信息
|
||||
val mAppConfigInfo = AppConfigInfo()
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
|
||||
@@ -323,20 +321,21 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 绘制应用基本
|
||||
*/
|
||||
private fun drawAppInfo() {
|
||||
|
||||
mAppConfigInfo.appName = AppUtils.getAppName()
|
||||
mAppConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
mAppConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
mAppConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
mAppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
mAppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
mAppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
mAppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
mAppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
mAppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
AppConfigInfo.appName = AppUtils.getAppName()
|
||||
AppConfigInfo.appName = AppUtils.getAppName()
|
||||
AppConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
AppConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
AppConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
AppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
AppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
AppConfigInfo.netMode = DebugConfig.getNetMode()
|
||||
AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
|
||||
// 将数据绘制
|
||||
tvAppInfo.text = mAppConfigInfo.toString()
|
||||
tvAppInfo.text = AppConfigInfo.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,8 +345,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
|
||||
mAppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
mAppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
drawAppInfo()
|
||||
}
|
||||
}
|
||||
@@ -360,8 +359,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tvAutopilotInfo.post {
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo)
|
||||
|
||||
mAppConfigInfo.adasSdkVersion = autoPilotStatusInfo.version
|
||||
mAppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
AppConfigInfo.adasSdkVersion = autoPilotStatusInfo.version
|
||||
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
drawAppInfo()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,27 @@
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PAD系统时间:"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_36" />
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/tvNowTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="yyyy年MM月dd日 EEEE aa HH:mm:ss"
|
||||
android:format24Hour="yyyy年MM月dd日 EEEE aa HH:mm:ss"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_36" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppInfo"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -125,24 +125,15 @@ public class SmallMapDirectionView
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_start)));
|
||||
mEndMarker = mAMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_end)));
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(1000L);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mAMap.setCustomMapStyle(
|
||||
new CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
.setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext()))
|
||||
.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext()))
|
||||
);
|
||||
|
||||
//设置希望展示的地图缩放级别
|
||||
mAMap.moveCamera(mCameraUpdate);
|
||||
}).start();
|
||||
|
||||
// 加载自定义样式
|
||||
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
.setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext()))
|
||||
.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext()));
|
||||
// 设置自定义样式
|
||||
mAMap.setCustomMapStyle(customMapStyleOptions);
|
||||
//设置希望展示的地图缩放级别
|
||||
mAMap.moveCamera(mCameraUpdate);
|
||||
// 设置地图的样式
|
||||
UiSettings uiSettings = mAMap.getUiSettings();
|
||||
uiSettings.setZoomControlsEnabled(false);// 地图缩放级别的交换按钮
|
||||
@@ -152,6 +143,14 @@ public class SmallMapDirectionView
|
||||
mAMap.setOnMapLoadedListener(new AMap.OnMapLoadedListener() {
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
Logger.d(TAG, "smp---onMapLoaded");
|
||||
// 加载自定义样式
|
||||
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
.setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext()))
|
||||
.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext()));
|
||||
// 设置自定义样式
|
||||
mAMap.setCustomMapStyle(customMapStyleOptions);
|
||||
mAMapNaviView.getMap().setPointToCenter(mAMapNaviView.getWidth() / 2, mAMapNaviView.getHeight() / 2);
|
||||
}
|
||||
});
|
||||
@@ -202,10 +201,10 @@ public class SmallMapDirectionView
|
||||
clearPolyline();
|
||||
mCoordinatesLatLng.clear();
|
||||
}
|
||||
cameraPosition = new CameraPosition.Builder().target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
cameraPosition = new CameraPosition.Builder().target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
} else {
|
||||
//设置希望展示的地图缩放级别
|
||||
cameraPosition = new CameraPosition.Builder().target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
cameraPosition = new CameraPosition.Builder().target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
// mAMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, zoomLevel));
|
||||
}
|
||||
mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_V2X_MODULE
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightManager
|
||||
import com.mogo.eagle.core.function.v2x.redlightwarning.RedLightWarningManager
|
||||
import com.mogo.eagle.core.function.v2x.speedlimit.SpeedLimitDataManager
|
||||
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
|
||||
|
||||
@@ -19,11 +18,11 @@ class V2XProvider : IMoGoFunctionServerProvider {
|
||||
CallTrafficLightManager.getTrafficLightProvider().initTrafficLightServer(context)
|
||||
VipCarManager.INSTANCE.initServer(context)
|
||||
SpeedLimitDataManager.getInstance().start();
|
||||
RedLightWarningManager.INSTANCE.listenTrafficLight()
|
||||
// RedLightWarningManager.INSTANCE.listenTrafficLight()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
VipCarManager.INSTANCE.destroy()
|
||||
RedLightWarningManager.INSTANCE.onDestroy()
|
||||
// RedLightWarningManager.INSTANCE.onDestroy()
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
|
||||
trafficLightNetWorkModel.requestTrafficLight(
|
||||
it.latitude, it.longitude, it.bearing.toDouble(), road, { result ->
|
||||
trafficLightResult = result
|
||||
TrafficLightHMIManager.INSTANCE.updateTrafficLight(result)
|
||||
// TrafficLightHMIManager.INSTANCE.updateTrafficLight(result)
|
||||
CallTrafficLightListenerManager.invokeTrafficLightStatus(result)
|
||||
},
|
||||
{ errorMsg ->
|
||||
|
||||
@@ -36,7 +36,7 @@ class TrafficLightThreadHandler : Handler {
|
||||
when (msg.what) {
|
||||
MSG_WHAT_LOOP_SEARCH_CROSS_ROAD -> {
|
||||
//handler轮询,后续从地图处获取到车道线(前提获取车道线没有异步调用),来优化轮询时长
|
||||
sendEmptyMessageDelayed(MSG_WHAT_LOOP_SEARCH_CROSS_ROAD,1_000L)
|
||||
sendEmptyMessageDelayed(MSG_WHAT_LOOP_SEARCH_CROSS_ROAD,300L)
|
||||
loopSearchCrossRoad?.invoke()
|
||||
}
|
||||
MSG_WHAT_STOP_SEARCH_CROSS_ROAD -> {
|
||||
|
||||
@@ -127,7 +127,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
|
||||
lastResult?.let {
|
||||
//如果上次结果和本次灯态结果变化比较大,则已变灯,控制HMI展示弹窗
|
||||
if (abs(currentResult!!.remain - it.remain) > 5) {
|
||||
if (abs(currentResult!!.remain - it.remain) > 5 && currentResult.isGreen()) {
|
||||
Logger.d(TAG, "调用showWarningV2X to show")
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(),
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.content,
|
||||
|
||||
Reference in New Issue
Block a user