[3.2.0] 优化M2乘客屏里程计算和主动获取轨迹时机

This commit is contained in:
wangmingjun
2023-05-24 17:58:51 +08:00
parent beacde1fed
commit c58a066243
2 changed files with 10 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ public class BusStationBean {
&& drivingStatus == that.drivingStatus
&& leaving == that.leaving
&& name.equals(that.name)
&& nameKr.equals(that.nameKr);
&& (nameKr == null || nameKr.equals(that.nameKr));
}
@Override

View File

@@ -267,7 +267,11 @@ class PM2DrivingModel private constructor() {
.coordinateConverterWgsToGcjLocations(mContext, routePoints)
d(SceneConstant.M_BUS_P + TAG, "och-rotting==latLngModels = " + latLngModels.size)
mRoutePoints.addAll(latLngModels)
calculateTwoStationsRoute()
if (isGoingToNextStation){
mTwoStationsRouts.clear()
startRemainRouteInfo()
}
}
private fun updateSpeed(mogoLocation: MogoLocation) {
@@ -497,6 +501,10 @@ class PM2DrivingModel private constructor() {
}
fun dynamicCalculateRouteInfo(){
//如果轨迹点为空发送一次获取轨迹指令
if (mRoutePoints.size == 0){
CallerAutoPilotControlManager.getGlobalPath()
}
//计算当前位置和下一站的剩余点集合
//计算剩余点总里程和时间
d(SceneConstant.M_BUS_P + TAG, "och-rotting==mTwoStationsRouts.size() = " + mTwoStationsRouts.size)