diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 5279db84d2..6560a98983 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -30,7 +30,7 @@
-
+
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/AndroidManifest.xml b/OCH/mogo-och-bus/src/main/AndroidManifest.xml
index 83e4053945..8f40dcf1a5 100644
--- a/OCH/mogo-och-bus/src/main/AndroidManifest.xml
+++ b/OCH/mogo-och-bus/src/main/AndroidManifest.xml
@@ -1,5 +1,15 @@
- /
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java
index 096c8ca1d0..2172ec94f0 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java
@@ -16,7 +16,7 @@ public class OchBusStation {
private double lon;
private String siteDesc;
private int siteState;
- private int isCurrentSite;
+ private int isCurrentSite;// @see OchBusConst 是否是当前站 1:是 2:下一站 0:普通站
private int siteColor;
private String peoples;
private int ifStop; // 是否需要停靠、1需要、0不需要
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java
index 175572c36c..5f0cfa5f07 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java
@@ -6,6 +6,8 @@ package com.mogo.och.bus.constant;
* @author tongchenfei
*/
public class OchBusConst {
+ // 测试用的广播
+ public static final String BROADCAST_TEST_BUS_CONTROL_TYPE_EXTRA_KEY = "sceneType";
// 无状态
public static final int STATION_STATUS_IDLE = 0;
// 到站
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java
index eb597d78ac..da0cf9ba6c 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java
@@ -1,20 +1,15 @@
package com.mogo.och.bus.fragment;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.BaseOchFragment;
import com.mogo.och.bus.R;
-import com.mogo.och.bus.adapter.OchBusStationAdapter;
import com.mogo.och.bus.bean.OchBusStation;
-import com.mogo.och.bus.constant.OchBusConst;
import com.mogo.och.bus.presenter.OchBusPresenter;
import com.mogo.och.view.SlidePanelView;
import com.mogo.service.adas.IMogoAdasOCHCallback;
@@ -39,7 +34,6 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
private View mBus;
-// private OchBusStationAdapter adapter;
@Override
protected void initViews() {
@@ -50,10 +44,6 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
mNextStationName = findViewById( R.id.module_och_bus_order_end_station );
mEndStationFlag = findViewById( R.id.module_och_bus_end_station_tag );
-// adapter = new OchBusStationAdapter( getContext() );
-// rvStationList.setAdapter( adapter );
-// rvStationList.setLayoutManager( new LinearLayoutManager( getContext() ) );
-
if ( DebugConfig.isDebug() ) {
mBus.setOnClickListener( view -> {
TipToast.shortTip( "重置了车站状态" );
@@ -67,6 +57,7 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
}
Logger.d( TAG, "initView: " + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() );
+ // 初始化的时候设置 UI 按钮状态
switch ( MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() ) {
case IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE:
hideAutopilotBiz();
@@ -129,15 +120,21 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
boolean isArriveAtStation = false;
boolean isArriveAtStartStation = false;
+ // 获取当前站点的名称
currentStationName = stationList.get( currentStation ).getSiteName();
+ // 是否到达起点
if ( currentStation == 0 ) {
startStationFlagVisibility = View.VISIBLE;
isArriveAtStartStation = true;
mStartStationFlag.setText( "始" );
- } else if ( currentStation > 0 && currentStation < stationList.size() - 1 ) {
+ }
+ // 是否到达站点
+ else if ( currentStation > 0 && currentStation < stationList.size() - 1 ) {
isArriveAtStation = true;
- } else if ( currentStation == stationList.size() - 1 ) {
+ }
+ // 是否到达终点
+ else if ( currentStation == stationList.size() - 1 ) {
isArriveEndStation = true;
nextStationName = "--";
mStartStationFlag.setText( "终" );
@@ -145,14 +142,17 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
endStationFlagVisibility = View.INVISIBLE;
}
+ // 获取下一站点名称
if ( nextStation > currentStation && nextStation <= stationList.size() - 1 ) {
nextStationName = stationList.get( nextStation ).getSiteName();
}
+ // 是否到达终点
if ( nextStation == stationList.size() - 1 ) {
endStationFlagVisibility = View.VISIBLE;
}
+ // 重置滑动按钮文字
if ( isArriveEndStation ) {
showSlidePanle( "单程结束" );
} else if ( isArriveAtStartStation ) {
@@ -189,9 +189,13 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
@Override
public void moveToEnd() {
+ // 开启自动驾驶到下一站
mPresenter.autoDriveToNextStation(false);
}
+ /**
+ * 设置自动驾驶可用状态
+ */
public void onAutopilotEnableChange( boolean isEnable ) {
if ( isEnable ) {
showAutopilotBiz();
@@ -206,6 +210,10 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
mPresenter.onChangeOperationStatus();
}
+ /**
+ * 修改经营状态
+ * @param launch true-收车,false-出车
+ */
public void changeOperationStatus( boolean launch ) {
if ( launch ) {
tvOperationStatus.setText( "收车" );
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java
index 80d9a4d381..8b11406e96 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java
@@ -11,6 +11,8 @@ import com.mogo.och.bus.bean.OchBusStation;
import com.mogo.och.bus.bean.OchBusStationsChangedMsg;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.utils.UiThreadHandler;
+import com.mogo.utils.logger.Logger;
+import com.mogo.utils.network.utils.GsonUtil;
import java.util.List;
@@ -22,6 +24,7 @@ public
* 小巴订单管理
*/
class OchBusOrderModel {
+ private final String TAG = "OchBusOrderModel";
private static volatile OchBusOrderModel sInstance;
@@ -38,8 +41,14 @@ class OchBusOrderModel {
public void init() {
mContext = AbsMogoApplication.getApp();
- MogoApisHandler.getInstance().getApis().getSocketManagerApi( mContext ).registerOnMessageListener( 401021, mOnOrderListener );
- MogoApisHandler.getInstance().getApis().getSocketManagerApi( mContext ).registerOnMessageListener( 401020, mOnBusStationsChangedMsg );
+ MogoApisHandler.getInstance()
+ .getApis()
+ .getSocketManagerApi( mContext )
+ .registerOnMessageListener( 401021, mOnOrderListener );
+ MogoApisHandler.getInstance()
+ .getApis()
+ .getSocketManagerApi( mContext )
+ .registerOnMessageListener( 401020, mOnBusStationsChangedMsg );
}
private Object readResolve() {
@@ -62,6 +71,8 @@ class OchBusOrderModel {
@Override
public void onMsgReceived( OchBusOrder obj ) {
+ Logger.i(TAG, "401021--小巴订单:" + GsonUtil.jsonFromObject(obj));
+
if ( obj == null ) {
return;
}
@@ -85,6 +96,8 @@ class OchBusOrderModel {
@Override
public void onMsgReceived( OchBusStationsChangedMsg obj ) {
+ Logger.i(TAG, "401020--站点信息变更推送:" + GsonUtil.jsonFromObject(obj));
+
if ( obj == null ) {
return;
}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java
index f7033b08b7..babf1a232d 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java
@@ -101,9 +101,10 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 查询小巴路线
*/
public void queryBusRoutes() {
+ Logger.d( TAG, "查询小巴路线");
+
double lat = 40.1974932972;
double lon = 116.7354579447;
-
lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat();
lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon();
@@ -150,17 +151,21 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* @param site
*/
private void renderBusStationsStatus( List< OchBusStation > site ) {
+ Logger.d( TAG, "渲染站点信息");
+
int lastStopStation = getNextStopStation();
stationList.clear();
stationList.addAll( site );
for ( int i = 0; i < stationList.size(); i++ ) {
OchBusStation s = stationList.get( i );
+ // 是否正在开往下一站
if ( s.getIsCurrentSite() == STATION_STATUS_LEAVING ) {
isGoingToNextStation = true;
mView.hideSlidePanel();
}
+ //
if ( s.getIsCurrentSite() == STATION_STATUS_LEAVING
|| s.getIsCurrentSite() == STATION_STATUS_STOPPED ) {
currentStationIndex = i;
@@ -183,6 +188,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* @param lastStopStation
*/
private void resetNextStopStation( int lastStopStation ) {
+ Logger.d( TAG, "重置下一站");
+
int nextStopStation = getNextStopStation();
if ( nextStopStation < 0 ) {
return;
@@ -223,7 +230,7 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
}
/**
- * 在踩刹车、控制方向盘等操作后,会停止自动加水,重启自动驾驶的话相当于重新设置自动驾驶目的地
+ * 在踩刹车、控制方向盘等操作后,会停止自动驾驶,重启自动驾驶的话相当于重新设置自动驾驶目的地
*/
public void restartAutopilot() {
Logger.d( TAG, "重启自动驾驶===" + isGoingToNextStation );
@@ -236,6 +243,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 测试、重置站点状态
*/
public void debugResetStationStatus() {
+ Logger.d( TAG, "测试、重置站点状态");
+
OchBusResetRequest request = new OchBusResetRequest( Utils.getSn(), 1 );
RequestBody requestBody = RequestBody.create( MediaType.get( "application/json;charset=UTF-8" ), GsonUtil.jsonFromObject( request ) );
mService.debugResetStationStatus( requestBody )
@@ -275,6 +284,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 开启自动驾驶到下一站
*/
public void autoDriveToNextStation( boolean isRestart ) {
+ Logger.d( TAG, "开启自动驾驶到下一站");
+
if ( currentStationIndex >= stationList.size() - 1 ) {
// 当前站是最后一站,结束当前行程
travelOver();
@@ -352,6 +363,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 到站后重置站点状态
*/
private void updateSiteStation() {
+ Logger.d( TAG, "到站后重置站点状态");
+
mService.updateSiteStation( new UpdateSiteStatusRequest( stationList.get( currentStationIndex ).getSiteId() ) )
.subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -383,6 +396,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 查询到站下车乘客
*/
private void queryLeaveAwayPassengers() {
+ Logger.d( TAG, "查询到站下车乘客");
+
mService.queryStationLeaveAwayPassengers( new QueryLeaveAwayPassengersRequest( stationList.get( currentStationIndex ).getSiteId() ) )
.subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -413,6 +428,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* @param o
*/
private void playLeavePassengersMsg( QueryLeaveAwayPassengersResponse o ) {
+ Logger.d( TAG, "播报下车乘客信息");
+
if ( currentStationIndex > stationList.size() - 1 ) {
return;
}
@@ -443,6 +460,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 行程结束
*/
private void travelOver() {
+ Logger.d( TAG, "行程结束");
+
if ( currentStationIndex >= stationList.size() ) {
Logger.e( TAG, "travel over index out of station list" );
return;
@@ -484,13 +503,16 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
Logger.d( TAG, "onStateChange: " + state );
switch ( state ) {
case IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE:
+ // 设置UI【自动驾驶】按钮是否展示
mView.onAutopilotEnableChange( true );
+ // 改变UI自动驾驶状态
mView.onAutopilotStatusChanged( false );
if ( isGoingToNextStation ) {
mView.hideSlidePanel();
}
break;
case IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING:
+ // 改变UI自动驾驶状态
mView.onAutopilotStatusChanged( true );
break;
default:
@@ -516,6 +538,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 修改小巴运营状态
*/
public void onChangeOperationStatus() {
+ Logger.d( TAG, "修改小巴运营状态");
+
mService.changeOperationStatus( isWorking() ? new OchBusOperationStatusRequest().shutdown() : new OchBusOperationStatusRequest().launch() )
.subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -552,6 +576,8 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
* 查询运营状态
*/
public void queryOperationStatus() {
+ Logger.d( TAG, "查询运营状态");
+
mService.queryOperationStatus( new QueryOchBusOperationStatusRequest() )
.subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -570,13 +596,13 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
@Override
public void onError( String message, int code ) {
super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
+ Logger.d( TAG, "查询运营状态 error: " + message );
}
@Override
public void onError( Throwable e ) {
super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
+ Logger.e( TAG, e, "查询运营状态 exception" );
}
} );
}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java
new file mode 100644
index 0000000000..066b55b112
--- /dev/null
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java
@@ -0,0 +1,40 @@
+package com.mogo.och.bus.receiver;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+import com.mogo.och.bus.constant.OchBusConst;
+import com.mogo.utils.logger.Logger;
+
+/**
+ * 测试小巴车的场景
+ *
+ * @author donghongyu
+ * @date 4/26/21 12:08 PM
+ */
+public class TestOchBusBroadcastReceiver extends BroadcastReceiver {
+ private static final String TAG = "TestOchBusBroadcastReceiver";
+
+ private Context mContext;
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ try {
+ this.mContext = context;
+ int sceneType = intent.getIntExtra(OchBusConst.BROADCAST_TEST_BUS_CONTROL_TYPE_EXTRA_KEY, 0);
+ Logger.d(TAG, "sceneType:" + sceneType);
+
+ // 分发场景
+ dispatchSceneTest(sceneType);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void dispatchSceneTest(int sceneType) {
+
+ }
+
+
+}
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_order_1.json b/OCH/mogo-och-bus/src/main/res/raw/bug_order_1.json
new file mode 100644
index 0000000000..050b67447d
--- /dev/null
+++ b/OCH/mogo-och-bus/src/main/res/raw/bug_order_1.json
@@ -0,0 +1,28 @@
+{
+ "_id": "62bc84afbc434d01b644c74ee406e772",
+ "areaCode": "1001",
+ "carNum": "京NB010",
+ "cityCode": "010",
+ "createTime": "Apr 26, 2021 10:48:22 AM",
+ "endStation": "顺密路口站",
+ "endStationCoordinate": [
+ 116.721520973,
+ 40.1940181096
+ ],
+ "endStationId": 2,
+ "orderDispatchType": 1,
+ "orderNo": "XB20210426000002",
+ "orderStartTime": "Apr 26, 2021 10:48:22 AM",
+ "orderType": 10,
+ "sn": "F803EB2046PZD00149",
+ "startStation": "万集东门站",
+ "startStationCoordinate": [
+ 116.7354579447,
+ 40.1974932972
+ ],
+ "startStationId": 1,
+ "travelDistance": 1.2,
+ "updateTime": "Apr 26, 2021 10:48:23 AM",
+ "userName": "董QAD",
+ "userPhone": "15631204018"
+}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_station_list1.json b/OCH/mogo-och-bus/src/main/res/raw/bug_station_list1.json
new file mode 100644
index 0000000000..cf271b2883
--- /dev/null
+++ b/OCH/mogo-och-bus/src/main/res/raw/bug_station_list1.json
@@ -0,0 +1,549 @@
+{
+ "code": 0,
+ "msg": "",
+ "detailMsg": "",
+ "result": {
+ "site": [
+ {
+ "lineId": 1.0,
+ "siteId": 1.0,
+ "siteName": "万集东门站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7354579447,
+ 40.1974932972
+ ],
+ "lon": 116.7354579447,
+ "lat": 40.1974932972,
+ "siteDesc": "万集东门站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 1.0,
+ "siteName": "万集东门站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7374429112,
+ 40.2023987087
+ ],
+ "lon": 116.7374429112,
+ "lat": 40.2023987087,
+ "siteDesc": "万集东门站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.721520973,
+ 40.1940181096
+ ],
+ "lon": 116.721520973,
+ "lat": 40.1940181096,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723146,
+ 40.179637
+ ],
+ "lon": 116.723146,
+ "lat": 40.179637,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 2.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.738835502,
+ 40.2023958306
+ ],
+ "lon": 116.738835502,
+ "lat": 40.2023958306,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 3.0,
+ "siteName": "第三站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723232,
+ 40.180637
+ ],
+ "lon": 116.723232,
+ "lat": 40.180637,
+ "siteDesc": "这里是第三站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 4.0,
+ "siteName": "第四站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72343,
+ 40.182092
+ ],
+ "lon": 116.72343,
+ "lat": 40.182092,
+ "siteDesc": "这里是第四站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 5.0,
+ "siteName": "第五站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7235,
+ 40.182699
+ ],
+ "lon": 116.7235,
+ "lat": 40.182699,
+ "siteDesc": "这里是第五站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 6.0,
+ "siteName": "第六站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723789,
+ 40.185416
+ ],
+ "lon": 116.723789,
+ "lat": 40.185416,
+ "siteDesc": "这里是第六站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 7.0,
+ "siteName": "第七站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723977,
+ 40.18701
+ ],
+ "lon": 116.723977,
+ "lat": 40.18701,
+ "siteDesc": "这里是第七站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 8.0,
+ "siteName": "第八站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72431,
+ 40.190182
+ ],
+ "lon": 116.72431,
+ "lat": 40.190182,
+ "siteDesc": "这里是第八站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 9.0,
+ "siteName": "第九站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72431,
+ 40.190182
+ ],
+ "lon": 116.72431,
+ "lat": 40.190182,
+ "siteDesc": "这里是第九站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 10.0,
+ "siteName": "第十站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.724503,
+ 40.192026
+ ],
+ "lon": 116.724503,
+ "lat": 40.192026,
+ "siteDesc": "这里是第十站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 11.0,
+ "siteName": "第十一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.724873,
+ 40.19489
+ ],
+ "lon": 116.724873,
+ "lat": 40.19489,
+ "siteDesc": "这里是第十一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 14.0,
+ "siteName": "第十四站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.728258,
+ 40.195255
+ ],
+ "lon": 116.728258,
+ "lat": 40.195255,
+ "siteDesc": "这里是第十四站",
+ "siteState": 1.0,
+ "isCurrentSite": 2.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 15.0,
+ "siteName": "第十五站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.729288,
+ 40.195476
+ ],
+ "lon": 116.729288,
+ "lat": 40.195476,
+ "siteDesc": "这里是第十五站",
+ "siteState": 1.0,
+ "isCurrentSite": 3.0,
+ "siteColor": 2.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 16.0,
+ "siteName": "第十六站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.730554,
+ 40.195952
+ ],
+ "lon": 116.730554,
+ "lat": 40.195952,
+ "siteDesc": "这里是第十六站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 17.0,
+ "siteName": "第十七站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.732227,
+ 40.196374
+ ],
+ "lon": 116.732227,
+ "lat": 40.196374,
+ "siteDesc": "这里是第十七站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 18.0,
+ "siteName": "第十八站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.732978,
+ 40.196443
+ ],
+ "lon": 116.732978,
+ "lat": 40.196443,
+ "siteDesc": "这里是第十八站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 19.0,
+ "siteName": "第十九站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.733671,
+ 40.196497
+ ],
+ "lon": 116.733671,
+ "lat": 40.196497,
+ "siteDesc": "这里是第十九站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 20.0,
+ "siteName": "第二十站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.736852,
+ 40.196493
+ ],
+ "lon": 116.736852,
+ "lat": 40.196493,
+ "siteDesc": "这里是第二十站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 21.0,
+ "siteName": "第二十一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.737866,
+ 40.19646
+ ],
+ "lon": 116.737866,
+ "lat": 40.19646,
+ "siteDesc": "这里是第二十一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 22.0,
+ "siteName": "第二十二站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.745177,
+ 40.19646
+ ],
+ "lon": 116.745177,
+ "lat": 40.19646,
+ "siteDesc": "这里是第二十二站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 23.0,
+ "siteName": "第二十三站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.750644,
+ 40.196402
+ ],
+ "lon": 116.750644,
+ "lat": 40.196402,
+ "siteDesc": "这里是第二十三站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 10000.0,
+ "siteId": 10000.0,
+ "siteName": "0409第一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7389159039,
+ 40.1992312592
+ ],
+ "lon": 116.7389159039,
+ "lat": 40.1992312592,
+ "siteDesc": "0409这里第一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 10000.0,
+ "siteId": 10000.0,
+ "siteName": "0409第一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7389159039,
+ 40.1992312592
+ ],
+ "lon": 116.7389159039,
+ "lat": 40.1992312592,
+ "siteDesc": "0409这里第一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 10001.0,
+ "siteId": 10002.0,
+ "siteName": "0409第二站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7375553739,
+ 40.1992677344
+ ],
+ "lon": 116.7375553739,
+ "lat": 40.1992677344,
+ "siteDesc": "这里是第二站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_station_list2.json b/OCH/mogo-och-bus/src/main/res/raw/bug_station_list2.json
new file mode 100644
index 0000000000..4dd9fa4f06
--- /dev/null
+++ b/OCH/mogo-och-bus/src/main/res/raw/bug_station_list2.json
@@ -0,0 +1,549 @@
+{
+ "code": 0,
+ "msg": "",
+ "detailMsg": "",
+ "result": {
+ "site": [
+ {
+ "lineId": 1.0,
+ "siteId": 1.0,
+ "siteName": "万集东门站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7354579447,
+ 40.1974932972
+ ],
+ "lon": 116.7354579447,
+ "lat": 40.1974932972,
+ "siteDesc": "万集东门站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 1.0,
+ "siteName": "万集东门站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7374429112,
+ 40.2023987087
+ ],
+ "lon": 116.7374429112,
+ "lat": 40.2023987087,
+ "siteDesc": "万集东门站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.721520973,
+ 40.1940181096
+ ],
+ "lon": 116.721520973,
+ "lat": 40.1940181096,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723146,
+ 40.179637
+ ],
+ "lon": 116.723146,
+ "lat": 40.179637,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 2.0,
+ "siteId": 2.0,
+ "siteName": "顺密路口站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.738835502,
+ 40.2023958306
+ ],
+ "lon": 116.738835502,
+ "lat": 40.2023958306,
+ "siteDesc": "顺密路口站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 3.0,
+ "siteName": "第三站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723232,
+ 40.180637
+ ],
+ "lon": 116.723232,
+ "lat": 40.180637,
+ "siteDesc": "这里是第三站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 4.0,
+ "siteName": "第四站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72343,
+ 40.182092
+ ],
+ "lon": 116.72343,
+ "lat": 40.182092,
+ "siteDesc": "这里是第四站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 5.0,
+ "siteName": "第五站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7235,
+ 40.182699
+ ],
+ "lon": 116.7235,
+ "lat": 40.182699,
+ "siteDesc": "这里是第五站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 6.0,
+ "siteName": "第六站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723789,
+ 40.185416
+ ],
+ "lon": 116.723789,
+ "lat": 40.185416,
+ "siteDesc": "这里是第六站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 7.0,
+ "siteName": "第七站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.723977,
+ 40.18701
+ ],
+ "lon": 116.723977,
+ "lat": 40.18701,
+ "siteDesc": "这里是第七站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 8.0,
+ "siteName": "第八站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72431,
+ 40.190182
+ ],
+ "lon": 116.72431,
+ "lat": 40.190182,
+ "siteDesc": "这里是第八站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 9.0,
+ "siteName": "第九站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.72431,
+ 40.190182
+ ],
+ "lon": 116.72431,
+ "lat": 40.190182,
+ "siteDesc": "这里是第九站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 10.0,
+ "siteName": "第十站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.724503,
+ 40.192026
+ ],
+ "lon": 116.724503,
+ "lat": 40.192026,
+ "siteDesc": "这里是第十站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 11.0,
+ "siteName": "第十一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.724873,
+ 40.19489
+ ],
+ "lon": 116.724873,
+ "lat": 40.19489,
+ "siteDesc": "这里是第十一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 14.0,
+ "siteName": "第十四站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.728258,
+ 40.195255
+ ],
+ "lon": 116.728258,
+ "lat": 40.195255,
+ "siteDesc": "这里是第十四站",
+ "siteState": 1.0,
+ "isCurrentSite": 2.0,
+ "siteColor": 1.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 15.0,
+ "siteName": "第十五站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.729288,
+ 40.195476
+ ],
+ "lon": 116.729288,
+ "lat": 40.195476,
+ "siteDesc": "这里是第十五站",
+ "siteState": 1.0,
+ "isCurrentSite": 3.0,
+ "siteColor": 2.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 16.0,
+ "siteName": "第十六站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.730554,
+ 40.195952
+ ],
+ "lon": 116.730554,
+ "lat": 40.195952,
+ "siteDesc": "这里是第十六站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 17.0,
+ "siteName": "第十七站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.732227,
+ 40.196374
+ ],
+ "lon": 116.732227,
+ "lat": 40.196374,
+ "siteDesc": "这里是第十七站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 18.0,
+ "siteName": "第十八站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.732978,
+ 40.196443
+ ],
+ "lon": 116.732978,
+ "lat": 40.196443,
+ "siteDesc": "这里是第十八站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 19.0,
+ "siteName": "第十九站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.733671,
+ 40.196497
+ ],
+ "lon": 116.733671,
+ "lat": 40.196497,
+ "siteDesc": "这里是第十九站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 20.0,
+ "siteName": "第二十站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.736852,
+ 40.196493
+ ],
+ "lon": 116.736852,
+ "lat": 40.196493,
+ "siteDesc": "这里是第二十站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 21.0,
+ "siteName": "第二十一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.737866,
+ 40.19646
+ ],
+ "lon": 116.737866,
+ "lat": 40.19646,
+ "siteDesc": "这里是第二十一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 22.0,
+ "siteName": "第二十二站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.745177,
+ 40.19646
+ ],
+ "lon": 116.745177,
+ "lat": 40.19646,
+ "siteDesc": "这里是第二十二站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 1.0,
+ "siteId": 23.0,
+ "siteName": "第二十三站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.750644,
+ 40.196402
+ ],
+ "lon": 116.750644,
+ "lat": 40.196402,
+ "siteDesc": "这里是第二十三站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 0.0
+ },
+ {
+ "lineId": 10000.0,
+ "siteId": 10000.0,
+ "siteName": "0409第一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7389159039,
+ 40.1992312592
+ ],
+ "lon": 116.7389159039,
+ "lat": 40.1992312592,
+ "siteDesc": "0409这里第一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 10000.0,
+ "siteId": 10000.0,
+ "siteName": "0409第一站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7389159039,
+ 40.1992312592
+ ],
+ "lon": 116.7389159039,
+ "lat": 40.1992312592,
+ "siteDesc": "0409这里第一站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ },
+ {
+ "lineId": 10001.0,
+ "siteId": 10002.0,
+ "siteName": "0409第二站",
+ "cityCode": "010",
+ "areaCode": "1001",
+ "areaName": "顺义区",
+ "currentLocation": [
+ 116.7375553739,
+ 40.1992677344
+ ],
+ "lon": 116.7375553739,
+ "lat": 40.1992677344,
+ "siteDesc": "这里是第二站",
+ "siteState": 1.0,
+ "isCurrentSite": 0.0,
+ "siteColor": 0.0,
+ "peoples": "0",
+ "ifStop": 1.0
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java
index 39c96cd74e..25fb40687e 100644
--- a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java
+++ b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java
@@ -6,19 +6,17 @@ import android.widget.CheckedTextView;
import android.widget.FrameLayout;
import android.widget.TextView;
+import androidx.constraintlayout.widget.Group;
+
+import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.mvp.IView;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.commons.mvp.Presenter;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.view.OnPreventFastClickListener;
-import com.mogo.och.view.FrameAnimImageView;
import com.mogo.och.view.SlidePanelView;
import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
-import com.mogo.utils.UiThreadHandler;
-import com.mogo.utils.logger.Logger;
/**
* 网约车基础Fragment,主要负责布局通用界面,处理站点面板和通话面板互斥情况
@@ -35,8 +33,12 @@ public abstract class BaseOchFragment> e
private CheckedTextView ctvAutopilotStatus;
protected TextView tvOperationStatus;
private FrameLayout flStationPanelContainer;
+ private Group groupTestPanel;
+ /**
+ * 滑动按钮触发的事件
+ */
private final SlidePanelView.OnSlidePanelMoveToEndListener onSlideToEndListener = () -> {
// 此处做一个代理,处理一下共有情况
if (getSlidePanelOnEndListener() != null) {
@@ -48,14 +50,17 @@ public abstract class BaseOchFragment> e
protected int getLayoutId() {
return R.layout.module_mogo_och_base_fragment;
}
+
private View panelView;
+
@Override
protected void initViews() {
+ groupTestPanel = findViewById(R.id.groupTestPanel);
slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
- tvOperationStatus = findViewById( R.id.module_mogo_och_operation_status );
+ tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener);
@@ -68,39 +73,62 @@ public abstract class BaseOchFragment> e
}
});
+ // debug下调用测试面板
+ if (DebugConfig.isDebug()) {
+ ctvAutopilotStatus.setOnLongClickListener(v -> {
+ if (groupTestPanel.getVisibility() == View.VISIBLE) {
+ groupTestPanel.setVisibility(View.GONE);
+ } else {
+ groupTestPanel.setVisibility(View.VISIBLE);
+ }
+ return false;
+ });
+ }
+
onAutopilotStatusChanged(MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
- checkCallView(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isCallViewShow());
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("Och", StatusDescriptor.CALL_VIEW, callViewListener);
+ // 模拟 不可自动驾驶,目前场景是刚开机,adas还未和工控机连接
+ findViewById(R.id.btnAutopilotDisable).setOnClickListener(view ->
+ MogoApisHandler.getInstance().getApis()
+ .getAdasControllerApi()
+ .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE, "不能使用")
+ );
- findViewById(R.id.btnAutopilotDisable).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE, "不能使用"));
+ // 模拟 可自动驾驶,工控机连接正常,且处于人工干预状态
+ findViewById(R.id.btnAutopilotEnable).setOnClickListener(view ->
+ MogoApisHandler.getInstance().getApis()
+ .getAdasControllerApi()
+ .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE, "能使用")
+ );
- findViewById(R.id.btnAutopilotEnable).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE, "能使用"));
+ // 模拟 自动驾驶能力,自动驾驶中,可能是停车,可能是行进,但是是机器在处理车的前进后退,不是人
+ findViewById(R.id.btnAutopilotRunning).setOnClickListener(view ->
+ MogoApisHandler.getInstance().getApis()
+ .getAdasControllerApi()
+ .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING, "Running")
+ );
- findViewById(R.id.btnAutopilotRunning).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING, "Running"));
+ // 模拟 自动驾驶网约车回调数据
+ findViewById(R.id.btnAutopilotArrive).setOnClickListener(view ->
+ MogoApisHandler.getInstance().getApis()
+ .getAdasControllerApi().mockOchStatus(-1, "Arrived")
+ );
- findViewById(R.id.btnAutopilotArrive).setOnClickListener(view -> MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockOchStatus(-1, "Running"));
-
- tvOperationStatus.setOnClickListener( view -> {
+ tvOperationStatus.setOnClickListener(view -> {
onChangeOperationStatus();
- } );
+ });
}
- protected void onChangeOperationStatus(){
+ protected void onChangeOperationStatus() {
}
- private void checkCallView(boolean isShown) {
- if (flStationPanelContainer == null) {
- return;
- }
- if (isShown) {
- flStationPanelContainer.setTranslationY(131f);
- } else {
- flStationPanelContainer.setTranslationY(0f);
- }
- }
+ /**
+ * 展示滑动按钮
+ *
+ * @param text 指定的文字
+ */
public void showSlidePanle(String text) {
getActivity().runOnUiThread(() -> {
slidePanelView.setText(text);
@@ -108,6 +136,9 @@ public abstract class BaseOchFragment> e
});
}
+ /**
+ * 隐藏滑动按钮
+ */
public void hideSlidePanel() {
getActivity().runOnUiThread(() -> {
slidePanelView.setVisibility(View.GONE);
@@ -131,6 +162,9 @@ public abstract class BaseOchFragment> e
});
}
+ /**
+ * 隐藏【自动驾驶】按钮
+ */
public void hideAutopilotBiz() {
getActivity().runOnUiThread(() -> {
// ctvAutopilotStatus.setVisibility(View.GONE);
@@ -138,6 +172,9 @@ public abstract class BaseOchFragment> e
});
}
+ /**
+ * 展示【自动驾驶】按钮
+ */
public void showAutopilotBiz() {
getActivity().runOnUiThread(() -> {
ctvAutopilotStatus.setVisibility(View.VISIBLE);
@@ -145,7 +182,7 @@ public abstract class BaseOchFragment> e
});
}
- public View getPanelView(){
+ public View getPanelView() {
return panelView;
}
@@ -153,16 +190,9 @@ public abstract class BaseOchFragment> e
return null;
}
- private final IMogoStatusChangedListener callViewListener = (descriptor, isTrue) -> {
- if (descriptor == StatusDescriptor.CALL_VIEW) {
- checkCallView(isTrue);
- }
- };
-
@Override
public void onDestroyView() {
super.onDestroyView();
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().unregisterStatusChangedListener("Och", StatusDescriptor.CALL_VIEW, callViewListener);
}
/**
diff --git a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml b/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml
index 868f9b72e5..509d3e5f16 100644
--- a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml
+++ b/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml
@@ -64,7 +64,6 @@
android:background="#f00"
android:text="Disable"
android:textSize="30sp"
- app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -75,8 +74,7 @@
android:background="#0f0"
android:text="Enable"
android:textSize="30sp"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
app:layout_constraintTop_toBottomOf="@id/btnAutopilotDisable" />
+ app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable,btnAutopilotRunning"
+ tools:visibility="visible" />
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java
index 8ff04c3c59..8c7af7a0c3 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java
@@ -135,7 +135,7 @@ class SnapshotLocationController {
mLastLocationInfo = null;
}
}
- Logger.d( TAG, "upload loc size = %s", list == null ? 0 : list.size() );
+ //Logger.d( TAG, "upload loc size = %s", list == null ? 0 : list.size() );
return list;
}
@@ -145,7 +145,7 @@ class SnapshotLocationController {
* @return 精度
*/
public int getDataAccuracy() {
- Logger.d( TAG, "upload loc accuracy = %s", mDataAccuracy );
+ //Logger.d( TAG, "upload loc accuracy = %s", mDataAccuracy );
return mDataAccuracy;
}
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
index 14bbb3da15..a22299e86f 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
@@ -182,12 +182,12 @@ public class CameraLiveNoticeHelper implements IMogoCloudOnMsgListener {
@Override
public void onMsgSend(long id) {
- Logger.d(TAG, "onMsgSend id : " + id);
+ //Logger.d(TAG, "onMsgSend id : " + id);
}
@Override
public void onMsgReceived(MogoSnapshotSetData mogoSnapshotSetData) {
- Logger.d(TAG, "onMsgReceived mogoSnapshotSetData : " + mogoSnapshotSetData);
+ //Logger.d(TAG, "onMsgReceived mogoSnapshotSetData : " + mogoSnapshotSetData);
renderMarker(mogoSnapshotSetData);
}
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java
index 07b2ed3cf1..4bcd43b9ca 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java
@@ -75,7 +75,7 @@ public class MogoReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
- Logger.d( TAG, action );
+ //Logger.d( TAG, action );
if (TextUtils.equals(VOICE_ACTION, action)) {
String cmd = intent.getStringExtra(PARAM_COMMAND);
if (!TextUtils.isEmpty(cmd)) {
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java
index a1b99c07bd..f23bfae76f 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java
@@ -64,7 +64,7 @@ public class V2XSocketManager {
}
register401007();
register401009();
- register401019();
+ register401020();
// TODO 这里是前瞻需求,量产版本需要注释
register401003();
@@ -230,7 +230,7 @@ public class V2XSocketManager {
* * http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=52829799
* * 最优路线推荐
*/
- public void register401019() {
+ public void register401020() {
mV2XMessageListener_401020 = new V2XMessageListener_401020();
// 道路事件,在线车辆绘制
V2XServiceManager
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XStatusManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XStatusManager.java
index 1dfdf64b5a..eca9f0f957 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XStatusManager.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XStatusManager.java
@@ -54,7 +54,7 @@ public class V2XStatusManager {
if (mLocation == null) {
mLocation = new MogoLocation();
}
- Logger.d(V2XConst.MODULE_NAME, "当前车辆位置:" + mLocation.toString());
+ //Logger.d(V2XConst.MODULE_NAME, "当前车辆位置:" + mLocation.toString());
return mLocation;
}
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/obu/V2XObuEventScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/obu/V2XObuEventScenario.java
index a3c66a5bea..73e9af43d4 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/obu/V2XObuEventScenario.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/obu/V2XObuEventScenario.java
@@ -263,7 +263,7 @@ public class V2XObuEventScenario extends AbsV2XScenario imple
crossing.getLat(),
(int) currentLocation.getBearing()
);
- Logger.d("V2X_OBU_VIP", "监测是否需要进行vip弹框提醒\ndistance: " + distance + "\neventAngle: " + eventAngle + "\ntarget: " + crossing + "\ncurrent: " + currentLatLng);
+ //Logger.d("V2X_OBU_VIP", "监测是否需要进行vip弹框提醒\ndistance: " + distance + "\neventAngle: " + eventAngle + "\ntarget: " + crossing + "\ncurrent: " + currentLatLng);
if (distance <= DEFAULT_VIP_CROSSING_DISTANCE && 0 <= eventAngle && eventAngle <= 20) {
//距离小于DEFAULT_VIP_CROSSING_DISTANCE,且夹角在0~20(说明在前方),则触发vip通行
defaultTarget = crossing;
diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/imageloader/glide/GlideImageLoader.java b/services/mogo-service/src/main/java/com/mogo/service/impl/imageloader/glide/GlideImageLoader.java
index 077fdf0c7e..5456125337 100644
--- a/services/mogo-service/src/main/java/com/mogo/service/impl/imageloader/glide/GlideImageLoader.java
+++ b/services/mogo-service/src/main/java/com/mogo/service/impl/imageloader/glide/GlideImageLoader.java
@@ -84,7 +84,7 @@ public class GlideImageLoader implements IMogoImageloader {
@Override
public void displayImage( String url, MogoImageView imageView, int width, int height, final IMogoImageLoaderListener listener ) {
- Logger.d( TAG, "url = %s", url );
+ //Logger.d( TAG, "url = %s", url );
if ( listener != null ) {
listener.onStart();