Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map

This commit is contained in:
tongchenfei
2020-12-25 10:20:48 +08:00
14 changed files with 111 additions and 22 deletions

View File

@@ -203,7 +203,7 @@ android {
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'false'
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
}
// 同上
em4 {

View File

@@ -8,7 +8,7 @@ project.dependencies {
d8xxImplementation rootProject.ext.dependencies.httpdnsnoop
d80xImplementation rootProject.ext.dependencies.httpdnsnoop
em4Implementation rootProject.ext.dependencies.httpdnsnoop
e8xxImplementation rootProject.ext.dependencies.httpdnsnoop
e8xxImplementation rootProject.ext.dependencies.httpdnstencent
f8xxImplementation rootProject.ext.dependencies.httpdnstencent
f80xImplementation rootProject.ext.dependencies.httpdnstencent
f8AmapImplementation rootProject.ext.dependencies.httpdnstencent
@@ -20,7 +20,7 @@ project.dependencies {
d8xxImplementation project(':foudations:httpdns-noop')
d80xImplementation project(':foudations:httpdns-noop')
em4Implementation project(':foudations:httpdns-noop')
e8xxImplementation project(':foudations:httpdns-noop')
e8xxImplementation project(':foudations:httpdns-tencent')
f8xxImplementation project(':foudations:httpdns-tencent')
f80xImplementation project(':foudations:httpdns-tencent')
f8AmapImplementation project(':foudations:httpdns-tencent')

View File

@@ -75,7 +75,7 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_WIDGETS, MogoServicePaths.PATH_WIDGETS ) );
if ( DebugConfig.isMapBased() ) {
MogoModulePaths.addModule( new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME ) );
// MogoModulePaths.addModule( new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME ) );
}
MogoModulePaths.addBaseModule( new MogoModule( ShareConstants.TAG, ShareConstants.MODEL_NAME ) );

View File

@@ -27,7 +27,7 @@ public class WebSocketHandlerThread extends HandlerThread {
super.handleMessage(msg);
if (msg.what == MSG_SEND) {
Logger.d(tag, "WebSocketHandlerThread handleMessage = " + msg.obj.toString());
SocketClient.getInstance().getClientProxy().sendMessage(msg.obj.toString());
WebSocketInstanceHolder.getClientProxy().sendMessage(msg.obj.toString());
}
}
};

View File

@@ -0,0 +1,26 @@
package com.mogo.base.websocket;
import com.mogo.websocket.SocketClient;
public
/**
* @author congtaowang
* @since 2020/12/24
*
* 描述
*/
class WebSocketInstanceHolder {
private volatile static SocketClient sClient;
public static SocketClient getClientProxy() {
if ( sClient == null ) {
synchronized ( WebSocketInstanceHolder.class ) {
if ( sClient == null ) {
sClient = new SocketClient();
}
}
}
return sClient;
}
}

View File

@@ -82,8 +82,8 @@ public class WebSocketManager implements IMogoWebSocketManager, ISocketMsgSettin
@Override
public void ttlIp(String url) {
Logger.d(TAG,"ttlIp url : " + url);
SocketClient.getInstance().getClientProxy().stop();
SocketClient.getInstance().getClientProxy().disConnect();
WebSocketInstanceHolder.getClientProxy().stop();
WebSocketInstanceHolder.getClientProxy().disConnect();
Logger.d(TAG,"ready to re initWebSocket : " + url);
initWebSocket(url);
}
@@ -91,10 +91,10 @@ public class WebSocketManager implements IMogoWebSocketManager, ISocketMsgSettin
}
private void initWebSocket(String ip){
SocketClient.getInstance().getClientProxy().initSocketServer(ip);
SocketClient.getInstance().getClientProxy().getMessageSettings(this);
SocketClient.getInstance().getClientProxy().addISocketMsgCallBack(this);
SocketClient.getInstance().getClientProxy().startConnect();
WebSocketInstanceHolder.getClientProxy().initSocketServer(ip);
WebSocketInstanceHolder.getClientProxy().getMessageSettings(this);
WebSocketInstanceHolder.getClientProxy().addISocketMsgCallBack(this);
WebSocketInstanceHolder.getClientProxy().startConnect();
}
@Override
@@ -224,8 +224,8 @@ public class WebSocketManager implements IMogoWebSocketManager, ISocketMsgSettin
@Override
public void onConnectClose() {
Logger.d(TAG, "websocket ready to reconnect");
SocketClient.getInstance().getClientProxy().stop();
SocketClient.getInstance().getClientProxy().reConnect();
WebSocketInstanceHolder.getClientProxy().stop();
WebSocketInstanceHolder.getClientProxy().reConnect();
}
@Override

View File

