@@ -30,8 +30,8 @@ import com.mogo.och.bus.bean.UpdateSiteStatusRequest;
|
||||
import com.mogo.och.bus.fragment.OchBusFragment;
|
||||
import com.mogo.och.bus.net.IOchBusApiService;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -307,10 +307,10 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
|
||||
currentStation.setIsCurrentSite( STATION_STATUS_LEAVING );
|
||||
nextStation.setIsCurrentSite( STATION_STATUS_ARRIVING );
|
||||
|
||||
RemoteControlAutoPilotParameters currentAutopilot = new RemoteControlAutoPilotParameters();
|
||||
AutoPilotControlParameters currentAutopilot = new AutoPilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = !isRestart;
|
||||
currentAutopilot.startLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat( currentStation.getLat(), currentStation.getLon() );
|
||||
currentAutopilot.endLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat( nextStation.getLat(), nextStation.getLon() );
|
||||
currentAutopilot.startLatLon = new AutoPilotControlParameters.AutoPilotLonLat( currentStation.getLat(), currentStation.getLon() );
|
||||
currentAutopilot.endLatLon = new AutoPilotControlParameters.AutoPilotLonLat( nextStation.getLat(), nextStation.getLon() );
|
||||
currentAutopilot.vehicleType = VEHICLE_TYPE;
|
||||
Logger.d( TAG, "开启自动驾驶====" + currentAutopilot );
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().aiCloudToAdasData( currentAutopilot );
|
||||
@@ -354,7 +354,7 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveAt( AdasOCHData data ) {
|
||||
public void onArriveAt( AutoPilotStationInfo data ) {
|
||||
if ( currentStationIndex >= stationList.size() - 1 ) {
|
||||
Logger.e( TAG, "到站异常,取消后续操作" );
|
||||
return;
|
||||
|
||||
@@ -15,8 +15,8 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.och.taxi.ui.OCHTaxiUiController;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
@@ -714,7 +714,7 @@ class MogoOCHTaxiModel {
|
||||
*/
|
||||
private class OCHArriveNotifyCallback implements IMogoAdasOCHCallback {
|
||||
@Override
|
||||
public void onArriveAt( AdasOCHData data ) {
|
||||
public void onArriveAt( AutoPilotStationInfo data ) {
|
||||
if ( data == null ) {
|
||||
return;
|
||||
}
|
||||
@@ -853,10 +853,10 @@ class MogoOCHTaxiModel {
|
||||
return;
|
||||
}
|
||||
|
||||
RemoteControlAutoPilotParameters parameters = new RemoteControlAutoPilotParameters();
|
||||
AutoPilotControlParameters parameters = new AutoPilotControlParameters();
|
||||
parameters.vehicleType = mCurrentOCHOrder.orderType;
|
||||
parameters.startLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLon );
|
||||
parameters.endLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLon );
|
||||
parameters.startLatLon = new AutoPilotControlParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLon );
|
||||
parameters.endLatLon = new AutoPilotControlParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLon );
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getAdasControllerApi()
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.mogo.och.taxi.R;
|
||||
import com.mogo.och.view.SlidePanelView;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.service.adas.IMogoAdasRouteCallBack;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -524,7 +524,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveAt(AdasOCHData data) {
|
||||
public void onArriveAt(AutoPilotStationInfo data) {
|
||||
Logger.d( TAG, "行程结束");
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().cancelAutopilot();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.view.SlidePanelView;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
@@ -135,12 +135,12 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
findViewById(R.id.btnAutopilotControl).setOnClickListener(view ->
|
||||
{
|
||||
// Logger.d("lianglihui","模拟 站点下发工控");
|
||||
RemoteControlAutoPilotParameters currentAutopilot = new RemoteControlAutoPilotParameters();
|
||||
AutoPilotControlParameters currentAutopilot = new AutoPilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = true;
|
||||
// 万集东门站
|
||||
currentAutopilot.startLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(40.194795425,116.724476409);
|
||||
currentAutopilot.startLatLon = new AutoPilotControlParameters.AutoPilotLonLat(40.194795425,116.724476409);
|
||||
// 市政府前街18号
|
||||
currentAutopilot.endLatLon = new RemoteControlAutoPilotParameters.AutoPilotLonLat(40.1939540844,116.720067);
|
||||
currentAutopilot.endLatLon = new AutoPilotControlParameters.AutoPilotLonLat(40.1939540844,116.720067);
|
||||
// 订单运营类型 (9出租车,10小巴)
|
||||
currentAutopilot.vehicleType = 10;
|
||||
Logger.d(TAG, "模拟 订单站点下发:" + currentAutopilot);
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.mogo.eagle.core.function.autopilot
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.autopilot.AdasControlCommandParameter
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlCmdParameter
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotProvider
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
@@ -18,9 +18,13 @@ import com.zhidao.support.adas.high.AdasManager
|
||||
class MoGoAutoPilotProvider : IMoGoAutoPilotProvider {
|
||||
override fun init(context: Context) {}
|
||||
override fun connectAutoPilot() {}
|
||||
override fun startAutoPilot(result: RemoteControlAutoPilotParameters) {
|
||||
override fun startAutoPilot(result: AutoPilotControlParameters) {
|
||||
if (AdasManager.getInstance().isSocketConnect) {
|
||||
val parameter = AdasControlCommandParameter(TAG, result)
|
||||
val parameter =
|
||||
AutoPilotControlCmdParameter(
|
||||
TAG,
|
||||
result
|
||||
)
|
||||
AdasManager.getInstance().aiCloudToAdasData(GsonUtils.toJson(parameter))
|
||||
} else {
|
||||
LogUtils.eTag(TAG, "车机与工控机链接失败,无法开启自动驾驶")
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
@@ -100,7 +100,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 自动驾驶相关回调
|
||||
*/
|
||||
override fun onAutoPilotArriveAtStation(data: AdasOCHData?) {
|
||||
override fun onAutoPilotArriveAtStation(data: AutoPilotStationInfo?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,17 +5,14 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
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.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.LogUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlinx.android.synthetic.main.view_autopilot_status.view.*
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -70,10 +67,11 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
// startAutoPilot();
|
||||
}
|
||||
private fun startAutoPilot() {
|
||||
val currentAutopilot = RemoteControlAutoPilotParameters()
|
||||
val currentAutopilot =
|
||||
AutoPilotControlParameters()
|
||||
currentAutopilot.isSpeakVoice = false
|
||||
currentAutopilot.startLatLon = RemoteControlAutoPilotParameters.AutoPilotLonLat(40.194795425,116.724476409);
|
||||
currentAutopilot.endLatLon = RemoteControlAutoPilotParameters.AutoPilotLonLat(40.199730,116.735687);
|
||||
currentAutopilot.startLatLon = AutoPilotControlParameters.AutoPilotLonLat(40.194795425,116.724476409);
|
||||
currentAutopilot.endLatLon = AutoPilotControlParameters.AutoPilotLonLat(40.199730,116.735687);
|
||||
currentAutopilot.vehicleType = 10
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.aiCloudToAdasData(currentAutopilot)
|
||||
}
|
||||
@@ -105,7 +103,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onArriveAt(data: AdasOCHData?) {
|
||||
override fun onArriveAt(data: AutoPilotStationInfo?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ public
|
||||
* @author congtaowang
|
||||
* @since 2020/10/22
|
||||
*
|
||||
* 描述
|
||||
* 域控制器 控制指令发送
|
||||
*/
|
||||
class AdasControlCommandParameter {
|
||||
class AutoPilotControlCmdParameter {
|
||||
|
||||
public String action;
|
||||
public Object result;
|
||||
|
||||
public AdasControlCommandParameter( String action, Object result ) {
|
||||
public AutoPilotControlCmdParameter(String action, Object result ) {
|
||||
this.action = action;
|
||||
this.result = result;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
* <p>
|
||||
* 启动自动驾驶参数
|
||||
*/
|
||||
public class RemoteControlAutoPilotParameters {
|
||||
public class AutoPilotControlParameters {
|
||||
|
||||
public AutoPilotLonLat startLatLon;
|
||||
public List<AutoPilotLonLat> wayLatLons;
|
||||
@@ -7,13 +7,13 @@ public
|
||||
*
|
||||
* 自动驾驶网约车回调数据
|
||||
*/
|
||||
class AdasOCHData {
|
||||
class AutoPilotStationInfo {
|
||||
|
||||
public int type;
|
||||
public double lon;
|
||||
public double lat;
|
||||
|
||||
public AdasOCHData( int type, double lon, double lat ) {
|
||||
public AutoPilotStationInfo(int type, double lon, double lat ) {
|
||||
this.type = type;
|
||||
this.lon = lon;
|
||||
this.lat = lat;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider;
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ public interface IMoGoAutoPilotProvider extends IMoGoFunctionServerProvider {
|
||||
*
|
||||
* @param result
|
||||
*/
|
||||
void startAutoPilot(RemoteControlAutoPilotParameters result);
|
||||
void startAutoPilot(AutoPilotControlParameters result);
|
||||
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo;
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ public interface IMoGoAutoPilotStatusListener {
|
||||
*
|
||||
* @param data 所到车站的简单信息
|
||||
*/
|
||||
void onAutoPilotArriveAtStation(AdasOCHData data);
|
||||
void onAutoPilotArriveAtStation(AutoPilotStationInfo data);
|
||||
|
||||
/**
|
||||
* 自动驾驶状态发生改变
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
@@ -97,15 +97,15 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
|
||||
/**
|
||||
* 自动驾驶网约车回调数据 回调
|
||||
* @param adasOCHData 自动驾驶网约车回调数据
|
||||
* @param autoPilotStationInfo 自动驾驶网约车回调数据
|
||||
*/
|
||||
fun invokeArriveAtStationListener(adasOCHData: AdasOCHData) {
|
||||
LogUtils.dTag(TAG, "$adasOCHData")
|
||||
fun invokeArriveAtStationListener(autoPilotStationInfo: AutoPilotStationInfo) {
|
||||
LogUtils.dTag(TAG, "$autoPilotStationInfo")
|
||||
mAutoPilotStatusListeners.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
LogUtils.dTag(TAG, "tag:$tag listener:$listener")
|
||||
listener.onAutoPilotArriveAtStation(adasOCHData)
|
||||
listener.onAutoPilotArriveAtStation(autoPilotStationInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.service.adas;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlParameters;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
|
||||
@@ -78,7 +78,7 @@ public interface IMogoADASController extends IProvider {
|
||||
*
|
||||
* @param result
|
||||
*/
|
||||
void aiCloudToAdasData(RemoteControlAutoPilotParameters result);
|
||||
void aiCloudToAdasData(AutoPilotControlParameters result);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.service.adas;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ interface IMogoAdasOCHCallback {
|
||||
* 到站
|
||||
* @param data 所到车站的简单信息
|
||||
*/
|
||||
void onArriveAt( AdasOCHData data );
|
||||
void onArriveAt( AutoPilotStationInfo data );
|
||||
|
||||
/**
|
||||
* 自动驾驶状态发生改变
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasControlCommandParameter;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotControlCmdParameter;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.adas.AdasProvider;
|
||||
@@ -27,11 +27,11 @@ import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
import com.mogo.service.adas.IMogoAdasRecognizedDataCallback;
|
||||
import com.mogo.service.adas.IMogoAdasRouteCallBack;
|
||||
import com.mogo.service.adas.IMogoAdasWarnMessageCallback;
|
||||
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.adas.entity.ADASWarnMessage;
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo;
|
||||
import com.mogo.service.adas.entity.CarModelListResponse;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.impl.singleton.SingletonsHolder;
|
||||
@@ -358,7 +358,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
Logger.d(TAG,"autopilotArrive : " + autopilotArriveModel.toString());
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onArriveAt(new AdasOCHData(
|
||||
cb.onArriveAt(new AutoPilotStationInfo(
|
||||
autopilotArriveModel.getCarType(),
|
||||
autopilotArriveModel.getLon(),
|
||||
autopilotArriveModel.getLat())
|
||||
@@ -545,7 +545,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aiCloudToAdasData(RemoteControlAutoPilotParameters result) {
|
||||
public void aiCloudToAdasData(AutoPilotControlParameters result) {
|
||||
try {
|
||||
syncControlCmdToADAS("aiCloudToStartAutopilot", result);
|
||||
} catch (Exception e) {
|
||||
@@ -558,7 +558,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
* @param result
|
||||
*/
|
||||
private void syncControlCmdToADAS(String action, Object result) {
|
||||
AdasControlCommandParameter parameter = new AdasControlCommandParameter(action, result);
|
||||
AutoPilotControlCmdParameter parameter = new AutoPilotControlCmdParameter(action, result);
|
||||
//位置信息 action是aiCloudToStartAutopilot
|
||||
try {
|
||||
adasProvider.sendWsMessage(GsonUtil.jsonFromObject(parameter));
|
||||
@@ -711,7 +711,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void onAutopilotArriveLike(int carType) {
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onArriveAt(new AdasOCHData(
|
||||
cb.onArriveAt(new AutoPilotStationInfo(
|
||||
carType,
|
||||
116.09888888,
|
||||
39.999999)
|
||||
@@ -741,7 +741,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
if (state == -1) {
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onArriveAt(new AdasOCHData(1, 1d, 1d));
|
||||
cb.onArriveAt(new AutoPilotStationInfo(1, 1d, 1d));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user