优化显示逻辑
This commit is contained in:
@@ -215,6 +215,34 @@ android {
|
||||
// 是否需要使用工控机的rtk定位
|
||||
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
|
||||
}
|
||||
// f系列-分体机
|
||||
phone {
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '1'
|
||||
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue]
|
||||
// 是否使用高德sdk自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
// 是否支持换肤
|
||||
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
|
||||
// 是否支持查询导航目的地车友
|
||||
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
|
||||
// 是否支持桌面卡片刷新
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
// 是否加载引导模块
|
||||
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
|
||||
// 分享时是否隐藏 adas
|
||||
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// 是否需要使用工控机的rtk定位
|
||||
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
|
||||
}
|
||||
// f系列-分体机-高德
|
||||
f8Amap {
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
|
||||
@@ -37,6 +37,15 @@ project.android.productFlavors {
|
||||
}
|
||||
}
|
||||
}
|
||||
// f系列-分体机
|
||||
phone {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "arm64-v8a"
|
||||
}
|
||||
}
|
||||
}
|
||||
// f系列-分体机-高德
|
||||
f8Amap {
|
||||
externalNativeBuild {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydautoImplementation rootProject.ext.dependencies.mogoaicloudservicesdk
|
||||
phoneImplementation rootProject.ext.dependencies.mogoaicloudservicesdk
|
||||
|
||||
d82xImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
|
||||
em1Implementation rootProject.ext.dependencies.mogoaicloudserviceapk
|
||||
@@ -18,6 +19,7 @@ project.dependencies {
|
||||
fochbusImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
|
||||
} else {
|
||||
bydautoImplementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
phoneImplementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
|
||||
d82xImplementation project(':foudations:mogo-aicloud-services-apk')
|
||||
em1Implementation project(':foudations:mogo-aicloud-services-apk')
|
||||
|
||||
@@ -7,6 +7,7 @@ project.dependencies {
|
||||
f80xImplementation rootProject.ext.dependencies.mapcustom
|
||||
fochtaxiImplementation rootProject.ext.dependencies.mapcustom
|
||||
fochbusImplementation rootProject.ext.dependencies.mapcustom
|
||||
phoneImplementation rootProject.ext.dependencies.mapcustom
|
||||
|
||||
f8AmapImplementation rootProject.ext.dependencies.mapamap
|
||||
bydautoImplementation rootProject.ext.dependencies.mapamap
|
||||
@@ -24,6 +25,7 @@ project.dependencies {
|
||||
f80xImplementation project(':libraries:map-custom')
|
||||
fochtaxiImplementation project(':libraries:map-custom')
|
||||
fochbusImplementation project(':libraries:map-custom')
|
||||
phoneImplementation project(':libraries:map-custom')
|
||||
|
||||
f8AmapImplementation project(':libraries:map-amap')
|
||||
bydautoImplementation project(':libraries:map-amap')
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydautoImplementation rootProject.ext.dependencies.mogobaseservicesdk
|
||||
phoneImplementation rootProject.ext.dependencies.mogobaseservicesdk
|
||||
|
||||
d82xImplementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
em1Implementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
@@ -19,6 +20,7 @@ project.dependencies {
|
||||
fochbusImplementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
} else {
|
||||
bydautoImplementation project(':foudations:mogo-base-services-sdk')
|
||||
phoneImplementation project(':foudations:mogo-base-services-sdk')
|
||||
|
||||
d82xImplementation project(':foudations:mogo-base-services-apk')
|
||||
em1Implementation project(':foudations:mogo-base-services-apk')
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydautoImplementation rootProject.ext.dependencies.mogomoduleguide
|
||||
phoneImplementation rootProject.ext.dependencies.mogomoduleguide
|
||||
d8xxImplementation rootProject.ext.dependencies.mogomoduleguide
|
||||
d80xImplementation rootProject.ext.dependencies.mogomoduleguide
|
||||
em4Implementation rootProject.ext.dependencies.mogomoduleguide
|
||||
@@ -15,6 +16,7 @@ project.dependencies {
|
||||
fochbusImplementation rootProject.ext.dependencies.mogomoduleguide
|
||||
} else {
|
||||
bydautoImplementation project(':modules:mogo-module-guide')
|
||||
phoneImplementation project(':modules:mogo-module-guide')
|
||||
d8xxImplementation project(':modules:mogo-module-guide')
|
||||
d80xImplementation project(':modules:mogo-module-guide')
|
||||
em4Implementation project(':modules:mogo-module-guide')
|
||||
|
||||
@@ -18,6 +18,7 @@ project.dependencies {
|
||||
em3Implementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
fochtaxiImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
fochbusImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
phoneImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
} else {
|
||||
bydautoImplementation project(':modules:mogo-module-left-panel')
|
||||
|
||||
@@ -34,5 +35,6 @@ project.dependencies {
|
||||
em3Implementation project(':modules:mogo-module-left-panel-noop')
|
||||
fochtaxiImplementation project(':modules:mogo-module-left-panel-noop')
|
||||
fochbusImplementation project(':modules:mogo-module-left-panel-noop')
|
||||
phoneImplementation project(':modules:mogo-module-left-panel-noop')
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydautoImplementation rootProject.ext.dependencies.mogoochnoop
|
||||
phoneImplementation rootProject.ext.dependencies.mogoochnoop
|
||||
d82xImplementation rootProject.ext.dependencies.mogoochnoop
|
||||
em1Implementation rootProject.ext.dependencies.mogoochnoop
|
||||
em2Implementation rootProject.ext.dependencies.mogoochnoop
|
||||
@@ -16,6 +17,7 @@ project.dependencies {
|
||||
fochbusImplementation rootProject.ext.dependencies.mogoochbus
|
||||
} else {
|
||||
bydautoImplementation project(':OCH:mogo-och-noop')
|
||||
phoneImplementation project(':OCH:mogo-och-noop')
|
||||
d82xImplementation project(':OCH:mogo-och-noop')
|
||||
em1Implementation project(':OCH:mogo-och-noop')
|
||||
em2Implementation project(':OCH:mogo-och-noop')
|
||||
|
||||
@@ -16,6 +16,7 @@ project.dependencies {
|
||||
e8xxImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
fochtaxiImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
fochbusImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
phoneImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
|
||||
f8xxImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
f80xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
@@ -27,6 +28,7 @@ project.dependencies {
|
||||
em3Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
fochtaxiImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
fochbusImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
phoneImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
} else {
|
||||
|
||||
|
||||
@@ -46,6 +48,7 @@ project.dependencies {
|
||||
e8xxImplementation project(':skin:mogo-skin-support-impl')
|
||||
fochtaxiImplementation project(':skin:mogo-skin-support-impl')
|
||||
fochbusImplementation project(':skin:mogo-skin-support-impl')
|
||||
phoneImplementation project(':skin:mogo-skin-support-impl')
|
||||
|
||||
f8xxImplementation project(':skin:mogo-skin-light')
|
||||
f80xImplementation project(':skin:mogo-skin-light')
|
||||
@@ -57,5 +60,6 @@ project.dependencies {
|
||||
em3Implementation project(':skin:mogo-skin-light')
|
||||
fochtaxiImplementation project(':skin:mogo-skin-light')
|
||||
fochbusImplementation project(':skin:mogo-skin-light')
|
||||
phoneImplementation project(':skin:mogo-skin-light')
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ project.dependencies {
|
||||
e8xxImplementation rootProject.ext.dependencies.ttszhi
|
||||
fochtaxiImplementation rootProject.ext.dependencies.ttszhi
|
||||
fochbusImplementation rootProject.ext.dependencies.ttszhi
|
||||
phoneImplementation rootProject.ext.dependencies.ttszhi
|
||||
} else {
|
||||
bydautoImplementation project(':tts:tts-di')
|
||||
d82xImplementation project(':tts:tts-zhi')
|
||||
@@ -29,5 +30,6 @@ project.dependencies {
|
||||
e8xxImplementation project(':tts:tts-zhi')
|
||||
fochtaxiImplementation project(':tts:tts-zhi')
|
||||
fochbusImplementation project(':tts:tts-zhi')
|
||||
phoneImplementation project(':tts:tts-zhi')
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
afterEvaluate {
|
||||
|
||||
def independent = ["em3", "em1", "d80x", "d82x", "bydauto", "em2"]
|
||||
def independent = ["em3", "em1", "d80x", "d82x", "bydauto", "em2", "phone"]
|
||||
def launcher = ["f80x", "f8xx", "f8amap", "em4", "e8xx", "fochtaxi", "fochbus"]
|
||||
|
||||
it.getTasks().iterator().forEachRemaining {
|
||||
|
||||
@@ -67,7 +67,7 @@ dependencies {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.2.6'
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.2.9'
|
||||
// implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4'
|
||||
}
|
||||
|
||||
|
||||
@@ -1038,7 +1038,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public double[] matchRoad( double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK ) {
|
||||
double wgs[] = new double[]{lon, lat};
|
||||
long start = System.currentTimeMillis();
|
||||
SinglePointRoadInfo singlePointRoadInfo = MapDataApi.INSTANCE.getSinglePointMatchRoad( ( ( float ) wgs[0] ), ( ( float ) wgs[1] ), ( ( float ) angle ), isGpsLocation, isRTK );
|
||||
SinglePointRoadInfo singlePointRoadInfo = MapDataApi.INSTANCE.getSinglePointMatchRoad( wgs[0], wgs[1], ( ( float ) angle ), isGpsLocation, isRTK );
|
||||
Log.i("timer-matchRoad-1", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
if ( singlePointRoadInfo != null
|
||||
&& singlePointRoadInfo.getCoords() != null
|
||||
@@ -1053,7 +1053,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public String getMarkerInfoResName( String speedVal ) {
|
||||
return null;
|
||||
return ResIdCache.getVal( speedVal );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -93,7 +93,7 @@ class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
@Override
|
||||
public IMogoMapView getMapView( Context context ) {
|
||||
NavAutoApi.INSTANCE.init( context, MapParams.Companion.init()
|
||||
.setDebugMode( false )
|
||||
.setDebugMode( true )
|
||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||
.setZoom( 20 )
|
||||
|
||||
@@ -26,7 +26,7 @@ class MapStyleController {
|
||||
private MapStyleController() {
|
||||
mVrAreaFilters.add( new ShunYiArea() );
|
||||
mVrAreaFilters.add( new OCHArea() );
|
||||
mVrAreaFilters.add( new HuiXinXiJieArea() );
|
||||
// mVrAreaFilters.add( new HuiXinXiJieArea() );
|
||||
}
|
||||
|
||||
public static MapStyleController getInstance() {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
@@ -15,6 +13,7 @@ import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.utils.SimpleHandlerThreadPool;
|
||||
import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -22,6 +21,7 @@ import com.mogo.utils.logger.Logger;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public
|
||||
@@ -39,31 +39,31 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
private Handler mPointSettingHandler = null;
|
||||
public static final int MSG_POINTS_SETTING = 9;
|
||||
public static final int MSG_SET_POINT = 10;
|
||||
public static final int MSG_SET_SPEED = 11;
|
||||
private Handler mRenderThreadHandler = null;
|
||||
public static final int MSG_MOVE_POINTS = 9;
|
||||
public static final int MSG_MOVE_POINT = 10;
|
||||
public static final int MSG_DISPLAY_SPEED = 11;
|
||||
|
||||
private AdasRecognizedResultDrawer() {
|
||||
public AdasRecognizedResultDrawer() {
|
||||
super();
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
initHandler();
|
||||
}
|
||||
|
||||
private void initHandler() {
|
||||
mPointSettingHandler = new Handler( WorkThreadHandler.newInstance( "moving-points-thread" ).getLooper() ) {
|
||||
mRenderThreadHandler = new Handler( WorkThreadHandler.newInstance( "render-thread-" + new Random().nextLong() ).getLooper() ) {
|
||||
@Override
|
||||
public void handleMessage( Message msg ) {
|
||||
super.handleMessage( msg );
|
||||
if ( msg.what == MSG_POINTS_SETTING ) {
|
||||
if ( msg.what == MSG_MOVE_POINTS ) {
|
||||
if ( msg.obj instanceof MovingPoints ) {
|
||||
startSettingPointLooper( ( ( MovingPoints ) msg.obj ) );
|
||||
}
|
||||
} else if ( msg.what == MSG_SET_POINT ) {
|
||||
} else if ( msg.what == MSG_MOVE_POINT ) {
|
||||
if ( msg.obj instanceof MovingPoint ) {
|
||||
moveMarker( ( ( MovingPoint ) msg.obj ), msg.arg1 );
|
||||
}
|
||||
} else if ( msg.what == MSG_SET_SPEED ) {
|
||||
} else if ( msg.what == MSG_DISPLAY_SPEED ) {
|
||||
if ( msg.obj instanceof SpeedData ) {
|
||||
showSpeed( ( SpeedData ) msg.obj );
|
||||
}
|
||||
@@ -81,14 +81,14 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
List< MovingPoint > points = data.points;
|
||||
for ( int i = 0; i < points.size(); i++ ) {
|
||||
Message msg = Message.obtain();
|
||||
msg.what = MSG_SET_POINT;
|
||||
msg.what = MSG_MOVE_POINT;
|
||||
msg.obj = points.get( i );
|
||||
if ( i == 0 || i == points.size() - 1 ) {
|
||||
msg.arg1 = R.drawable.sr;
|
||||
} else {
|
||||
msg.arg1 = R.drawable.sy;
|
||||
}
|
||||
mPointSettingHandler.sendMessageDelayed( msg, points.get( i ).delay );
|
||||
mRenderThreadHandler.sendMessageDelayed( msg, points.get( i ).delay );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +151,11 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
clearOldMarker();
|
||||
return;
|
||||
}
|
||||
|
||||
Map< String, IMogoMarker > newAdasRecognizedMarkersCaches = new HashMap<>();
|
||||
for ( ADASRecognizedResult recognizedListResult : resultList ) {
|
||||
if ( recognizedListResult == null ) {
|
||||
@@ -181,6 +186,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
double[] matchedPoint = SnapshotSetDataDrawer.getInstance().matchRoad( recognizedListResult.lon,
|
||||
@@ -209,6 +215,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
recognizedListResult.lat = matchedPoint[1];
|
||||
}
|
||||
}
|
||||
Logger.d( "matchRoad", "cost = %s", System.currentTimeMillis() - start );
|
||||
|
||||
IMogoMarker marker = mAdasRecognizedMarkersCaches.remove( uniqueKey );
|
||||
ADASRecognizedResult lastPosition = mLastPositions.put( uniqueKey, recognizedListResult );
|
||||
@@ -230,21 +237,30 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
startPoint.angle = ( float ) lastPosition.heading;
|
||||
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
MovingPoint endPoint = new MovingPoint();
|
||||
final MovingPoint endPoint = new MovingPoint();
|
||||
endPoint.point = new MogoLatLng( recognizedListResult.lat, recognizedListResult.lon );
|
||||
endPoint.marker = marker;
|
||||
endPoint.angle = ( float ) recognizedListResult.heading;
|
||||
interval -= cost;
|
||||
endPoint.delay = interval;
|
||||
|
||||
List< MovingPoint > points = interpolate( startPoint, endPoint, interval );
|
||||
Message msg = new Message();
|
||||
MovingPoints obj = new MovingPoints();
|
||||
obj.points = points;
|
||||
msg.obj = obj;
|
||||
msg.what = MSG_POINTS_SETTING;
|
||||
mPointSettingHandler.sendMessage( msg );
|
||||
Logger.d( TAG, "anim duration: %s, points size = %s", interval, points.size() );
|
||||
// method 1
|
||||
final IMogoMarker renderRef = marker;
|
||||
final long intervalRef = interval;
|
||||
SimpleHandlerThreadPool.getInstance().postRender( () -> {
|
||||
renderRef.addDynamicAnchorPosition( endPoint.point, intervalRef );
|
||||
} );
|
||||
|
||||
// method 2
|
||||
// List< MovingPoint > points = interpolate( startPoint, endPoint, interval );
|
||||
// Message msg = new Message();
|
||||
// MovingPoints obj = new MovingPoints();
|
||||
// obj.points = points;
|
||||
// msg.obj = obj;
|
||||
// msg.what = MSG_MOVE_POINTS;
|
||||
// mRenderThreadHandler.sendMessage( msg );
|
||||
// Logger.d( TAG, "anim duration: %s, points size = %s", interval, points.size() );
|
||||
|
||||
} else {
|
||||
marker.setRotateAngle( ( ( float ) recognizedListResult.heading ) );
|
||||
marker.setPosition( recognizedListResult.lat, recognizedListResult.lon );
|
||||
@@ -255,8 +271,8 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
obj.marker = marker;
|
||||
obj.speed = recognizedListResult.speed;
|
||||
msg.obj = obj;
|
||||
msg.what = MSG_SET_SPEED;
|
||||
mPointSettingHandler.sendMessage( msg );
|
||||
msg.what = MSG_DISPLAY_SPEED;
|
||||
mRenderThreadHandler.sendMessage( msg );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,7 +323,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
/**
|
||||
* 清除旧的 marker 数据
|
||||
*/
|
||||
private void clearOldMarker() {
|
||||
public void clearOldMarker() {
|
||||
if ( mAdasRecognizedMarkersCaches != null ) {
|
||||
mAdasRecognizedMarkersCaches.clear();
|
||||
}
|
||||
@@ -316,5 +332,4 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
}
|
||||
sendMessage( MSG_REMOVE_DIRTY_MARKERS, DataTypes.TYPE_MARKER_ADAS );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,12 @@ class BaseDrawer {
|
||||
/**
|
||||
* 地图刷新频率
|
||||
*/
|
||||
public static final int MAP_RENDER_FRAME_FREQUENCY = 25;
|
||||
public static final int MAP_RENDER_FRAME_FREQUENCY = 30;
|
||||
|
||||
/**
|
||||
* 移动点的时间间隔
|
||||
*/
|
||||
public static final int MAP_MARKER_MOVE_INTERVAL = MAP_RENDER_FRAME_FREQUENCY;
|
||||
|
||||
/**
|
||||
* 地图内部资源md5缓存,便于资源复用
|
||||
@@ -113,7 +118,6 @@ class BaseDrawer {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private TextView mSpeedView = null;
|
||||
|
||||
/**
|
||||
@@ -160,7 +164,7 @@ class BaseDrawer {
|
||||
*
|
||||
* @param dirtyMarkers
|
||||
*/
|
||||
private static void removeDirtyMarkers( Map< String, IMogoMarker > dirtyMarkers ) {
|
||||
protected static void removeDirtyMarkers( Map< String, IMogoMarker > dirtyMarkers ) {
|
||||
if ( dirtyMarkers == null || dirtyMarkers.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
@@ -267,7 +271,7 @@ class BaseDrawer {
|
||||
double lat = start.point.lat + latStep * ( i + 1 );
|
||||
MovingPoint pd = new MovingPoint();
|
||||
pd.point = new MogoLatLng( lat, lon );
|
||||
pd.delay = ( i + i ) * MAP_RENDER_FRAME_FREQUENCY;
|
||||
pd.delay = ( i + i ) * MAP_MARKER_MOVE_INTERVAL;
|
||||
pd.angle = ( float ) _angle;
|
||||
pd.marker = start.marker;
|
||||
arrayList.add( pd );
|
||||
|
||||
@@ -78,15 +78,17 @@ public class AnimNavInfoView extends BaseNaviInfoView {
|
||||
|
||||
tvDestinationOnlineCar = findViewById(R.id.module_ext_id_destination_online_car);
|
||||
|
||||
tvDestinationOnlineCar.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().showPanel();
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", 1);
|
||||
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("APP_Find_Mogoer", properties);
|
||||
}
|
||||
});
|
||||
if ( tvDestinationOnlineCar != null ) {
|
||||
tvDestinationOnlineCar.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().showPanel();
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", 1);
|
||||
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("APP_Find_Mogoer", properties);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
naviBg.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
android:layout_height="@dimen/module_ext_navi_info_panel_turn_icon_height"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_info_panel_turn_icon_marginLeft"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_11"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg" />
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
>
|
||||
<View
|
||||
android:id="@+id/module_map_id_navi_bg"
|
||||
style="@style/NaviViewStyle"
|
||||
android:layout_height="@dimen/module_ext_navi_info_panel_height"
|
||||
android:background="@drawable/module_ext_dw_navi_info_panel_bkg"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginTop="@dimen/module_common_shadow_width_pos"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:layout_width="@dimen/module_ext_navi_info_panel_turn_icon_width"
|
||||
android:layout_height="@dimen/module_ext_navi_info_panel_turn_icon_height"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_info_panel_turn_icon_marginLeft"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/module_map_id_navi_next_info_distance_marginStart"
|
||||
android:layout_marginTop="@dimen/module_map_id_navi_next_info_distance_marginTop"
|
||||
android:text="53"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_navi_info_panel_next_info_distance_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_map_id_navi_next_info_road_turn_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_next_info_road_turn_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_distance_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_info_panel_next_info_distance_unit_marginLeft"
|
||||
android:layout_marginBottom="@dimen/module_ext_navi_info_panel_next_info_distance_unit_marginBottom"
|
||||
android:text="米"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_navi_info_panel_next_info_distance_unit_textSize"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/module_map_id_navi_next_info_distance"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_map_id_navi_next_info_distance" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_turn_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_info_panel_next_info_distance_unit_marginLeft"
|
||||
android:layout_marginBottom="@dimen/module_ext_navi_info_panel_next_info_distance_unit_marginBottom"
|
||||
android:textColor="#7FF1F1F1"
|
||||
android:textSize="@dimen/module_ext_navi_info_panel_next_info_distance_next_step_textSize"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/module_map_id_navi_next_info_distance_unit"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_map_id_navi_next_info_distance_unit" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_road"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/module_ext_navi_next_info_road_marginTop"
|
||||
android:layout_marginBottom="@dimen/module_map_id_navi_next_info_road_marginBottom"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="北三环东路辅路"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_navi_info_panel_next_info_road_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_navi_next_info_distance" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/remainDistanceGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="module_map_id_remaining_distance_icon,module_map_id_remaining_distance,module_map_id_remaining_distance_unit,module_map_id_remaining_distance_notice" />
|
||||
<!--remain distance-->
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_remaining_distance_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_117"
|
||||
android:src="@drawable/module_ext_ic_navi_info1"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_map_id_remaining_distance"
|
||||
app:layout_constraintRight_toLeftOf="@id/module_map_id_remaining_time_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3599"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_remaining_distance_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_map_id_remaining_distance_notice"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_remaining_distance_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_map_id_remaining_distance_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_distance_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_remaining_distance_unit_textSize"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/module_map_id_remaining_distance"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_map_id_remaining_distance" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_distance_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="剩余"
|
||||
android:textColor="#7FFFFFFF"
|
||||
android:textSize="@dimen/module_ext_remaining_distance_unit_textSize"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_remaining_distance"
|
||||
app:layout_constraintTop_toBottomOf="@id/module_map_id_remaining_distance" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/remainTimeGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="module_map_id_remaining_time_icon,module_map_id_remaining_time,module_map_id_remaining_time_unit,module_map_id_remaining_time_notice" />
|
||||
<!--remain time-->
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_remaining_time_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_117"
|
||||
android:src="@drawable/module_ext_ic_navi_info2"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_map_id_remaining_time"
|
||||
app:layout_constraintRight_toLeftOf="@id/module_map_id_arrive_time_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3599"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_remaining_time_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_map_id_remaining_time_notice"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_remaining_time_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/module_map_id_remaining_time_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_time_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_remaining_time_unit_textSize"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/module_map_id_remaining_time"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_map_id_remaining_time" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_remaining_time_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="时间"
|
||||
android:textColor="#7FFFFFFF"
|
||||
android:textSize="@dimen/module_ext_remaining_distance_unit_textSize"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_remaining_time"
|
||||
app:layout_constraintTop_toBottomOf="@id/module_map_id_remaining_time" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/arriveTimeGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="module_map_id_arrive_time_icon,module_map_id_arrive_time,module_map_id_arrive_time_notice" />
|
||||
<!--arrive time-->
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_arrive_time_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/module_ext_navi_extra_info_margin_right"
|
||||
android:src="@drawable/module_ext_ic_navi_info3"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_map_id_arrive_time"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_arrive_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3599"
|
||||
android:textColor="#F1F1F1"
|
||||
android:textSize="@dimen/module_ext_arrive_time_textSize"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_map_id_arrive_time_notice"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_arrive_time_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_map_id_arrive_time_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_arrive_time_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="到达"
|
||||
android:textColor="#7FFFFFFF"
|
||||
android:textSize="@dimen/module_ext_remaining_distance_unit_textSize"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_map_id_arrive_time"
|
||||
app:layout_constraintTop_toBottomOf="@id/module_map_id_arrive_time" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_id_destination_online_car"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_ext_button_height"
|
||||
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
|
||||
android:background="@drawable/module_ext_dw_navi_info_panel_bkg"
|
||||
android:drawableLeft="@drawable/module_ext_destination_online_car_dw"
|
||||
android:drawablePadding="@dimen/module_ext_destination_online_car_drawablePadding"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/module_ext_destination_online_car_paddingLeft"
|
||||
android:paddingRight="@dimen/module_ext_destination_online_car_paddingRight"
|
||||
android:text="@string/module_ext_destination_online_car_text"
|
||||
android:textColor="@color/module_ext_color_voice_text"
|
||||
android:textSize="@dimen/module_ext_north_textSize"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
|
||||
tools:visibility="visible" />
|
||||
</merge>
|
||||
@@ -26,7 +26,6 @@
|
||||
android:layout_height="@dimen/module_ext_navi_info_panel_turn_icon_height"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_info_panel_turn_icon_marginLeft"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_11"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_map_id_navi_bg" />
|
||||
|
||||
@@ -581,6 +581,40 @@ public class MockIntentHandler implements IntentHandler {
|
||||
latLngs.add( new MogoLatLng( 39.981990561932,116.412893641626 ) );
|
||||
marker.startSmoothInMs(latLngs, 20_000L );
|
||||
break;
|
||||
case 49:
|
||||
// 39.96741320378243, 116.41045709250723
|
||||
// 39.98232698552779,116.41879656379113;
|
||||
MogoMarkerOptions options1 = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_ADAS )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.set3DMode( false )
|
||||
.position( new MogoLatLng( 39.96741320378243, 116.41045709250723 ) )
|
||||
.gps( true )
|
||||
.controlAngle( false )
|
||||
.icon(BitmapFactory.decodeResource( context.getResources(), R.drawable.sy ) )
|
||||
.rotate( ( float ) 358.526123 );
|
||||
IMogoMarker marker1 = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( context ).addMarker( DataTypes.TYPE_MARKER_ADAS, options1 );
|
||||
MogoMarkerOptions options2 = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_ADAS )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.set3DMode( false )
|
||||
.position( new MogoLatLng( 39.98232698552779,116.41879656379113 ) )
|
||||
.gps( true )
|
||||
.controlAngle( false )
|
||||
.icon(BitmapFactory.decodeResource( context.getResources(), R.drawable.sr ) )
|
||||
.rotate( ( float ) 358.526123 );
|
||||
IMogoMarker marker2 = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( context ).addMarker( DataTypes.TYPE_MARKER_ADAS, options2 );
|
||||
MogoMarkerOptions options3 = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_ADAS )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.set3DMode( false )
|
||||
.position( new MogoLatLng( 39.97631642243,116.418249382739 ) )
|
||||
.gps( true )
|
||||
.controlAngle( false )
|
||||
.icon(BitmapFactory.decodeResource( context.getResources(), R.drawable.bg_map_marker_red ) )
|
||||
.rotate( ( float ) 358.526123 );
|
||||
IMogoMarker marker3 = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( context ).addMarker( DataTypes.TYPE_MARKER_ADAS, options3 );
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -697,6 +731,7 @@ public class MockIntentHandler implements IntentHandler {
|
||||
jo.put( "satelliteTime", System.currentTimeMillis() );
|
||||
jo.put( "systemTime", System.currentTimeMillis() );
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map( jo );
|
||||
Log.i( "mock-timer-loc-map", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
SnapshotLocationController.getInstance().syncAdasLocationInfo( jo );
|
||||
Log.i( "mock-timer-loc", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
mLocationMockHandler.sendEmptyMessageDelayed( 1, 100L );
|
||||
|
||||
@@ -58,6 +58,16 @@ public class ADASCarStateInfo implements Serializable {
|
||||
private String systemTime;
|
||||
//接收到数据的时间
|
||||
private String receiverDataTime;
|
||||
// udp收到数据的时间
|
||||
private String startReceiverDataTime;
|
||||
|
||||
public String getStartReceiverDataTime() {
|
||||
return startReceiverDataTime;
|
||||
}
|
||||
|
||||
public void setStartReceiverDataTime( String startReceiverDataTime ) {
|
||||
this.startReceiverDataTime = startReceiverDataTime;
|
||||
}
|
||||
|
||||
public float getGnss_speed() {
|
||||
return gnss_speed;
|
||||
|
||||
@@ -326,23 +326,11 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
}
|
||||
|
||||
private LogWriter locLogWriter;
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void ownerCarStateInfo( String ownerCarStateInfo ) {
|
||||
if ( locLogWriter == null ) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddhhmmss" );
|
||||
String date = sdf.format( new Date() );
|
||||
String path = context.getExternalCacheDir().getAbsolutePath() + "/adaslog/" + date + "/loc.txt";
|
||||
Logger.d( TAG, path );
|
||||
locLogWriter = new LogWriter( path );
|
||||
}
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
ADASCarStateInfo stateInfo = GsonUtil.objectFromJson( ownerCarStateInfo, ADASCarStateInfo.class );
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
locLogWriter.write( ownerCarStateInfo, Long.valueOf( stateInfo.getValues().getReceiverDataTime() ) - cost );
|
||||
Logger.d( "ADAS-LOC-timer", "upd 到 aidl 传输耗时:%s", start - Long.valueOf( stateInfo.getValues().getStartReceiverDataTime() ) );
|
||||
if ( stateInfo == null || stateInfo.getValues() == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user