@@ -2,7 +2,7 @@ package com.mogo.module.service.autopilot;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
import com.mogo.service.cloud.socket.IMogoSocketManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -23,14 +23,14 @@ class AutoPilotRemoteController {
|
||||
|
||||
private IMogoSocketManager mMogoSocketManager;
|
||||
|
||||
private IMogoOnMessageListener< RemoteControlAutoPilotParameters > mParametersListener = new IMogoOnMessageListener< RemoteControlAutoPilotParameters >() {
|
||||
private IMogoOnMessageListener<AutoPilotControlParameters> mParametersListener = new IMogoOnMessageListener<AutoPilotControlParameters>() {
|
||||
@Override
|
||||
public Class< RemoteControlAutoPilotParameters > target() {
|
||||
return RemoteControlAutoPilotParameters.class;
|
||||
public Class<AutoPilotControlParameters> target() {
|
||||
return AutoPilotControlParameters.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived( RemoteControlAutoPilotParameters obj ) {
|
||||
public void onMsgReceived( AutoPilotControlParameters obj ) {
|
||||
if ( obj == null ) {
|
||||
Logger.e( TAG, "远端控制参数为null", new NullPointerException() );
|
||||
return;
|
||||
|
||||
@@ -10,8 +10,8 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager;
|
||||
@@ -137,17 +137,17 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
private void startAutoPilot() {
|
||||
RemoteControlAutoPilotParameters currentAutopilot = new RemoteControlAutoPilotParameters();
|
||||
AutoPilotControlParameters currentAutopilot = new AutoPilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = false;
|
||||
List<RemoteControlAutoPilotParameters.AutoPilotLonLat> wayLatLon = new ArrayList<>();
|
||||
List<AutoPilotControlParameters.AutoPilotLonLat> wayLatLon = new ArrayList<>();
|
||||
if (receiverBean!=null && receiverBean.getStopsList()!= null){
|
||||
for (MogoLatLng mogoLatLng : receiverBean.getStopsList()) {
|
||||
wayLatLon.add(new RemoteControlAutoPilotParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon));
|
||||
wayLatLon.add(new AutoPilotControlParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon));
|
||||
}
|
||||
}
|
||||
currentAutopilot.wayLatLons = wayLatLon;
|
||||
currentAutopilot.startLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon());
|
||||
currentAutopilot.endLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
currentAutopilot.startLatLon = new AutoPilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon());
|
||||
currentAutopilot.endLatLon = new AutoPilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
currentAutopilot.vehicleType = 10;
|
||||
Logger.d(TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
mApis.getAdasControllerApi().aiCloudToAdasData(currentAutopilot);
|
||||
@@ -191,7 +191,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveAt(AdasOCHData data) {
|
||||
public void onArriveAt(AutoPilotStationInfo data) {
|
||||
Logger.d(TAG, "onArriveAt data : " + data.toString());
|
||||
double endLat = data.lat;
|
||||
double endLon = data.lon;
|
||||
|
||||
@@ -38,7 +38,7 @@ import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.status.EnvStatusManager;
|
||||
import com.mogo.module.service.timedelay.TimeDelayUploadManager;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.service.adas.entity.ADASCarStateInfo;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
@@ -526,10 +526,10 @@ public class MockIntentHandler implements IntentHandler {
|
||||
.onAutopilotArriveLike(intent.getIntExtra("type", 8));
|
||||
break;
|
||||
case 44:// 控制自动驾驶
|
||||
RemoteControlAutoPilotParameters parameters = new RemoteControlAutoPilotParameters();
|
||||
AutoPilotControlParameters parameters = new AutoPilotControlParameters();
|
||||
parameters.vehicleType = 9;
|
||||
parameters.startLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(40.1690522746, 116.567374558);
|
||||
parameters.endLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(40.1651999405, 116.567217441);
|
||||
parameters.startLatLon = new AutoPilotControlParameters.AutoPilotLonLat(40.1690522746, 116.567374558);
|
||||
parameters.endLatLon = new AutoPilotControlParameters.AutoPilotLonLat(40.1651999405, 116.567217441);
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getAdasControllerApi()
|
||||
|
||||
Reference in New Issue
Block a user