[290 bus] 1、司机端增加到站围栏判断逻辑调整

This commit is contained in:
wangmingjun
2022-07-29 10:42:34 +08:00
parent c4cd4a3f8f
commit 3b3060d28b

View File

@@ -392,10 +392,10 @@ public class BusOrderModel {
//根据围栏判断,是否到达起点
private void judgeStartStation(Location location) {
if (backgroundCurrentStationIndex -1 < 0 || backgroundCurrentStationIndex > stationList.size()-1){
if (backgroundCurrentStationIndex +1 > stationList.size() - 1 ){
return;
}
BusStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex);
BusStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex +1);
double startLon = upcomingStation.getGcjLon();
double startLat = upcomingStation.getGcjLat();