@@ -0,0 +1,32 @@
package com.mogo.commons.layoutinflater;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
public
/**
* @author congtaowang
* @since 2020/12/23
*
* 系统实现的布局加载
*/
class OriginalLayoutInflater {
private static LayoutInflater sLayoutInflater;
public static void init( Context context ) {
sLayoutInflater = LayoutInflater.from( context ).cloneInContext( context );
}
public static View inflate( @LayoutRes int layoutId, ViewGroup container, boolean attachToRoot ) {
return sLayoutInflater.inflate( layoutId, container, attachToRoot );
}
public static View inflate( @LayoutRes int layoutId, ViewGroup container ) {
return sLayoutInflater.inflate( layoutId, container, container != null );
}
}

View File

@@ -67,7 +67,8 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.4.4'
// implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.4.5'
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.4.5-log-1'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -74,8 +74,8 @@ class GpsTester {
break;
case 2:
try {
readOneLineGpsDataAndSet2Map();
sendEmptyMessageDelayed( 2, 0 );
long time = readOneLineGpsDataAndSet2Map();
sendEmptyMessageDelayed( 2, time );
} catch ( Exception e ) {
e.printStackTrace();
}
@@ -112,7 +112,6 @@ class GpsTester {
if ( TextUtils.isEmpty( line ) ) {
return 0;
}
int count = 0;
long duration = 3;
@@ -154,7 +153,6 @@ class GpsTester {
step++;
if ( step >= 50 ) {
step = 0;
count++;
long realDuration = mogoLocation.getDuration() + 75;
realDuration = realDuration / 4;

View File

@@ -24,7 +24,8 @@ import com.mogo.utils.logger.Logger;
* desc : 地图Marker图标
* version: 1.0
*/
public class MapMarkerView extends MapMarkerBaseView {
public class
MapMarkerView extends MapMarkerBaseView {
private String TAG = "MapMarkerView";
private FrameLayout clMarkerTopView;

View File

@@ -46,6 +46,7 @@ import java.util.List;
public class MockIntentHandler implements IntentHandler {
private static final String TAG = "MockIntentHandler";
private IMogoMarker centerMarker;
@Override
public void handle( Context context, Intent intent ) {
@@ -364,6 +365,24 @@ public class MockIntentHandler implements IntentHandler {
MogoApisHandler.getInstance().getApis().getMapFrameControllerApi().changeTo2dMode();
}
break;
case 35:
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().testGpsData();
break;
case 36:
MogoLatLng center = MogoApisHandler.getInstance().getApis()
.getMapServiceApi().getMapUIController()
.getWindowCenterLocation();
centerMarker = MogoApisHandler.getInstance().getApis()
.getMapServiceApi().getMarkerManager( context )
.addMarker( TAG, new MogoMarkerOptions()
.position( center )
.icon( BitmapFactory.decodeResource( context.getResources(), R.drawable.bg_map_marker_red ) ) );
break;
case 37:
if ( centerMarker != null ) {
centerMarker.destroy();
}
break;
}
}

View File

@@ -12,6 +12,7 @@ import com.mogo.module.service.websocket.OnePerSecondSendContent;
import com.mogo.service.adas.entity.ADASRecognizedResult;
import com.mogo.service.connection.IMogoOnWebSocketMessageListener;
import com.mogo.service.connection.WebSocketMsgType;
import com.mogo.utils.logger.Logger;
import java.util.ArrayList;
import java.util.List;
@@ -104,6 +105,7 @@ class SnapshotUploadInTime implements MogoRTKLocation.RTKLocationListener {
if ( content.self == null &&
( content.adas == null || content.adas.isEmpty() ) ) {
Logger.d( TAG, "no information 2 sent" );
return;
}

View File

@@ -55,7 +55,7 @@ class AdasObjectUtils {
recognizedResults.add( result );
}
} catch ( Exception e ) {
e.printStackTrace();
}
}
return recognizedResults;
@@ -65,8 +65,13 @@ class AdasObjectUtils {
if ( rectBean == null ) {
return null;
}
if( rectBean.getLat() < 1){
return null;
}
ADASRecognizedResult result = new ADASRecognizedResult();
result.uuid = rectBean.getUuid();
double amapCoord[] = CoordinateUtils.transformFromWGSToGCJ( rectBean.getLat(), rectBean.getLon() );
if ( amapCoord != null ) {
result.lat = amapCoord[0];

View File

@@ -547,8 +547,13 @@ public class MogoADASController implements IMogoADASController {
@Override
public List< ADASRecognizedResult > getLastADASRecognizedResult() {
RectInfo rectInfo = mLastFrameData;
List< ADASRecognizedResult > recognizedResultList = AdasObjectUtils.fromAdasObject( rectInfo );
return recognizedResultList;
List< ADASRecognizedResult > recognizedResultList = null;
try {
recognizedResultList = AdasObjectUtils.fromAdasObject( rectInfo );
return recognizedResultList;
} catch ( Exception e ) {
return null;
}
}
@Override