opt
This commit is contained in:
@@ -472,7 +472,7 @@ class MogoOCHTaxiModel {
|
||||
/**
|
||||
* 注销到达起始站围栏监听
|
||||
*/
|
||||
private void unregisterCarLocationListener() {
|
||||
public void unregisterCarLocationListener() {
|
||||
if ( mCarLocationChangedListener2 == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
|
||||
.getApis()
|
||||
.getRegisterCenterApi()
|
||||
.unregisterCarLocationChangedListener( TAG, this );
|
||||
MogoOCHTaxiModel.getInstance().unregisterCarLocationListener();
|
||||
mLocation = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@Keep
|
||||
public class MogoAiCloudSocketManager implements IMogoSocketManager {
|
||||
|
||||
private static final String TAG = "SocketManager-apk";
|
||||
private static final String TAG = "MogoAiCloudSocketManager-apk";
|
||||
|
||||
private static volatile MogoAiCloudSocketManager sInstance;
|
||||
private String mAppId;
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@Keep
|
||||
public class MogoAiCloudSocketManager implements IMogoSocketManager {
|
||||
|
||||
private static final String TAG = "SocketManager-apk";
|
||||
private static final String TAG = "MogoAiCloudSocketManager-sdk";
|
||||
|
||||
private static volatile MogoAiCloudSocketManager sInstance;
|
||||
private String mAppId;
|
||||
|
||||
@@ -976,6 +976,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "satelliteTime", Long.valueOf( stateInfo.getValues().getSatelliteTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "receiverDataTime", Long.valueOf( stateInfo.getValues().getReceiverDataTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
|
||||
@@ -81,12 +81,8 @@ class SnapshotLocationController {
|
||||
double acceleration = data.optDouble( "acceleration", -1 );
|
||||
double yawRate = data.optDouble( "yawRate", -1 );
|
||||
double speed = data.optDouble( "speed", -1 );
|
||||
long satelliteTime = 0L;
|
||||
try {
|
||||
satelliteTime = Long.valueOf( data.optString( "satelliteTime" ) );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
long satelliteTime = data.optLong( "satelliteTime" );
|
||||
long systemTime = data.optLong( "systemTime" );
|
||||
|
||||
CloudLocationInfo cloudLocationInfo = new CloudLocationInfo();
|
||||
cloudLocationInfo.setAlt( alt );
|
||||
@@ -95,7 +91,7 @@ class SnapshotLocationController {
|
||||
cloudLocationInfo.setLon( lon );
|
||||
cloudLocationInfo.setSpeed( speed );
|
||||
cloudLocationInfo.setSatelliteTime( satelliteTime );
|
||||
cloudLocationInfo.setSystemTime( System.currentTimeMillis() );
|
||||
cloudLocationInfo.setSystemTime( systemTime );
|
||||
cloudLocationInfo.convertCoor2GCJ02();
|
||||
mLastLocationInfo = cloudLocationInfo;
|
||||
mMachineCacheList.add( cloudLocationInfo );
|
||||
|
||||
@@ -300,6 +300,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
@Override
|
||||
public void notifyOwnerCarState( AdasAIDLOwnerCarStateModel ownerCarStateModel ) {
|
||||
final long start = System.currentTimeMillis();
|
||||
ADASCarStateInfo stateInf = new ADASCarStateInfo();
|
||||
stateInf.setAction( "state" );
|
||||
ADASCarStateInfo.ValuesBean bean = new ADASCarStateInfo.ValuesBean();
|
||||
@@ -319,6 +320,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
if ( mMogoAdasCarDataCallback != null ) {
|
||||
mMogoAdasCarDataCallback.onAdasCarDataCallback( stateInf );
|
||||
}
|
||||
Logger.i("ADAS-LOC-timer", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -333,6 +335,8 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void notifyOwnerCarRect( List< AdasAIDLOwnerCarRectModel > ownerCarStateRectList ) {
|
||||
// 物体识别返回
|
||||
Logger.d( TAG, "onRectData = %s", ownerCarStateRectList.toString() );
|
||||
Logger.d( TAG, "ADAS-REC-received data: size = %s", ownerCarStateRectList==null?0:ownerCarStateRectList.size() );
|
||||
final long start = System.currentTimeMillis();
|
||||
if ( mLastFrameData == null ) {
|
||||
mLastFrameData = new ArrayList<>();
|
||||
}
|
||||
@@ -348,7 +352,12 @@ public class MogoADASController implements IMogoADASController {
|
||||
if ( !SingletonsHolder.get( IMogoStatusManager.class ).isMainPageLaunched() ) {
|
||||
return;
|
||||
}
|
||||
handleAdasRecognizedData( ownerCarStateRectList );
|
||||
try {
|
||||
handleAdasRecognizedData( ownerCarStateRectList );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Logger.i("ADAS-REC-timer", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
};
|
||||
AutopilotServiceManage.getInstance().registerAutopilotDataListener( mAutopolitDataCallBack );
|
||||
|
||||
@@ -63,7 +63,7 @@ public class MogoSocketManager implements IMogoSocketManager {
|
||||
public void init( Context context ) {
|
||||
|
||||
try {
|
||||
Class< ? > clazz = Class.forName( "com.mogo.aicloud.services.socket.SocketManager" );
|
||||
Class< ? > clazz = Class.forName( "com.mogo.aicloud.services.socket.MogoAiCloudSocketManager" );
|
||||
Method getInstanceMethod = clazz.getMethod( "getInstance", Context.class );
|
||||
getInstanceMethod.setAccessible( true );
|
||||
mDelegate = ( IMogoSocketManager ) getInstanceMethod.invoke( null, context );
|
||||
|
||||
Reference in New Issue
Block a user