diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt index 0af825eb00..33369c39d8 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt @@ -192,19 +192,19 @@ class PM2DrivingModel private constructor() { private val moGoAutopilotPlanningListener = object : IMoGoPlanningRottingListener{ override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) { - val routePoints = globalPathResp?.wayPointsList - if (null != routePoints && routePoints.size > 0) { - updateRoutePoints(routePoints) -// startOrStopRouteAndWipe(true) + globalPathResp?.let { + d(SceneConstant.M_BUS_P + TAG, "och-rotting==wayPointsSize = " + it.wayPointsList.size) + updateRoutePoints(it.wayPointsList) } } } - fun updateRoutePoints(routePoints: List?) { + fun updateRoutePoints(routePoints: List?) { mRoutePoints.clear() val latLngModels = CoordinateCalculateRouteUtil .coordinateConverterWgsToGcjLocations(mContext, routePoints) + d(SceneConstant.M_BUS_P + TAG, "och-rotting==latLngModels = " + latLngModels.size) mRoutePoints.addAll(latLngModels) calculateTwoStationsRoute() } @@ -336,7 +336,7 @@ class PM2DrivingModel private constructor() { && station.isLeaving && i + 1 < stations.size) { mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i + 1, false) if (mNextStationIndex != i + 1) { - d(SceneConstant.M_BUS_P+TAG,"轨迹排查--开始行程") + d(SceneConstant.M_BUS_P+TAG,"och-rotting--start ") mTwoStationsRouts.clear() startRemainRouteInfo() } @@ -398,7 +398,7 @@ class PM2DrivingModel private constructor() { break } for (lastPoints in lastPointsMap.values) { - d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastPoints.size() = " + lastPoints.size) + d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastPoints.size() = " + lastPoints.size) var lastSumLength = 0f lastSumLength = if (lastPoints.size == 1) { //只是最后一个点,计算当前位置和最后一个点的距离 if (mNextStationIndex <= mStations.size - 1 && mNextStationIndex >= 0) { @@ -417,7 +417,7 @@ class PM2DrivingModel private constructor() { CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints) } val lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒 - d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastSumLength = $lastSumLength") + d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastSumLength = $lastSumLength") mDrivingInfoCallback?.updateRemainMT( lastSumLength.toLong(), lastTime.toLong() @@ -447,7 +447,7 @@ class PM2DrivingModel private constructor() { stationNext.gcjLat ) - d(SceneConstant.M_BUS_P + TAG, "轨迹排查==currentRouteIndex = " + currentRouteIndex + d(SceneConstant.M_BUS_P + TAG, "och-rotting==currentRouteIndex = " + currentRouteIndex + ", nextRouteIndex = " + nextRouteIndex) if (currentRouteIndex < nextRouteIndex) { //如果找到的next在起点的轨迹前面,直接舍弃这个轨迹,不显示