Merge branch 'dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_MogoAP_eagle-220_211207_8.0.17_merge
# Conflicts: # app/build.gradle # core/function-impl/mogo-core-function-autopilot/build.gradle # core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.java # modules/mogo-module-adas/build.gradle
This commit is contained in:
@@ -15,7 +15,6 @@ import android.view.MotionEvent;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
@@ -31,7 +30,6 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.service.handler.MainLooperHandler;
|
||||
import com.mogo.module.service.handler.RefreshWorkThreadHandler;
|
||||
@@ -46,7 +44,6 @@ import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.timedelay.TimeDelayUploadManager;
|
||||
import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.adas.IMogoAdasCarDataCallback;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
@@ -59,8 +56,6 @@ import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -81,12 +76,10 @@ public class MogoServices implements IMogoMapListener,
|
||||
IMogoVoiceCmdCallBack,
|
||||
FragmentStackTransactionListener,
|
||||
IMogoCarLocationChangedListener2,
|
||||
IMogoAdasCarDataCallback,
|
||||
IDestroyable {
|
||||
|
||||
private boolean mInternalUnWakeupRegisterStatus = false;
|
||||
|
||||
private Location mLastCarLocation;
|
||||
|
||||
private MogoServices() {
|
||||
// private constructor
|
||||
@@ -201,7 +194,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
mStatusManager.setUserInteractionStatus( ServiceConst.TYPE, true, false );
|
||||
mUiController.changeZoom( ServiceConst.DEFAULT_LOCK_CAR_ZOOM_LEVEL );
|
||||
// mUiController.setLockZoom( ServiceConst.DEFAULT_LOCK_CAR_ZOOM_LEVEL );
|
||||
mStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mUiController.recoverLockMode();
|
||||
notifyRefreshData( mLastAutoRefreshLocation, ServiceConst.DEFAULT_AUTO_REFRESH_DATA_RADIUS, mAutoRefreshCallback );
|
||||
@@ -265,11 +257,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
|
||||
private Handler mThreadHandler;
|
||||
|
||||
/**
|
||||
* 当前限速
|
||||
*/
|
||||
private int mCurrentLimit = -1;
|
||||
|
||||
private final IMogoStatusChangedListener statusChangedListener = new StatusChangedAdapter() {
|
||||
|
||||
@Override
|
||||
@@ -339,7 +326,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
mIntentManager.registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, this );
|
||||
|
||||
mADASController = MarkerServiceHandler.getADASController();
|
||||
mADASController.setAdasCarDataCallback( this );
|
||||
mFragmentManager = MarkerServiceHandler.getFragmentManager();
|
||||
|
||||
mFragmentManager.addMainFragmentStackTransactionListener( this );
|
||||
@@ -646,7 +632,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
if ( latLng == null ) {
|
||||
return;
|
||||
}
|
||||
mLastCarLocation = latLng;
|
||||
// poi 定位无法获取时,使用该定位
|
||||
if ( mLastAutoRefreshLocation == null ) {
|
||||
MogoLatLng point = new MogoLatLng( latLng.getLatitude(), latLng.getLongitude() );
|
||||
@@ -834,10 +819,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
MoGoAiCloudRealTime.stopRealTime();
|
||||
}
|
||||
|
||||
public Location getLastCarLocation() {
|
||||
return mLastCarLocation;
|
||||
}
|
||||
|
||||
private boolean mLastStatusIsVr = false;
|
||||
|
||||
public boolean isLastStatusIsVr() {
|
||||
@@ -873,49 +854,4 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdasCarDataCallback( AutopilotCarStateInfo stateInfo ) {
|
||||
|
||||
if(TimeDelayUploadManager.getInstance().isMock()){ //模拟数据时,不更新由工控机传输的自车位置
|
||||
return;
|
||||
}
|
||||
|
||||
if ( stateInfo != null && stateInfo.getValues() != null ) {
|
||||
JSONObject data = new JSONObject();
|
||||
try {
|
||||
data.putOpt( "lon", stateInfo.getValues().getLon() );
|
||||
data.putOpt( "lat", stateInfo.getValues().getLat() );
|
||||
data.putOpt( "alt", stateInfo.getValues().getAlt() );
|
||||
data.putOpt( "speed", stateInfo.getValues().getGnss_speed() );
|
||||
data.putOpt( "heading", stateInfo.getValues().getHeading() );
|
||||
data.putOpt( "acceleration", stateInfo.getValues().getAcceleration() );
|
||||
data.putOpt( "yawRate", stateInfo.getValues().getYaw_rate() );
|
||||
data.putOpt( "gpsProvider", 1 );
|
||||
try {
|
||||
data.putOpt( "systemTime", Long.parseLong( stateInfo.getValues().getSystemTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "satelliteTime", Long.parseLong( stateInfo.getValues().getSatelliteTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "receiverDataTime", Long.parseLong( stateInfo.getValues().getReceiverDataTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "adasSatelliteTime", Long.parseLong( stateInfo.getValues().getAdasSatelliteTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map( data );
|
||||
SnapshotLocationDataCenter.getInstance().syncAdasLocationInfo( data );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager;
|
||||
@@ -172,7 +173,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
currentAutopilot.vehicleType = 10;
|
||||
Logger.d(TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
mApis.getAdasControllerApi().aiCloudToAdasData(currentAutopilot);
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user