diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index e76b271851..df6a0d1ea0 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -326,15 +326,16 @@ public class BusOrderModel { //是否到站的围栏判断 离站状态并且自动驾驶还未触发到站 if (isGoingToNextStation && !isArrivedStation){ - judgeStartStation(location); + judgeArrivedStation(location); } } }; - //根据围栏判断,是否到达起点 - private void judgeStartStation(Location location) { + //根据围栏判断,是否到达站点 + private void judgeArrivedStation(Location location) { if (backgroundCurrentStationIndex +1 > stationList.size() - 1 ){ + CallerLogger.INSTANCE.e( M_BUS + TAG, "到站数组越界" ); return; } BusStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex +1); @@ -345,13 +346,8 @@ public class BusOrderModel { startLon, startLat, location.getLongitude(), location.getLatitude() ); - CallerLogger.INSTANCE.d(M_BUS + TAG,"judgeStartStation() distance = " + distance); - - if ( distance > BusConst.ARRIVE_AT_END_STATION_DISTANCE ) { - distance = CoordinateUtils.calculateLineDistance(startLon, startLat, - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(), - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat()); - } + CallerLogger.INSTANCE.d(M_BUS + TAG,"judgeArrivedStation() distance = " + distance + +" to " + upcomingStation.getName()); if ( distance <= BusConst.ARRIVE_AT_END_STATION_DISTANCE ) { onArriveAt(null); //无自动驾驶到站信息传null @@ -493,9 +489,12 @@ public class BusOrderModel { */ private void startAutopilot(boolean isRestart) { + if (backgroundCurrentStationIndex +1 > stationList.size() - 1 || !isGoingToNextStation){ + return; + } + triggerStartServiceEvent(isRestart, false); - isArrivedStation = false; BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex); BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex + 1); diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 5362bf5930..d18442ea0f 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -909,17 +909,17 @@ public class TaxiModel { startLon, startLat, location.getLongitude(), location.getLatitude()); - if (DebugConfig.isDebug() && mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.getCode()) { - // ToastUtils.showShort("距离上车点:" + Double.valueOf(distance).intValue()); - } +// if (DebugConfig.isDebug() && mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.getCode()) { +// // ToastUtils.showShort("距离上车点:" + Double.valueOf(distance).intValue()); +// } CallerLogger.INSTANCE.i(M_TAXI + TAG, "judgeStartStation() distance = " + distance); - if (distance > TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { - distance = CoordinateUtils.calculateLineDistance(startLon, startLat, - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(), - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat()); - } +// if (distance > TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { +// distance = CoordinateUtils.calculateLineDistance(startLon, startLat, +// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(), +// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat()); +// } if (distance <= TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { arrivedStartPoint(); @@ -1007,11 +1007,11 @@ public class TaxiModel { CallerLogger.INSTANCE.i(M_TAXI + TAG, "judgeEndStation() distance = " + distance); - if (distance > TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { - distance = CoordinateUtils.calculateLineDistance(startLon, startLat, - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(), - CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat()); - } +// if (distance > TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { +// distance = CoordinateUtils.calculateLineDistance(startLon, startLat, +// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(), +// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat()); +// } if (distance <= TaxiConst.ARRIVE_AT_START_STATION_DISTANCE) { if (!checkCurrentOCHOrder() diff --git a/app_mogo_magic_ring/src/main/java/com/zhidao/adas/magic/ui/MainActivity.java b/app_mogo_magic_ring/src/main/java/com/zhidao/adas/magic/ui/MainActivity.java index 34ce6568ae..cb31782c7b 100644 --- a/app_mogo_magic_ring/src/main/java/com/zhidao/adas/magic/ui/MainActivity.java +++ b/app_mogo_magic_ring/src/main/java/com/zhidao/adas/magic/ui/MainActivity.java @@ -45,6 +45,7 @@ import com.zhidao.support.adas.high.AdasManager; import com.zhidao.support.adas.high.AdasOptions; import com.zhidao.support.adas.high.OnAdasConnectStatusListener; import com.zhidao.support.adas.high.OnAdasListener; +import com.zhidao.support.adas.high.bean.AutopilotAbility; import com.zhidao.support.adas.high.bean.VersionCompatibility; import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS; import com.zhidao.support.adas.high.common.CupidLogUtils; @@ -804,4 +805,9 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas break; } } + + @Override + public void onAutopilotAbility(AutopilotAbility ability) { + + } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index 6f2b12c79d..842c5f0713 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -76,17 +76,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { } private void queryAppUpgrade() { -// UiThreadHandler.postDelayed(new Runnable() { -// @Override -// public void run() { -// CallerLogger.INSTANCE.d("Upgrade","queryAppUpgrade isConnectAutopilot = " + AppConfigInfo.INSTANCE.isConnectAutopilot()); -// Log.e("Upgrade", "queryAppUpgrade isConnectAutopilot = " + AppConfigInfo.INSTANCE.isConnectAutopilot()); -// if (AppConfigInfo.INSTANCE.isConnectAutopilot()) { -// MoGoHandAdasMsgManager.getInstance(getBaseContext()).getConfig(); -// } -// } -// },9000); - UiThreadHandler.postDelayed(new Runnable() { @Override public void run() { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt index 2747234d40..4a9406731f 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt @@ -28,7 +28,7 @@ enum class TrafficTypeEnum( "人", R.raw.traffic_people, R.raw.xingren, - R.raw.xingren + R.raw.xingren_night ), TYPE_TRAFFIC_ID_BICYCLE( 2, diff --git a/core/mogo-core-res/src/main/res/raw/xingren_night.nt3d b/core/mogo-core-res/src/main/res/raw/xingren_night.nt3d new file mode 100644 index 0000000000..a5af169049 Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/xingren_night.nt3d differ