merge branch

This commit is contained in:
tongchenfei
2021-01-07 19:33:30 +08:00
77 changed files with 1349 additions and 495 deletions

View File

@@ -103,8 +103,8 @@ public class MogoServiceProvider implements IMogoModuleProvider {
MogoRTKLocation.getInstance().init();
}
MogoServices.getInstance().preInit( context );
MogoServices.getInstance().init( AbsMogoApplication.getApp() );
UiThreadHandler.postDelayed( () -> {
MogoServices.getInstance().init( AbsMogoApplication.getApp() );
}, 5_000L );
}

View File

@@ -326,6 +326,7 @@ public class MogoServices implements IMogoMapListener,
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.TOP_VIEW, statusChangedListener );
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListener );
mStatusManager.setAIAssistReady( TAG, AIAssist.getInstance( mContext ).hasFlush() );
}
public void init( Context context ) {
@@ -337,9 +338,9 @@ public class MogoServices implements IMogoMapListener,
registerInternalUnWakeupWords();
mRegisterCenter = MarkerServiceHandler.getRegisterCenter();
mRegisterCenter.registerMogoMapListener( ServiceConst.TYPE, this );
mRegisterCenter.registerMogoLocationListener( ServiceConst.TYPE, this );
mRegisterCenter.registerMogoNaviListener( ServiceConst.TYPE, this );
mRegisterCenter.registerMogoMapListener( ServiceConst.TYPE, this );
mRegisterCenter.registerMogoAimlessModeListener( ServiceConst.TYPE, this );
mRegisterCenter.registerCarLocationChangedListener( ServiceConst.TYPE, this );
@@ -555,6 +556,8 @@ public class MogoServices implements IMogoMapListener,
MapMarkerManager.getInstance().syncLocation( latLng.lon, latLng.lat );
Logger.d( TAG, "zoom = %s", zoom );
if ( mIsCameraInited ) {
mLastZoomLevel = zoom;
mLastCustomRefreshCenterLocation = latLng;
@@ -925,16 +928,26 @@ public class MogoServices implements IMogoMapListener,
return mLastCarLocation;
}
private boolean mLastStatusIsVr = false;
@Override
public void onMapModeChanged( EnumMapUI ui ) {
if ( ui == EnumMapUI.Type_VR ) {
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, true );
MapCenterPointStrategy.resetByChangeMode();
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
if ( !mLastStatusIsVr ) {
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, true );
MapCenterPointStrategy.resetByChangeMode();
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
AIAssist.getInstance( mContext ).speakTTSVoice( "你已进入鹰眼模式" );
mLastStatusIsVr = true;
}
} else {
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, false );
MapCenterPointStrategy.resetByChangeMode();
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
if ( mLastStatusIsVr ) {
mLastStatusIsVr = false;
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, false );
MapCenterPointStrategy.resetByChangeMode();
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
AIAssist.getInstance( mContext ).speakTTSVoice( "你已离开鹰眼模式" );
}
}
}
}

View File

@@ -383,6 +383,10 @@ public class MockIntentHandler implements IntentHandler {
centerMarker.destroy();
}
break;
case 38:
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController()
.rtkEnable( false );
break;
}
}

View File

@@ -158,16 +158,13 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
@Override
public void onMsgReceived( MogoSnapshotSetData data ) {
if ( data == null ) {
return;
}
if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
// return;
}
if ( MogoServices.getInstance().getLastCarLocation() != null ) {
data.curSpeed = MogoServices.getInstance().getLastCarLocation().getSpeed();
}
// if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
//// return;
// }
//
// if ( MogoServices.getInstance().getLastCarLocation() != null ) {
// data.curSpeed = MogoServices.getInstance().getLastCarLocation().getSpeed();
// }
SnapshotSetDataDrawer.getInstance().renderSnapshotData( data, false );
// VrModeController.getInstance().renderMogoSnapshotSetData( data );
}

View File

@@ -90,13 +90,13 @@ class SnapshotUploadInTime implements MogoRTKLocation.RTKLocationListener {
locationResult.lastCoordinate = lastInfo;
locationResult.mortonCode = MortonCode.wrapEncodeMorton( lastInfo.getLon(), lastInfo.getLat() );
}
locationResult.coordinates = new ArrayList<>();
// locationResult.coordinates = new ArrayList<>();
locationResult.sn = com.mogo.commons.network.Utils.getSn();
if ( cloudLocationInfo == null ) {
locationResult.coordinates.addAll( new ArrayList<>() );
} else {
locationResult.coordinates.addAll( cloudLocationInfo );
}
// if ( cloudLocationInfo == null ) {
// locationResult.coordinates.addAll( new ArrayList<>() );
// } else {
// locationResult.coordinates.addAll( cloudLocationInfo );
// }
}
List< ADASRecognizedResult > recognizedResults = MarkerServiceHandler.getADASController().getLastADASRecognizedResult();
OnePerSecondSendContent content = new OnePerSecondSendContent();