[清扫车 ] sweepers->sweeper
@@ -4,4 +4,4 @@
|
||||
3. mogo-och-taxi:Taxi司机端(Taxi)
|
||||
4. mogo-och-taxi-passenger:Taxi乘客端(TaxiPassenger)
|
||||
5. mogo-och-noop:空实现,用于独立鹰眼打包
|
||||
6. mogo-och-sweepers: 清扫车(Sweepers)
|
||||
6. mogo-och-sweeper: 清扫车(Sweeper)
|
||||
@@ -1,3 +1,3 @@
|
||||
GROUP=com.mogo.och
|
||||
POM_ARTIFACT_ID=och-sweepers
|
||||
POM_ARTIFACT_ID=och-sweeper
|
||||
VERSION_CODE=1
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers
|
||||
package com.mogo.och.sweeper
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.mogo.och.sweepers", appContext.packageName)
|
||||
assertEquals("com.mogo.och.sweeper", appContext.packageName)
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.och.sweepers">
|
||||
package="com.mogo.och.sweeper">
|
||||
|
||||
<application>
|
||||
<!--这里是为了测试增加的广播-->
|
||||
<receiver android:name=".receiver.TestSweepersBroadcastReceiver">
|
||||
<receiver android:name=".receiver.TestSweeperBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.bus.test_control" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<activity android:name=".ui.SweepersSwitchLineActivity"
|
||||
<activity android:name=".ui.SweeperSwitchLineActivity"
|
||||
android:theme="@style/SwitchLineDialogStyle"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="landscape" />/>
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers;
|
||||
package com.mogo.och.sweeper;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers;
|
||||
package com.mogo.och.sweeper;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.fragment.SweepersFragment;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
@@ -24,12 +24,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = SweepersConst.PATH)
|
||||
public class SweepersProvider implements IMogoOCH {
|
||||
@Route(path = SweeperConst.PATH)
|
||||
public class SweeperProvider implements IMogoOCH {
|
||||
|
||||
private static final String TAG = "SweepersProvider";
|
||||
private static final String TAG = "SweeperProvider";
|
||||
|
||||
private SweepersFragment sweepersFragment;
|
||||
private SweeperFragment sweeperFragment;
|
||||
private int containerId;
|
||||
private FragmentActivity activity;
|
||||
|
||||
@@ -44,25 +44,25 @@ public class SweepersProvider implements IMogoOCH {
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchSweepers"
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchSweeper"
|
||||
, StatusDescriptor.VR_MODE, statusChangedListener);
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
if (sweepersFragment == null) {
|
||||
if (sweeperFragment == null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "准备add fragment======");
|
||||
sweepersFragment = new SweepersFragment();
|
||||
activity.getSupportFragmentManager().beginTransaction().add(containerId, sweepersFragment).commitAllowingStateLoss();
|
||||
sweeperFragment = new SweeperFragment();
|
||||
activity.getSupportFragmentManager().beginTransaction().add(containerId, sweeperFragment).commitAllowingStateLoss();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(TAG, "准备show fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().show(sweepersFragment).commitAllowingStateLoss();
|
||||
activity.getSupportFragmentManager().beginTransaction().show(sweeperFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
private void hideFragment() {
|
||||
if (sweepersFragment != null) {
|
||||
if (sweeperFragment != null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "准备hide fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().hide(sweepersFragment).commitAllowingStateLoss();
|
||||
activity.getSupportFragmentManager().beginTransaction().hide(sweeperFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,8 +77,8 @@ public class SweepersProvider implements IMogoOCH {
|
||||
}
|
||||
} else if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
// topView进行展示时推出网约车界面,但是不隐藏整个fragment
|
||||
if (sweepersFragment != null && isTrue) {
|
||||
sweepersFragment.hideOchSweepers();
|
||||
if (sweeperFragment != null && isTrue) {
|
||||
sweeperFragment.hideOchSweeper();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -21,6 +21,6 @@ public class CarHeartbeatReqBean {
|
||||
this.lon = lon;
|
||||
this.lat = lat;
|
||||
this.msgId = UUID.randomUUID().toString();
|
||||
this.interval = (int) (SweepersConst.LOOP_PERIOD_60S / 1000);
|
||||
this.interval = (int) (SweeperConst.LOOP_PERIOD_60S / 1000);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
|
||||
/**
|
||||
* 查询下车乘客请求参数
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -10,12 +9,12 @@ public
|
||||
*
|
||||
* 小巴车运营状态请求参数
|
||||
*/
|
||||
class SweepersOperationStatusRequest {
|
||||
class SweeperOperationStatusRequest {
|
||||
|
||||
private String sn;
|
||||
private double lat;
|
||||
private double lon;
|
||||
public SweepersOperationStatusRequest(double lon, double lat) {
|
||||
public SweeperOperationStatusRequest(double lon, double lat) {
|
||||
this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
this.lat = lat;
|
||||
this.lon = lon;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.data.BaseData;
|
||||
*
|
||||
* 小巴车运营状态返回参数
|
||||
*/
|
||||
public class SweepersOperationStatusResponse extends BaseData {
|
||||
public class SweeperOperationStatusResponse extends BaseData {
|
||||
|
||||
public Result data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -6,7 +6,7 @@ package com.mogo.och.sweepers.bean;
|
||||
* <p>
|
||||
* 小巴订单
|
||||
*/
|
||||
public class SweepersOrderBean {
|
||||
public class SweeperOrderBean {
|
||||
|
||||
/**
|
||||
* orderNo number
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
@@ -8,10 +8,10 @@ import java.util.List;
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/19
|
||||
*/
|
||||
public class SweepersOrdersResponse extends BaseData {
|
||||
public class SweeperOrdersResponse extends BaseData {
|
||||
public Result data;
|
||||
public static class Result{
|
||||
public List<SweepersOrderBean> orders;
|
||||
public List<SweeperOrderBean> orders;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
/**
|
||||
@@ -7,7 +7,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
*
|
||||
* 根据车机行驶线路站点信息
|
||||
*/
|
||||
public class SweepersQueryLineStationsRequest {
|
||||
public class SweeperQueryLineStationsRequest {
|
||||
|
||||
private String sn;
|
||||
private double lat;
|
||||
@@ -15,7 +15,7 @@ public class SweepersQueryLineStationsRequest {
|
||||
private boolean markDrivingStatus; // 默认false;true:是否需要返回站点的行驶状态,对应返回的drivingStatus
|
||||
// 0 - 关闭、1 - 启动
|
||||
// public String status;
|
||||
public SweepersQueryLineStationsRequest(double lon, double lat, boolean markDrivingStatus) {
|
||||
public SweeperQueryLineStationsRequest(double lon, double lat, boolean markDrivingStatus) {
|
||||
this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
this.lat = lat;
|
||||
this.lon = lon;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/9
|
||||
*/
|
||||
public class SweepersQueryLinesResponse extends BaseData {
|
||||
public class SweeperQueryLinesResponse extends BaseData {
|
||||
public List<Result> data;
|
||||
|
||||
public static class Result {
|
||||
@@ -1,17 +1,16 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/18
|
||||
*/
|
||||
public class SweepersResetDrivingLineRequest {
|
||||
public class SweeperResetDrivingLineRequest {
|
||||
public String sn;
|
||||
public int lineId; //切换到的线路id
|
||||
|
||||
public SweepersResetDrivingLineRequest(int lineId) {
|
||||
public SweeperResetDrivingLineRequest(int lineId) {
|
||||
sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
this.lineId = lineId;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
*
|
||||
* 订单状态更新请求数据结构
|
||||
*/
|
||||
public class SweepersRoutePlanningUpdateReqBean {
|
||||
public class SweeperRoutePlanningUpdateReqBean {
|
||||
public String sn;
|
||||
public int lineId;
|
||||
public int startSiteId;
|
||||
@@ -19,7 +19,7 @@ public class SweepersRoutePlanningUpdateReqBean {
|
||||
public Double longitude;
|
||||
}
|
||||
|
||||
public SweepersRoutePlanningUpdateReqBean(String sn, int lineId, int startSiteId
|
||||
public SweeperRoutePlanningUpdateReqBean(String sn, int lineId, int startSiteId
|
||||
, int endSiteId, List<Result> points) {
|
||||
this.sn = sn;
|
||||
this.lineId = lineId;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
@@ -7,14 +7,14 @@ import com.mogo.eagle.core.data.BaseData;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SweepersRoutesResponse extends BaseData {
|
||||
private SweepersRoutesResult data;
|
||||
public class SweeperRoutesResponse extends BaseData {
|
||||
private SweeperRoutesResult data;
|
||||
|
||||
public SweepersRoutesResult getResult() {
|
||||
public SweeperRoutesResult getResult() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setResult(SweepersRoutesResult data) {
|
||||
public void setResult(SweeperRoutesResult data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -7,8 +7,8 @@ import java.util.List;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SweepersRoutesResult {
|
||||
private List<SweepersStationBean> sites;
|
||||
public class SweeperRoutesResult {
|
||||
private List<SweeperStationBean> sites;
|
||||
private int lineId;
|
||||
private String name;
|
||||
private int lineType; //线路类型,0:环形
|
||||
@@ -36,11 +36,11 @@ public class SweepersRoutesResult {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<SweepersStationBean> getSites() {
|
||||
public List<SweeperStationBean> getSites() {
|
||||
return sites;
|
||||
}
|
||||
|
||||
public void setSite(List<SweepersStationBean> site) {
|
||||
public void setSite(List<SweeperStationBean> site) {
|
||||
this.sites = sites;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SweepersStationBean {
|
||||
public class SweeperStationBean {
|
||||
// private int lineId;
|
||||
// private int siteId;
|
||||
// private String siteName;
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.sweepers.bean;
|
||||
package com.mogo.och.sweeper.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -9,7 +8,7 @@ import com.mogo.commons.network.Utils;
|
||||
*
|
||||
* 小巴车运营状态请求参数
|
||||
*/
|
||||
public class SweepersUpdateSiteStatusRequest {
|
||||
public class SweeperUpdateSiteStatusRequest {
|
||||
|
||||
public String sn;
|
||||
public int seq;//站点序号
|
||||
@@ -17,7 +16,7 @@ public class SweepersUpdateSiteStatusRequest {
|
||||
public double lon;
|
||||
public double lat;
|
||||
|
||||
public SweepersUpdateSiteStatusRequest(int seq, int siteId, double lon, double lat) {
|
||||
public SweeperUpdateSiteStatusRequest(int seq, int siteId, double lon, double lat) {
|
||||
this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
this.seq = seq;
|
||||
this.siteId = siteId;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.callback;
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/22
|
||||
*/
|
||||
public interface IRefreshSweeperStationsCallback {
|
||||
void refreshBusStations(String lineName, List<SweeperStationBean> stationList, int currentStation, int nextStation, boolean isArrived);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.callback;
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.callback;
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
import android.location.Location;
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.location.Location;
|
||||
*
|
||||
* Model->Presenter回调:状态控制器监听(accOn、adas ui show、voice ui show、push ui show、v2x ui show等等)
|
||||
*/
|
||||
public interface ISweepersControllerStatusCallback {
|
||||
public interface ISweeperControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/9
|
||||
*/
|
||||
public interface ISweeperLinesCallback {
|
||||
void onBusLinesChange(SweeperQueryLinesResponse lines);
|
||||
void onChangeLineIdSuccess();
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.mogo.och.sweepers.constant
|
||||
package com.mogo.och.sweeper.constant
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class SweepersConst {
|
||||
class SweeperConst {
|
||||
companion object {
|
||||
|
||||
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
|
||||
@@ -26,7 +26,7 @@ class SweepersConst {
|
||||
const val PATH = "/och/api"
|
||||
|
||||
// 测试用的广播
|
||||
const val BROADCAST_TEST_SWEEPERS_CONTROL_TYPE_EXTRA_KEY = "sceneType"
|
||||
const val BROADCAST_TEST_SWEEPER_CONTROL_TYPE_EXTRA_KEY = "sceneType"
|
||||
// 无状态
|
||||
const val STATION_STATUS_IDLE = 0
|
||||
// 已过站(历史站)
|
||||
@@ -49,14 +49,14 @@ class SweepersConst {
|
||||
const val LOOP_SEND_TRAJ_TIMES = 10
|
||||
|
||||
//起点UUID
|
||||
const val SWEEPERS_START_MAP_MAKER = "sweepers_start_map_maker";
|
||||
const val SWEEPER_START_MAP_MAKER = "sweeper_start_map_maker";
|
||||
//终点UUID
|
||||
const val SWEEPERS_END_MAP_MAKER = "sweepers_end_map_maker";
|
||||
const val SWEEPER_END_MAP_MAKER = "sweeper_end_map_maker";
|
||||
|
||||
// 埋点key:接管后点击'自动驾驶'按钮启动
|
||||
const val EVENT_KEY_RESTART_AUTOPILOT = "event_key_och_sweepers_restart_autopilot"
|
||||
const val EVENT_KEY_RESTART_AUTOPILOT = "event_key_och_sweeper_restart_autopilot"
|
||||
// 埋点key:开始服务开启自动驾驶(成功/失败)
|
||||
const val EVENT_KEY_START_SERVICE = "event_key_och_sweepers_start_service"
|
||||
const val EVENT_KEY_START_SERVICE = "event_key_och_sweeper_start_service"
|
||||
const val EVENT_PARAM_SN = "sn"
|
||||
const val EVENT_PARAM_TIME = "time"
|
||||
const val EVENT_PARAM_START_NAME = "start_name"
|
||||
@@ -69,7 +69,7 @@ class SweepersConst {
|
||||
/**
|
||||
* 订单起终点Marker类型
|
||||
*/
|
||||
const val TYPE_MARKER_SWEEPERS_ORDER = "TYPE_MARKER_SWEEPERS_ORDER"
|
||||
const val TYPE_MARKER_SWEEPER_ORDER = "TYPE_MARKER_SWEEPER_ORDER"
|
||||
|
||||
const val TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.och.sweepers.fragment;
|
||||
package com.mogo.och.sweeper.fragment;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.och.sweepers.constant.SweepersConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
import static com.mogo.och.sweeper.constant.SweeperConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Intent;
|
||||
@@ -41,12 +41,12 @@ import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResult;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweepers.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.sweepers.view.SlidePanelView;
|
||||
import com.mogo.och.sweeper.R;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResult;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
import com.mogo.och.sweeper.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.sweeper.view.SlidePanelView;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
@@ -58,7 +58,7 @@ import record_cache.RecordPanelOuterClass;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public abstract class BaseSweepersTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements IMogoMapListener, IMoGoAutopilotRecordListener {
|
||||
public abstract class BaseSweeperTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements IMogoMapListener, IMoGoAutopilotRecordListener {
|
||||
|
||||
private static final String TAG = "BaseOchFragment";
|
||||
|
||||
@@ -101,7 +101,7 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.sweepers_base_fragment;
|
||||
return R.layout.sweeper_base_fragment;
|
||||
}
|
||||
|
||||
private View panelView;
|
||||
@@ -111,8 +111,8 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
groupTestPanel = findViewById(R.id.groupTestPanel);
|
||||
slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
|
||||
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
|
||||
ctvAutopilotStatusIv = findViewById(R.id.sweepers_autopilot_btn_iv);
|
||||
ctvAutopilotStatusTv = findViewById(R.id.sweepers_autopolot_btn_tv);
|
||||
ctvAutopilotStatusIv = findViewById(R.id.sweeper_autopilot_btn_iv);
|
||||
ctvAutopilotStatusTv = findViewById(R.id.sweeper_autopolot_btn_tv);
|
||||
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
|
||||
|
||||
// mTrafficLightView = findViewById(R.id.bus_traffic_light_view);
|
||||
@@ -121,13 +121,13 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
|
||||
|
||||
flSpeed = (FrameLayout) findViewById(R.id.fl_speed);
|
||||
mTrafficDataView = (TrafficDataView) findViewById(R.id.sweepers_arc);
|
||||
mTrafficDataView = (TrafficDataView) findViewById(R.id.sweeper_arc);
|
||||
|
||||
panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
|
||||
slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener);
|
||||
|
||||
mSwitchMapModeLayout = findViewById(R.id.sweepers_switch_model_layout);
|
||||
mSwitchMapModeImage = findViewById(R.id.sweepers_switch_model_icon);
|
||||
mSwitchMapModeLayout = findViewById(R.id.sweeper_switch_model_layout);
|
||||
mSwitchMapModeImage = findViewById(R.id.sweeper_switch_model_icon);
|
||||
updateSwitchMapIcon();
|
||||
|
||||
mSwitchMapModeLayout.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@@ -138,12 +138,12 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweepers_switch_map_medium);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweeper_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, SweepersConst.TYPE_MARKER_SWEEPERS_ORDER);
|
||||
.inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, SweeperConst.TYPE_MARKER_SWEEPER_ORDER);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweepers_switch_map_long);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweeper_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -166,7 +166,7 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE){
|
||||
restartAutopilot();
|
||||
}else {
|
||||
ToastUtils.showShort(getResources().getString(R.string.sweepers_auto_disable_tip));
|
||||
ToastUtils.showShort(getResources().getString(R.string.sweeper_auto_disable_tip));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -227,11 +227,11 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweepers_switch_map_long);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweeper_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweepers_switch_map_medium);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweeper_switch_map_medium);
|
||||
} else {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweepers_switch_map_medium);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.sweeper_switch_map_medium);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,16 +310,16 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
public void setAutopilotBtnStatus(int autopilotStatus) {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
|
||||
== autopilotStatus) {//0不可用
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweepers_autopilot_text_color_disable));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweepers_loading_autopilot_runnig_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweepers_disable_autopilot_icon);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweeper_autopilot_text_color_disable));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweeper_loading_autopilot_runnig_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweeper_disable_autopilot_icon);
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
ctvAutopilotStatus.setFocusableInTouchMode(true);
|
||||
|
||||
} else {
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweepers_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweepers_loading_autopilot_runnig_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweepers_ic_autopilot);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweeper_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweeper_loading_autopilot_runnig_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweeper_ic_autopilot);
|
||||
ctvAutopilotStatus.setFocusableInTouchMode(true);
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) {//1可用
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
@@ -332,15 +332,15 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
public void updateAutopilotStatus(int autopilotStatus){
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
|
||||
== autopilotStatus) {//2 running
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweepers_right_autopilot_icon);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweepers_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweepers_loading_autopilot_success_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweeper_right_autopilot_icon);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweeper_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweeper_loading_autopilot_success_tv));
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
ctvAutopilotStatus.setFocusableInTouchMode(false);
|
||||
}else {
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweepers_wrong_autopilot_icon);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweepers_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweepers_loading_autopilot_failure_tv));
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweeper_wrong_autopilot_icon);
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweeper_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweeper_loading_autopilot_failure_tv));
|
||||
ctvAutopilotStatus.setFocusableInTouchMode(false);
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
}
|
||||
@@ -432,11 +432,11 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
*/
|
||||
public void startAutopilotAnimation() {
|
||||
isAnimateRunning = true;
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweepers_loading_autopilot_tv));
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweepers_autopilot_text_color_normal));
|
||||
ctvAutopilotStatusTv.setText(getResources().getString(R.string.sweeper_loading_autopilot_tv));
|
||||
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.sweeper_autopilot_text_color_normal));
|
||||
ctvAutopilotStatus.setSelected(false);
|
||||
ctvAutopilotStatus.setFocusableInTouchMode(true);
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweepers_loading_autopilot_icon);
|
||||
ctvAutopilotStatusIv.setImageResource(R.drawable.sweeper_loading_autopilot_icon);
|
||||
if (autopilotLoadingAnimator == null) {
|
||||
autopilotLoadingAnimator = ObjectAnimator.ofFloat(ctvAutopilotStatusIv, "rotation", 0f, 360f);
|
||||
autopilotLoadingAnimator.setInterpolator(new LinearInterpolator());
|
||||
@@ -528,18 +528,18 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
|
||||
public void showHideTestBar() {
|
||||
if (busTestBar == null) {
|
||||
busTestBar = findViewById(R.id.module_mogo_och_sweepers_test_bar);
|
||||
lineIdTV = findViewById(R.id.sweepers_test_bar_current_line_id);
|
||||
trajMd5TV = findViewById(R.id.sweepers_test_bar_current_traj_md5);
|
||||
stopMd5TV = findViewById(R.id.sweepers_test_bar_current_stop_md5);
|
||||
trajMd5DPQPTV = findViewById(R.id.sweepers_test_bar_current_traj_md5_dpqp);
|
||||
stopMd5DPQPTV = findViewById(R.id.sweepers_test_bar_current_stop_md5_dpqp);
|
||||
busTestBar = findViewById(R.id.module_mogo_och_sweeper_test_bar);
|
||||
lineIdTV = findViewById(R.id.sweeper_test_bar_current_line_id);
|
||||
trajMd5TV = findViewById(R.id.sweeper_test_bar_current_traj_md5);
|
||||
stopMd5TV = findViewById(R.id.sweeper_test_bar_current_stop_md5);
|
||||
trajMd5DPQPTV = findViewById(R.id.sweeper_test_bar_current_traj_md5_dpqp);
|
||||
stopMd5DPQPTV = findViewById(R.id.sweeper_test_bar_current_stop_md5_dpqp);
|
||||
}
|
||||
|
||||
if (busTestBar.getVisibility() == View.VISIBLE) {
|
||||
busTestBar.setVisibility(View.GONE);
|
||||
} else {
|
||||
SweepersRoutesResult routesResult = SweepersOrderModel.getInstance().getBusRoutesResult();
|
||||
SweeperRoutesResult routesResult = SweeperOrderModel.getInstance().getBusRoutesResult();
|
||||
lineIdTV.setText("lineId:" + (routesResult == null ? "" : String.valueOf(routesResult.getLineId())));
|
||||
trajMd5TV.setText("TMd5:" + (routesResult == null ? "" : routesResult.csvFileMd5));
|
||||
stopMd5TV.setText("SMd5:" + (routesResult == null ? "" : routesResult.txtFileMd5));
|
||||
@@ -549,9 +549,9 @@ public abstract class BaseSweepersTabFragment<V extends IView, P extends Present
|
||||
}
|
||||
}
|
||||
|
||||
public void updateSweepersTestBarInfo() {
|
||||
public void updateSweeperTestBarInfo() {
|
||||
if (busTestBar != null && busTestBar.getVisibility() == View.VISIBLE) {
|
||||
SweepersRoutesResult routesResult = SweepersOrderModel.getInstance().getBusRoutesResult();
|
||||
SweeperRoutesResult routesResult = SweeperOrderModel.getInstance().getBusRoutesResult();
|
||||
lineIdTV.setText("lineId:" + (routesResult == null ? "" : String.valueOf(routesResult.getLineId())));
|
||||
trajMd5TV.setText("TMd5:" + (routesResult == null ? "" : routesResult.csvFileMd5));
|
||||
stopMd5TV.setText("SMd5:" + (routesResult == null ? "" : routesResult.txtFileMd5));
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.fragment;
|
||||
package com.mogo.och.sweeper.fragment;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
@@ -20,12 +20,12 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweepers.bean.SweepersStationBean;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.presenter.SweepersPresenter;
|
||||
import com.mogo.och.sweepers.ui.SweepersSwitchLineActivity;
|
||||
import com.mogo.och.sweepers.view.SlidePanelView;
|
||||
import com.mogo.och.sweeper.R;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.presenter.SweeperPresenter;
|
||||
import com.mogo.och.sweeper.ui.SweeperSwitchLineActivity;
|
||||
import com.mogo.och.sweeper.view.SlidePanelView;
|
||||
import com.mogo.och.common.module.utils.OCHThreadPoolManager;
|
||||
|
||||
import java.util.List;
|
||||
@@ -36,9 +36,9 @@ import java.util.List;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment, SweepersPresenter>
|
||||
public class SweeperFragment extends BaseSweeperTabFragment<SweeperFragment, SweeperPresenter>
|
||||
implements SlidePanelView.OnSlidePanelMoveToEndListener, View.OnClickListener {
|
||||
private static final String TAG = "SweepersFragment";
|
||||
private static final String TAG = "SweeperFragment";
|
||||
|
||||
private TextView mCurrentStationName;
|
||||
private TextView mNextStationName;
|
||||
@@ -50,8 +50,8 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
|
||||
private View mSweepers;
|
||||
|
||||
private SweepersStationBean startStation = null;
|
||||
private SweepersStationBean endStation = null;
|
||||
private SweeperStationBean startStation = null;
|
||||
private SweeperStationBean endStation = null;
|
||||
|
||||
@Override
|
||||
public String getTagName() {
|
||||
@@ -61,13 +61,13 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
@Override
|
||||
protected void initViews() {
|
||||
super.initViews();
|
||||
mSweepers = findViewById(R.id.module_och_sweepers_tag);
|
||||
mCurrentStationName = findViewById(R.id.module_och_sweepers_current_station);
|
||||
mCurrentTag = findViewById(R.id.module_och_sweepers_current_station_anchor);
|
||||
mNextStationName = findViewById(R.id.module_och_sweepers_order_end_station);
|
||||
mNextTag = findViewById(R.id.module_och_sweepers_next_station_anchor);
|
||||
mSweepers = findViewById(R.id.module_och_sweeper_tag);
|
||||
mCurrentStationName = findViewById(R.id.module_och_sweeper_current_station);
|
||||
mCurrentTag = findViewById(R.id.module_och_sweeper_current_station_anchor);
|
||||
mNextStationName = findViewById(R.id.module_och_sweeper_order_end_station);
|
||||
mNextTag = findViewById(R.id.module_och_sweeper_next_station_anchor);
|
||||
mSwitchLine = findViewById(R.id.switch_line_btn);
|
||||
mLineName = findViewById(R.id.module_och_sweepers_line_name);
|
||||
mLineName = findViewById(R.id.module_och_sweeper_line_name);
|
||||
|
||||
if (DebugConfig.isDebug()) {
|
||||
mSweepers.setOnClickListener(view -> {
|
||||
@@ -110,8 +110,8 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected SweepersPresenter createPresenter() {
|
||||
return new SweepersPresenter(this);
|
||||
protected SweeperPresenter createPresenter() {
|
||||
return new SweeperPresenter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,7 +127,7 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
* @param nextStation 下个站点
|
||||
* @param isArrived 是否都站
|
||||
*/
|
||||
public void refreshSweepersStations(String lineName, List<SweepersStationBean> stationList
|
||||
public void refreshSweeperStations(String lineName, List<SweeperStationBean> stationList
|
||||
, int currentStation, int nextStation, boolean isArrived) {
|
||||
mCurrentStation = currentStation;
|
||||
if (getActivity() == null) {
|
||||
@@ -147,7 +147,7 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
/**
|
||||
* 重新刷新站点信息 isArrived 是否到站
|
||||
*/
|
||||
private void renderCurrentStationStatus(String lineName, List<SweepersStationBean> stationList, int currentStation
|
||||
private void renderCurrentStationStatus(String lineName, List<SweeperStationBean> stationList, int currentStation
|
||||
, int nextStation, boolean isArrived) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + "MapMaker ", "currentStation=" + currentStation + ",nextStation=" + nextStation + "isArrived=" + isArrived);
|
||||
String currentStationName = null;
|
||||
@@ -168,34 +168,34 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
// 是否到达起点
|
||||
if (currentStation == 0) {
|
||||
isArriveAtStartStation = true;
|
||||
mCurrentTag.setText(getResources().getString(R.string.sweepers_arrive_to_end_start));
|
||||
mCurrentTag.setText(getResources().getString(R.string.sweeper_arrive_to_end_start));
|
||||
|
||||
setOrRemoveMapMaker(true, SweepersConst.SWEEPERS_START_MAP_MAKER, startStation.getLat()
|
||||
setOrRemoveMapMaker(true, SweeperConst.SWEEPER_START_MAP_MAKER, startStation.getLat()
|
||||
, startStation.getLon(),R.raw.star_marker);
|
||||
setOrRemoveMapMaker(true, SweepersConst.SWEEPERS_END_MAP_MAKER, endStation.getLat()
|
||||
setOrRemoveMapMaker(true, SweeperConst.SWEEPER_END_MAP_MAKER, endStation.getLat()
|
||||
, endStation.getLon(),R.raw.end_marker);
|
||||
} else if (currentStation > 0 && currentStation < stationList.size() - 1) {// 是否到达站点
|
||||
isArriveAtStation = true;
|
||||
mCurrentTag.setText(getResources().getString(R.string.sweepers_arrive_to_current_tag));
|
||||
mNextTag.setText(getResources().getString(R.string.sweepers_arrive_to_next_tag));
|
||||
mCurrentTag.setText(getResources().getString(R.string.sweeper_arrive_to_current_tag));
|
||||
mNextTag.setText(getResources().getString(R.string.sweeper_arrive_to_next_tag));
|
||||
|
||||
setOrRemoveMapMaker(false, SweepersConst.SWEEPERS_START_MAP_MAKER, startStation.getLat()
|
||||
setOrRemoveMapMaker(false, SweeperConst.SWEEPER_START_MAP_MAKER, startStation.getLat()
|
||||
, startStation.getLon(),R.raw.star_marker);
|
||||
setOrRemoveMapMaker(true, SweepersConst.SWEEPERS_END_MAP_MAKER, endStation.getLat()
|
||||
setOrRemoveMapMaker(true, SweeperConst.SWEEPER_END_MAP_MAKER, endStation.getLat()
|
||||
, endStation.getLon(),R.raw.end_marker);
|
||||
} else if (currentStation == stationList.size() - 1) {// 是否到达终点
|
||||
isArriveEndStation = true;
|
||||
nextStationName = "--";
|
||||
mNextTag.setText(getResources().getString(R.string.sweepers_arrive_to_end_end));
|
||||
mNextTag.setText(getResources().getString(R.string.sweeper_arrive_to_end_end));
|
||||
|
||||
setOrRemoveMapMaker(false, SweepersConst.SWEEPERS_START_MAP_MAKER, startStation.getLat()
|
||||
setOrRemoveMapMaker(false, SweeperConst.SWEEPER_START_MAP_MAKER, startStation.getLat()
|
||||
, startStation.getLon(),R.raw.star_marker);
|
||||
|
||||
if (isArrived) {
|
||||
setOrRemoveMapMaker(false, SweepersConst.SWEEPERS_END_MAP_MAKER, endStation.getLat()
|
||||
setOrRemoveMapMaker(false, SweeperConst.SWEEPER_END_MAP_MAKER, endStation.getLat()
|
||||
, endStation.getLon(),R.raw.end_marker);
|
||||
} else {
|
||||
setOrRemoveMapMaker(true, SweepersConst.SWEEPERS_END_MAP_MAKER, endStation.getLat()
|
||||
setOrRemoveMapMaker(true, SweeperConst.SWEEPER_END_MAP_MAKER, endStation.getLat()
|
||||
, endStation.getLon(),R.raw.end_marker);
|
||||
}
|
||||
}
|
||||
@@ -207,9 +207,9 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
|
||||
// 是否到达终点
|
||||
if ( nextStation == stationList.size() - 1 || nextStation == -1) {
|
||||
mNextTag.setText(getResources().getString(R.string.sweepers_arrive_to_end_end));
|
||||
mNextTag.setText(getResources().getString(R.string.sweeper_arrive_to_end_end));
|
||||
}else {
|
||||
mNextTag.setText(getResources().getString(R.string.sweepers_arrive_to_next_tag));
|
||||
mNextTag.setText(getResources().getString(R.string.sweeper_arrive_to_next_tag));
|
||||
}
|
||||
|
||||
if (currentStation == 0 && isArrived){
|
||||
@@ -229,7 +229,7 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
|
||||
mCurrentStationName.setText(currentStationName);
|
||||
mNextStationName.setText(nextStationName);
|
||||
updateSweepersTestBarInfo();
|
||||
updateSweeperTestBarInfo();
|
||||
}
|
||||
|
||||
private void showOrHideSwitchLineBtn(boolean isShow) {
|
||||
@@ -240,13 +240,13 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
}
|
||||
}
|
||||
|
||||
public void hideOchSweepers() {
|
||||
public void hideOchSweeper() {
|
||||
// tvNotice.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStationPanelViewId() {
|
||||
return R.layout.fragment_och_sweepers;
|
||||
return R.layout.fragment_och_sweeper;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -307,11 +307,11 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
|
||||
//移除起点终点
|
||||
if (null != startStation) {
|
||||
setOrRemoveMapMaker(false, SweepersConst.SWEEPERS_START_MAP_MAKER, startStation.getLat()
|
||||
setOrRemoveMapMaker(false, SweeperConst.SWEEPER_START_MAP_MAKER, startStation.getLat()
|
||||
, startStation.getLon(),R.raw.star_marker);
|
||||
}
|
||||
if (null != endStation) {
|
||||
setOrRemoveMapMaker(false, SweepersConst.SWEEPERS_END_MAP_MAKER, endStation.getLat()
|
||||
setOrRemoveMapMaker(false, SweeperConst.SWEEPER_END_MAP_MAKER, endStation.getLat()
|
||||
, endStation.getLon(),R.raw.end_marker);
|
||||
}
|
||||
}
|
||||
@@ -343,7 +343,7 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
uuid + "=latitude=" + lat + ",longitude=" + longi);
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(SweepersConst.TYPE_MARKER_SWEEPERS_ORDER)
|
||||
.owner(SweeperConst.TYPE_MARKER_SWEEPER_ORDER)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.set3DMode(true)
|
||||
.gps(true)
|
||||
@@ -387,14 +387,14 @@ public class SweepersFragment extends BaseSweepersTabFragment<SweepersFragment,
|
||||
//本次行程未结束,不支持切换路线。点击则toast提示:当前行程未完成,不可切换路线
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweepers_switch_line_btn_warning1));
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweeper_switch_line_btn_warning1));
|
||||
return;
|
||||
}
|
||||
if (mCurrentStation > 0) {
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweepers_switch_line_btn_warning2));
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweeper_switch_line_btn_warning2));
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent(getContext(), SweepersSwitchLineActivity.class);
|
||||
Intent intent = new Intent(getContext(), SweeperSwitchLineActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +1,47 @@
|
||||
package com.mogo.och.sweepers.model;
|
||||
package com.mogo.och.sweeper.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLinesResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResponse;
|
||||
import com.mogo.och.sweepers.callback.ISweepersLinesCallback;
|
||||
import com.mogo.och.sweepers.net.SweepersServiceManager;
|
||||
import com.mogo.och.sweepers.net.ISweepersServiceCallback;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResponse;
|
||||
import com.mogo.och.sweeper.callback.ISweeperLinesCallback;
|
||||
import com.mogo.och.sweeper.net.SweeperServiceManager;
|
||||
import com.mogo.och.sweeper.net.ISweeperServiceCallback;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/9
|
||||
*/
|
||||
public class SweepersLineModel {
|
||||
private static volatile SweepersLineModel sInstance;
|
||||
public class SweeperLineModel {
|
||||
private static volatile SweeperLineModel sInstance;
|
||||
private Context mContext;
|
||||
private ISweepersLinesCallback mBusLinesCallback;
|
||||
public static SweepersLineModel getInstance() {
|
||||
private ISweeperLinesCallback mBusLinesCallback;
|
||||
public static SweeperLineModel getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( SweepersLineModel.class ) {
|
||||
synchronized ( SweeperLineModel.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new SweepersLineModel();
|
||||
sInstance = new SweeperLineModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
private SweepersLineModel() {
|
||||
private SweeperLineModel() {
|
||||
|
||||
}
|
||||
public void init() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
}
|
||||
public void setBusLinesCallback(ISweepersLinesCallback callback){
|
||||
public void setBusLinesCallback(ISweeperLinesCallback callback){
|
||||
mBusLinesCallback = callback;
|
||||
}
|
||||
public void queryBusLines(){
|
||||
SweepersServiceManager.getInstance().queryBusLines(mContext, new ISweepersServiceCallback<SweepersQueryLinesResponse>() {
|
||||
SweeperServiceManager.getInstance().queryBusLines(mContext, new ISweeperServiceCallback<SweeperQueryLinesResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersQueryLinesResponse data) {
|
||||
public void onSuccess(SweeperQueryLinesResponse data) {
|
||||
if (null == data && mBusLinesCallback != null) {
|
||||
mBusLinesCallback.onBusLinesChange(null);
|
||||
return;
|
||||
@@ -64,9 +64,9 @@ public class SweepersLineModel {
|
||||
}
|
||||
|
||||
public void commitSwitchLineId(int lineId){
|
||||
SweepersServiceManager.getInstance().resetStationStatus(mContext,lineId, new ISweepersServiceCallback<SweepersRoutesResponse>() {
|
||||
SweeperServiceManager.getInstance().resetStationStatus(mContext,lineId, new ISweeperServiceCallback<SweeperRoutesResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersRoutesResponse o) {
|
||||
public void onSuccess(SweeperRoutesResponse o) {
|
||||
if (mBusLinesCallback != null){
|
||||
mBusLinesCallback.onChangeLineIdSuccess();
|
||||
}
|
||||
@@ -1,16 +1,15 @@
|
||||
package com.mogo.och.sweepers.model;
|
||||
package com.mogo.och.sweeper.model;
|
||||
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_OCH_BUS_START_AUTOPILOT;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.och.sweepers.constant.SweepersConst.STATION_STATUS_STOPPED;
|
||||
import static com.mogo.och.sweeper.constant.SweeperConst.STATION_STATUS_STOPPED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.Location;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -31,27 +30,24 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.sweepers.bean.SweepersOperationStatusResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersOrderBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersOrdersResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResult;
|
||||
import com.mogo.och.sweepers.bean.SweepersStationBean;
|
||||
import com.mogo.och.sweepers.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweepers.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweepers.callback.ISweepersControllerStatusCallback;
|
||||
import com.mogo.och.sweepers.callback.IRefreshSweepersStationsCallback;
|
||||
import com.mogo.och.sweepers.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.net.SweepersServiceManager;
|
||||
import com.mogo.och.sweepers.net.ISweepersServiceCallback;
|
||||
import com.mogo.och.sweepers.presenter.SweepersModelLoopManager;
|
||||
import com.mogo.och.sweepers.util.SweepersAnalyticsManager;
|
||||
import com.mogo.och.sweepers.util.SweepersTrajectoryManager;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResult;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweeper.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback;
|
||||
import com.mogo.och.sweeper.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.net.SweeperServiceManager;
|
||||
import com.mogo.och.sweeper.net.ISweeperServiceCallback;
|
||||
import com.mogo.och.sweeper.presenter.SweeperModelLoopManager;
|
||||
import com.mogo.och.sweeper.util.SweeperAnalyticsManager;
|
||||
import com.mogo.och.sweeper.util.SweeperTrajectoryManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
@@ -62,15 +58,10 @@ import com.zhjt.service.chain.TracingConstants;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.exceptions.UndeliverableException;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.plugins.RxJavaPlugins;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
@@ -79,20 +70,20 @@ import mogo.telematics.pad.MessagePad;
|
||||
*
|
||||
* 小巴订单管理
|
||||
*/
|
||||
public class SweepersOrderModel {
|
||||
private final String TAG = SweepersOrderModel.class.getSimpleName();
|
||||
public class SweeperOrderModel {
|
||||
private final String TAG = SweeperOrderModel.class.getSimpleName();
|
||||
private int currentLineId = -1;
|
||||
private int backgroundCurrentStationIndex = 0;//A->B 此处值是A站点索引
|
||||
/**
|
||||
* 运营状态、后端更具运营状态来判断车辆是否派单
|
||||
*/
|
||||
private boolean mIsWorking = false;
|
||||
private static volatile SweepersOrderModel sInstance;
|
||||
private static volatile SweeperOrderModel sInstance;
|
||||
public double mLongitude = 0;
|
||||
public double mLatitude = 0;
|
||||
private Context mContext;
|
||||
private final List<SweepersStationBean> stationList = new ArrayList<>();
|
||||
private SweepersRoutesResult sweepersRoutesResult = null;
|
||||
private final List<SweeperStationBean> stationList = new ArrayList<>();
|
||||
private SweeperRoutesResult sweeperRoutesResult = null;
|
||||
/**
|
||||
* 用来表示是否正在开往下一站
|
||||
*/
|
||||
@@ -103,11 +94,11 @@ public class SweepersOrderModel {
|
||||
private static final long QUERY_BUS_STATION_DELAY = 5000;
|
||||
|
||||
private ICarOperationStatusCallback carOperationStatusCallback;
|
||||
private IRefreshSweepersStationsCallback refreshBusStationsCallback;
|
||||
private IRefreshSweeperStationsCallback refreshBusStationsCallback;
|
||||
private ISlidePannelHideCallback slidePannelHideCallback;
|
||||
private ISweepersControllerStatusCallback mControllerStatusCallback; //Model->Presenter:VR mode等
|
||||
private ISweeperControllerStatusCallback mControllerStatusCallback; //Model->Presenter:VR mode等
|
||||
|
||||
List<SweepersRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();//全路径信息
|
||||
List<SweeperRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();//全路径信息
|
||||
|
||||
private boolean hadQueryLeaveAwayPassager = false;
|
||||
|
||||
@@ -117,25 +108,25 @@ public class SweepersOrderModel {
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
if ( msg.what == MSG_QUERY_BUS_STATION ) {
|
||||
SweepersOrderModel.getInstance().querySweepersRoutes();
|
||||
SweeperOrderModel.getInstance().querySweeperRoutes();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
public static SweepersOrderModel getInstance() {
|
||||
public static SweeperOrderModel getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( SweepersOrderModel.class ) {
|
||||
synchronized ( SweeperOrderModel.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new SweepersOrderModel();
|
||||
sInstance = new SweeperOrderModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private SweepersOrderModel() {
|
||||
private SweeperOrderModel() {
|
||||
|
||||
}
|
||||
|
||||
@@ -200,7 +191,7 @@ public class SweepersOrderModel {
|
||||
this.carOperationStatusCallback = callback;
|
||||
}
|
||||
|
||||
public void setRefreshBusStationsCallback(IRefreshSweepersStationsCallback callback){
|
||||
public void setRefreshBusStationsCallback(IRefreshSweeperStationsCallback callback){
|
||||
this.refreshBusStationsCallback = callback;
|
||||
}
|
||||
|
||||
@@ -208,7 +199,7 @@ public class SweepersOrderModel {
|
||||
this.slidePannelHideCallback = callback;
|
||||
}
|
||||
|
||||
public void setControllerStatusCallback(ISweepersControllerStatusCallback callback) {
|
||||
public void setControllerStatusCallback(ISweeperControllerStatusCallback callback) {
|
||||
this.mControllerStatusCallback = callback;
|
||||
}
|
||||
|
||||
@@ -230,11 +221,11 @@ public class SweepersOrderModel {
|
||||
|
||||
};
|
||||
|
||||
public static List<SweepersRoutePlanningUpdateReqBean.Result> coordinateConverterWgsToGcjList(Context mContext, List<MessagePad.Location> mogoLatLngList) {
|
||||
List<SweepersRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();
|
||||
public static List<SweeperRoutePlanningUpdateReqBean.Result> coordinateConverterWgsToGcjList(Context mContext, List<MessagePad.Location> mogoLatLngList) {
|
||||
List<SweeperRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();
|
||||
for (MessagePad.Location m : mogoLatLngList) {
|
||||
LatLng mogoLatLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(mContext, m);
|
||||
SweepersRoutePlanningUpdateReqBean.Result result = new SweepersRoutePlanningUpdateReqBean.Result();
|
||||
SweeperRoutePlanningUpdateReqBean.Result result = new SweeperRoutePlanningUpdateReqBean.Result();
|
||||
result.latitude = mogoLatLng.latitude;
|
||||
result.longitude = mogoLatLng.longitude;
|
||||
points.add(result);
|
||||
@@ -250,11 +241,11 @@ public class SweepersOrderModel {
|
||||
return;
|
||||
}
|
||||
|
||||
SweepersStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweepersStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
SweeperStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweeperStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
|
||||
SweepersServiceManager.getInstance().updateOrderRoute(mContext, currentLineId, currentStation.getSiteId()
|
||||
, nextStation.getSiteId(), points, new ISweepersServiceCallback<BaseData>() {
|
||||
SweeperServiceManager.getInstance().updateOrderRoute(mContext, currentLineId, currentStation.getSiteId()
|
||||
, nextStation.getSiteId(), points, new ISweeperServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
|
||||
@@ -334,7 +325,7 @@ public class SweepersOrderModel {
|
||||
if (backgroundCurrentStationIndex +1 > stationList.size() - 1 ){
|
||||
return;
|
||||
}
|
||||
SweepersStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
SweeperStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
|
||||
double startLon = upcomingStation.getGcjLon();
|
||||
double startLat = upcomingStation.getGcjLat();
|
||||
@@ -344,13 +335,13 @@ public class SweepersOrderModel {
|
||||
|
||||
Logger.i(TAG, "judgeStartStation() distance = " + distance);
|
||||
|
||||
if ( distance > SweepersConst.ARRIVE_AT_END_STATION_DISTANCE ) {
|
||||
if ( distance > SweeperConst.ARRIVE_AT_END_STATION_DISTANCE ) {
|
||||
distance = CoordinateUtils.calculateLineDistance(startLon, startLat,
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon(),
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat());
|
||||
}
|
||||
|
||||
if ( distance <= SweepersConst.ARRIVE_AT_END_STATION_DISTANCE ) {
|
||||
if ( distance <= SweeperConst.ARRIVE_AT_END_STATION_DISTANCE ) {
|
||||
onArriveAt(null); //无自动驾驶到站信息传null
|
||||
return;
|
||||
}
|
||||
@@ -359,11 +350,11 @@ public class SweepersOrderModel {
|
||||
/**
|
||||
* 查询小巴路线
|
||||
*/
|
||||
public void querySweepersRoutes() {
|
||||
public void querySweeperRoutes() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "查询小巴路线");
|
||||
SweepersServiceManager.getInstance().queryBusRoutes(mContext, new ISweepersServiceCallback<SweepersRoutesResponse>() {
|
||||
SweeperServiceManager.getInstance().queryBusRoutes(mContext, new ISweeperServiceCallback<SweeperRoutesResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersRoutesResponse data) {
|
||||
public void onSuccess(SweeperRoutesResponse data) {
|
||||
if ( data == null
|
||||
|| data.getResult() == null
|
||||
|| data.getResult().getSites() == null
|
||||
@@ -387,10 +378,10 @@ public class SweepersOrderModel {
|
||||
*/
|
||||
public void debugResetStationStatus() {
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "测试、重置站点状态");
|
||||
SweepersServiceManager.getInstance().resetStationStatus(mContext, currentLineId
|
||||
, new ISweepersServiceCallback<SweepersRoutesResponse>() {
|
||||
SweeperServiceManager.getInstance().resetStationStatus(mContext, currentLineId
|
||||
, new ISweeperServiceCallback<SweeperRoutesResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersRoutesResponse o) {
|
||||
public void onSuccess(SweeperRoutesResponse o) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + o);
|
||||
isGoingToNextStation = false;
|
||||
if (o.getResult() == null || o.getResult().getSites() == null || o.getResult().getSites().isEmpty()) {
|
||||
@@ -413,10 +404,10 @@ public class SweepersOrderModel {
|
||||
*/
|
||||
public void leaveStation(boolean isOneWayOver,boolean isRestart){
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"leaveStation-backgroundCurrentStationIndex = "+backgroundCurrentStationIndex);
|
||||
SweepersServiceManager.getInstance().leaveStation(mContext, stationList.get(backgroundCurrentStationIndex).getSeq()
|
||||
, stationList.get(backgroundCurrentStationIndex).getSiteId(), new ISweepersServiceCallback<SweepersRoutesResponse>() {
|
||||
SweeperServiceManager.getInstance().leaveStation(mContext, stationList.get(backgroundCurrentStationIndex).getSeq()
|
||||
, stationList.get(backgroundCurrentStationIndex).getSiteId(), new ISweeperServiceCallback<SweeperRoutesResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersRoutesResponse o) {
|
||||
public void onSuccess(SweeperRoutesResponse o) {
|
||||
if ( o.getResult() == null || o.getResult().getSites() == null || o.getResult().getSites().isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
@@ -430,7 +421,7 @@ public class SweepersOrderModel {
|
||||
isGoingToNextStation = false;
|
||||
backgroundCurrentStationIndex = 0;
|
||||
CallerAutoPilotManager.INSTANCE.cancelAutoPilot();
|
||||
querySweepersRoutes();
|
||||
querySweeperRoutes();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -457,7 +448,7 @@ public class SweepersOrderModel {
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
private void leaveStationSuccess(SweepersRoutesResult result, boolean isRestart) {
|
||||
private void leaveStationSuccess(SweeperRoutesResult result, boolean isRestart) {
|
||||
renderBusStationsStatus(result);
|
||||
if (slidePannelHideCallback != null) {
|
||||
slidePannelHideCallback.hideSlidePanel();
|
||||
@@ -481,8 +472,8 @@ public class SweepersOrderModel {
|
||||
triggerStartServiceEvent(isRestart, false);
|
||||
|
||||
isArrivedStation = false;
|
||||
SweepersStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweepersStationBean nextStation = stationList.get( backgroundCurrentStationIndex + 1);
|
||||
SweeperStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweeperStationBean nextStation = stationList.get( backgroundCurrentStationIndex + 1);
|
||||
|
||||
// if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
|
||||
// == CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()) {
|
||||
@@ -490,8 +481,8 @@ public class SweepersOrderModel {
|
||||
// }
|
||||
AutopilotControlParameters parameters = new AutopilotControlParameters();
|
||||
parameters.isSpeakVoice = !isRestart;
|
||||
parameters.routeID = sweepersRoutesResult.getLineId();
|
||||
parameters.routeName = sweepersRoutesResult.getName();
|
||||
parameters.routeID = sweeperRoutesResult.getLineId();
|
||||
parameters.routeName = sweeperRoutesResult.getName();
|
||||
parameters.startName = PinYinUtil.getPinYinHeadChar(currentStation.getName());
|
||||
parameters.endName = PinYinUtil.getPinYinHeadChar(nextStation.getName());
|
||||
parameters.startLatLon = new AutopilotControlParameters
|
||||
@@ -501,13 +492,13 @@ public class SweepersOrderModel {
|
||||
parameters.vehicleType = VEHICLE_TYPE;
|
||||
if (parameters.autoPilotLine == null) {
|
||||
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
|
||||
sweepersRoutesResult.getLineId(),
|
||||
sweepersRoutesResult.csvFileUrl, sweepersRoutesResult.csvFileMd5,
|
||||
sweepersRoutesResult.txtFileUrl, sweepersRoutesResult.txtFileMd5,
|
||||
sweepersRoutesResult.contrailSaveTime, sweepersRoutesResult.carModel,
|
||||
sweepersRoutesResult.csvFileUrlDPQP, sweepersRoutesResult.csvFileMd5DPQP,
|
||||
sweepersRoutesResult.txtFileUrlDPQP, sweepersRoutesResult.txtFileMd5DPQP,
|
||||
sweepersRoutesResult.contrailSaveTimeDPQP);
|
||||
sweeperRoutesResult.getLineId(),
|
||||
sweeperRoutesResult.csvFileUrl, sweeperRoutesResult.csvFileMd5,
|
||||
sweeperRoutesResult.txtFileUrl, sweeperRoutesResult.txtFileMd5,
|
||||
sweeperRoutesResult.contrailSaveTime, sweeperRoutesResult.carModel,
|
||||
sweeperRoutesResult.csvFileUrlDPQP, sweeperRoutesResult.csvFileMd5DPQP,
|
||||
sweeperRoutesResult.txtFileUrlDPQP, sweeperRoutesResult.txtFileMd5DPQP,
|
||||
sweeperRoutesResult.contrailSaveTimeDPQP);
|
||||
}
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
|
||||
+" startLatLon="+currentStation.getName()+",endLatLon="+nextStation.getName());
|
||||
@@ -532,9 +523,9 @@ public class SweepersOrderModel {
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation-currentStationIndex = "+ arrivedStationIndex);
|
||||
|
||||
SweepersServiceManager.getInstance().arriveSiteStation(mContext
|
||||
SweeperServiceManager.getInstance().arriveSiteStation(mContext
|
||||
, stationList.get(arrivedStationIndex).getSeq(), stationList.get(arrivedStationIndex).getSiteId()
|
||||
, new ISweepersServiceCallback<BaseData>() {
|
||||
, new ISweeperServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation success");
|
||||
@@ -556,11 +547,11 @@ public class SweepersOrderModel {
|
||||
}
|
||||
|
||||
private void renderArriveBusStation() {
|
||||
List<SweepersStationBean> site = sweepersRoutesResult.getSites();
|
||||
List<SweeperStationBean> site = sweeperRoutesResult.getSites();
|
||||
if (site != null && site.size() > 0){
|
||||
backgroundCurrentStationIndex ++;
|
||||
if (refreshBusStationsCallback != null){
|
||||
refreshBusStationsCallback.refreshBusStations(sweepersRoutesResult.getName(),stationList, backgroundCurrentStationIndex
|
||||
refreshBusStationsCallback.refreshBusStations(sweeperRoutesResult.getName(),stationList, backgroundCurrentStationIndex
|
||||
, getNextStopStation(),true);
|
||||
}
|
||||
}
|
||||
@@ -570,14 +561,14 @@ public class SweepersOrderModel {
|
||||
* 收车
|
||||
*/
|
||||
public void stopTakeOrder(){
|
||||
SweepersServiceManager.getInstance().stopTakeOrder(mContext, new ISweepersServiceCallback<BaseData>() {
|
||||
SweeperServiceManager.getInstance().stopTakeOrder(mContext, new ISweeperServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
mIsWorking = !mIsWorking;
|
||||
closeBeautificationMode();
|
||||
carOperationStatusCallback.changeOperationStatus(isWorking());
|
||||
startOrStopOrderLoop(mIsWorking);
|
||||
SweepersTrajectoryManager.getInstance().stopTrajReqLoop();
|
||||
SweeperTrajectoryManager.getInstance().stopTrajReqLoop();
|
||||
}
|
||||
@Override
|
||||
public void onFail(String failMsg) {
|
||||
@@ -605,7 +596,7 @@ public class SweepersOrderModel {
|
||||
* 出车
|
||||
*/
|
||||
public void startTakeOrder(){
|
||||
SweepersServiceManager.getInstance().startTakeOrder(mContext, new ISweepersServiceCallback<BaseData>() {
|
||||
SweeperServiceManager.getInstance().startTakeOrder(mContext, new ISweeperServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
mIsWorking = !mIsWorking;
|
||||
@@ -615,7 +606,7 @@ public class SweepersOrderModel {
|
||||
+ stationList.get( backgroundCurrentStationIndex ).getName() + "站点" );
|
||||
}
|
||||
carOperationStatusCallback.changeOperationStatus(isWorking());
|
||||
querySweepersRoutes();
|
||||
querySweeperRoutes();
|
||||
}
|
||||
@Override
|
||||
public void onFail(String failMsg) {
|
||||
@@ -633,10 +624,10 @@ public class SweepersOrderModel {
|
||||
*/
|
||||
public void queryOperationStatus() {
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "查询运营状态");
|
||||
SweepersServiceManager.getInstance().queryOperationStatus(mContext
|
||||
, new ISweepersServiceCallback<SweepersOperationStatusResponse>() {
|
||||
SweeperServiceManager.getInstance().queryOperationStatus(mContext
|
||||
, new ISweeperServiceCallback<SweeperOperationStatusResponse>() {
|
||||
@Override
|
||||
public void onSuccess(SweepersOperationStatusResponse o) {
|
||||
public void onSuccess(SweeperOperationStatusResponse o) {
|
||||
if ( o.data != null ) {
|
||||
mIsWorking = o.data.serviceStatus == 1;
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "查询运营状态 result.status: " + o.data.serviceStatus);
|
||||
@@ -674,15 +665,15 @@ public class SweepersOrderModel {
|
||||
* 车机端展示 离开站为当前站点,前往站为下一站, 下一站到站后在置为当前站
|
||||
* @param result
|
||||
*/
|
||||
private void renderBusStationsStatus(SweepersRoutesResult result) {
|
||||
private void renderBusStationsStatus(SweeperRoutesResult result) {
|
||||
if (result == null) return;
|
||||
sweepersRoutesResult = result;
|
||||
List<SweepersStationBean> site = result.getSites();
|
||||
sweeperRoutesResult = result;
|
||||
List<SweeperStationBean> site = result.getSites();
|
||||
currentLineId = result.getLineId();
|
||||
stationList.clear();
|
||||
stationList.addAll( site );
|
||||
for ( int i = 0; i < stationList.size(); i++ ) {
|
||||
SweepersStationBean s = stationList.get( i );
|
||||
SweeperStationBean s = stationList.get( i );
|
||||
|
||||
CallerLogger.INSTANCE.d( M_BUS + "renderBusStationsStatus--",
|
||||
"Index="+ i+" ,name = "+s.getName()+" ,"+s.isLeaving()+","+s.getDrivingStatus());
|
||||
@@ -698,7 +689,7 @@ public class SweepersOrderModel {
|
||||
}
|
||||
}
|
||||
|
||||
SweepersStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
SweeperStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG,
|
||||
"渲染站点信息服务端currentStationIndex="+backgroundCurrentStationIndex
|
||||
@@ -729,7 +720,7 @@ public class SweepersOrderModel {
|
||||
}
|
||||
|
||||
//需放在currentStationIndex赋值之后
|
||||
SweepersTrajectoryManager.getInstance().syncTrajectoryInfo();
|
||||
SweeperTrajectoryManager.getInstance().syncTrajectoryInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -870,8 +861,8 @@ public class SweepersOrderModel {
|
||||
|
||||
// 车机端上传心跳数据(只在出车状态时上传)
|
||||
public void runCarHeartbeat() {
|
||||
SweepersServiceManager.getInstance().runCarHeartbeat(mContext, mLongitude, mLatitude,
|
||||
new ISweepersServiceCallback<BaseData>() {
|
||||
SweeperServiceManager.getInstance().runCarHeartbeat(mContext, mLongitude, mLatitude,
|
||||
new ISweeperServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData data) {
|
||||
|
||||
@@ -887,9 +878,9 @@ public class SweepersOrderModel {
|
||||
private void startOrStopOrderLoop(boolean start) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "startOrStopOrderLoop() " + start);
|
||||
if (start) {
|
||||
SweepersModelLoopManager.getInstance().startHeartbeatLoop();
|
||||
SweeperModelLoopManager.getInstance().startHeartbeatLoop();
|
||||
} else {
|
||||
SweepersModelLoopManager.getInstance().stopHeartbeatLoop();
|
||||
SweeperModelLoopManager.getInstance().stopHeartbeatLoop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,14 +888,14 @@ public class SweepersOrderModel {
|
||||
if (stationList == null || backgroundCurrentStationIndex >= stationList.size()-1) {
|
||||
return;
|
||||
}
|
||||
SweepersStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweepersStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
SweepersAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
|
||||
SweeperStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
|
||||
SweeperStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
|
||||
SweeperAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), currentLineId);
|
||||
}
|
||||
|
||||
public SweepersRoutesResult getBusRoutesResult() {
|
||||
return sweepersRoutesResult;
|
||||
public SweeperRoutesResult getBusRoutesResult() {
|
||||
return sweeperRoutesResult;
|
||||
}
|
||||
|
||||
public int getCurrentStationIndex() {
|
||||
@@ -1,17 +1,14 @@
|
||||
package com.mogo.och.sweepers.net;
|
||||
package com.mogo.och.sweeper.net;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.sweepers.bean.SweepersOperationStatusRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersOrdersResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLinesResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResponse;
|
||||
import com.mogo.och.sweepers.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLineStationsRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersOperationStatusResponse;
|
||||
import com.mogo.och.sweepers.bean.QueryLeaveAwayPassengersRequest;
|
||||
import com.mogo.och.sweepers.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersResetDrivingLineRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersUpdateSiteStatusRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResponse;
|
||||
import com.mogo.och.sweeper.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLineStationsRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperResetDrivingLineRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperUpdateSiteStatusRequest;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.Body;
|
||||
@@ -28,7 +25,7 @@ import retrofit2.http.Query;
|
||||
* <p>
|
||||
* wiki: http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=48970072
|
||||
*/
|
||||
public interface ISweepersApiService {
|
||||
public interface ISweeperApiService {
|
||||
/**
|
||||
* 根据车机坐标获取所在区域全部站点信息
|
||||
*
|
||||
@@ -37,7 +34,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers( {"Content-Type:application/json;charset=UTF-8"} )
|
||||
@POST( "/autopilot-car-hailing/line/v2/driver/bus/lineDataWithDriver/query" )
|
||||
Observable<SweepersRoutesResponse> querySiteByCoordinate(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweepersQueryLineStationsRequest request);
|
||||
Observable<SweeperRoutesResponse> querySiteByCoordinate(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweeperQueryLineStationsRequest request);
|
||||
|
||||
/**
|
||||
* 重置巴士路线: 点击小巴车tab 或者出车后会使用
|
||||
@@ -47,7 +44,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers( {"Content-Type:application/json;charset=UTF-8"} )
|
||||
@POST( "/autopilot-car-hailing/car/v2/driver/bus/drivingLine/reset" )
|
||||
Observable<SweepersRoutesResponse> resetStationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweepersResetDrivingLineRequest request);
|
||||
Observable<SweeperRoutesResponse> resetStationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweeperResetDrivingLineRequest request);
|
||||
|
||||
/**
|
||||
* 离站,通知服务器
|
||||
@@ -56,7 +53,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers({"Content-Type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/car/v2/driver/bus/driving/away")
|
||||
Observable<SweepersRoutesResponse> leaveStation(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweepersUpdateSiteStatusRequest request);
|
||||
Observable<SweeperRoutesResponse> leaveStation(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweeperUpdateSiteStatusRequest request);
|
||||
|
||||
/**
|
||||
* 到站 更新到站信息
|
||||
@@ -65,7 +62,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/order/v2/driver/bus/driving/attachSite")
|
||||
Observable< BaseData > arriveSiteStation(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweepersUpdateSiteStatusRequest request);
|
||||
Observable< BaseData > arriveSiteStation(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweeperUpdateSiteStatusRequest request);
|
||||
|
||||
/**
|
||||
* 出车
|
||||
@@ -74,7 +71,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST("/autopilot-car-hailing/car/v2/driver/bus/startTakeOrder")
|
||||
Observable<BaseData> startTakeOrder(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweepersOperationStatusRequest request);
|
||||
Observable<BaseData> startTakeOrder(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweeperOperationStatusRequest request);
|
||||
|
||||
/**
|
||||
* 收车
|
||||
@@ -83,7 +80,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/car/v2/driver/bus/stopTakeOrder")
|
||||
Observable<BaseData> stopTakeOrder(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweepersOperationStatusRequest request);
|
||||
Observable<BaseData> stopTakeOrder(@Header ("appId") String appId,@Header("ticket") String ticket,@Body SweeperOperationStatusRequest request);
|
||||
|
||||
/**
|
||||
* 查询小巴出车/收车状态
|
||||
@@ -92,7 +89,7 @@ public interface ISweepersApiService {
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@GET("/autopilot-car-hailing/car/v2/driver/bus/takeOrderStatus/query")
|
||||
Observable<SweepersOperationStatusResponse> queryOperationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
Observable<SweeperOperationStatusResponse> queryOperationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
/**
|
||||
* 车机端上传心跳数据(只在出车状态时上传):包含高德坐标系经纬度
|
||||
@@ -111,10 +108,10 @@ public interface ISweepersApiService {
|
||||
* @return
|
||||
*/
|
||||
@GET("/autopilot-car-hailing/line/v2/driver/bus/bindLine/query")
|
||||
Observable<SweepersQueryLinesResponse> queryBusLines(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
Observable<SweeperQueryLinesResponse> queryBusLines(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST( "/autopilot-car-hailing/location/v2/driver/bus/saveLineCoordinate" )
|
||||
Observable<BaseData> updateOrderRoute(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweepersRoutePlanningUpdateReqBean data);
|
||||
Observable<BaseData> updateOrderRoute(@Header ("appId") String appId, @Header("ticket") String ticket, @Body SweeperRoutePlanningUpdateReqBean data);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.och.sweepers.net;
|
||||
package com.mogo.och.sweeper.net;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/20
|
||||
*/
|
||||
public interface ISweepersServiceCallback< T >{
|
||||
public interface ISweeperServiceCallback< T >{
|
||||
void onSuccess(T o);
|
||||
|
||||
void onFail(String failMsg);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.net;
|
||||
package com.mogo.och.sweeper.net;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -9,20 +9,17 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLinesResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResponse;
|
||||
import com.mogo.och.sweepers.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.sweepers.bean.SweepersOperationStatusRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersOperationStatusResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersOrdersResponse;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLineStationsRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersResetDrivingLineRequest;
|
||||
import com.mogo.och.sweepers.bean.SweepersUpdateSiteStatusRequest;
|
||||
import com.mogo.och.sweepers.bean.QueryLeaveAwayPassengersRequest;
|
||||
import com.mogo.och.sweepers.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResponse;
|
||||
import com.mogo.och.sweeper.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperOperationStatusResponse;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLineStationsRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperResetDrivingLineRequest;
|
||||
import com.mogo.och.sweeper.bean.SweeperUpdateSiteStatusRequest;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,22 +30,22 @@ import io.reactivex.schedulers.Schedulers;
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/20
|
||||
*/
|
||||
public class SweepersServiceManager {
|
||||
public class SweeperServiceManager {
|
||||
|
||||
private static final String TAG = SweepersServiceManager.class.getSimpleName();
|
||||
private static final String TAG = SweeperServiceManager.class.getSimpleName();
|
||||
|
||||
private final ISweepersApiService mService;
|
||||
private final ISweeperApiService mService;
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final SweepersServiceManager INSTANCE = new SweepersServiceManager();
|
||||
private static final SweeperServiceManager INSTANCE = new SweeperServiceManager();
|
||||
}
|
||||
|
||||
public static SweepersServiceManager getInstance(){
|
||||
public static SweeperServiceManager getInstance(){
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private SweepersServiceManager(){
|
||||
mService = MoGoRetrofitFactory.getInstance(SweepersConst.getBaseUrl()).create(ISweepersApiService.class);
|
||||
private SweeperServiceManager(){
|
||||
mService = MoGoRetrofitFactory.getInstance(SweeperConst.getBaseUrl()).create(ISweeperApiService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,13 +53,13 @@ public class SweepersServiceManager {
|
||||
* @param context
|
||||
* @param callback
|
||||
*/
|
||||
public void queryBusRoutes(Context context, ISweepersServiceCallback<SweepersRoutesResponse> callback) {
|
||||
public void queryBusRoutes(Context context, ISweeperServiceCallback<SweeperRoutesResponse> callback) {
|
||||
//获取当前高德坐标
|
||||
|
||||
mService.querySiteByCoordinate(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
, new SweepersQueryLineStationsRequest(SweepersOrderModel.getInstance().mLongitude
|
||||
, SweepersOrderModel.getInstance().mLatitude,true))
|
||||
, new SweeperQueryLineStationsRequest(SweeperOrderModel.getInstance().mLongitude
|
||||
, SweeperOrderModel.getInstance().mLatitude,true))
|
||||
.subscribeOn( Schedulers.io() ).observeOn( AndroidSchedulers.mainThread() )
|
||||
.subscribe( getSubscribeImpl(context,callback,"querySiteByCoordinate"));
|
||||
}
|
||||
@@ -73,9 +70,9 @@ public class SweepersServiceManager {
|
||||
* @param lineId
|
||||
* @param callback
|
||||
*/
|
||||
public void resetStationStatus(Context context, int lineId, ISweepersServiceCallback<SweepersRoutesResponse> callback){
|
||||
public void resetStationStatus(Context context, int lineId, ISweeperServiceCallback<SweeperRoutesResponse> callback){
|
||||
mService.resetStationStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new SweepersResetDrivingLineRequest(lineId))
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new SweeperResetDrivingLineRequest(lineId))
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(getSubscribeImpl(context,callback,"debugResetStationStatus"));
|
||||
}
|
||||
@@ -87,11 +84,11 @@ public class SweepersServiceManager {
|
||||
* @param siteId
|
||||
* @param callback
|
||||
*/
|
||||
public void leaveStation(Context context, int seq, int siteId, ISweepersServiceCallback<SweepersRoutesResponse> callback){
|
||||
public void leaveStation(Context context, int seq, int siteId, ISweeperServiceCallback<SweeperRoutesResponse> callback){
|
||||
mService.leaveStation(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new SweepersUpdateSiteStatusRequest(seq,siteId, SweepersOrderModel.getInstance().mLongitude
|
||||
, SweepersOrderModel.getInstance().mLatitude))
|
||||
,new SweeperUpdateSiteStatusRequest(seq,siteId, SweeperOrderModel.getInstance().mLongitude
|
||||
, SweeperOrderModel.getInstance().mLatitude))
|
||||
.subscribeOn( Schedulers.io() )
|
||||
.observeOn( AndroidSchedulers.mainThread() )
|
||||
.subscribe(getSubscribeImpl(context,callback,"leaveStation"));
|
||||
@@ -104,11 +101,11 @@ public class SweepersServiceManager {
|
||||
* @param siteId
|
||||
* @param callback
|
||||
*/
|
||||
public void arriveSiteStation(Context context, int seq, int siteId, ISweepersServiceCallback<BaseData> callback){
|
||||
public void arriveSiteStation(Context context, int seq, int siteId, ISweeperServiceCallback<BaseData> callback){
|
||||
mService.arriveSiteStation(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new SweepersUpdateSiteStatusRequest(seq,siteId
|
||||
, SweepersOrderModel.getInstance().mLongitude, SweepersOrderModel.getInstance().mLatitude))
|
||||
,new SweeperUpdateSiteStatusRequest(seq,siteId
|
||||
, SweeperOrderModel.getInstance().mLongitude, SweeperOrderModel.getInstance().mLatitude))
|
||||
.subscribeOn( Schedulers.io() )
|
||||
.observeOn( AndroidSchedulers.mainThread() )
|
||||
.subscribe(getSubscribeImpl(context,callback,"leaveStation"));
|
||||
@@ -119,11 +116,11 @@ public class SweepersServiceManager {
|
||||
* @param context
|
||||
* @param callback
|
||||
*/
|
||||
public void stopTakeOrder(Context context, ISweepersServiceCallback<BaseData> callback){
|
||||
public void stopTakeOrder(Context context, ISweeperServiceCallback<BaseData> callback){
|
||||
mService.stopTakeOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new SweepersOperationStatusRequest(SweepersOrderModel.getInstance().mLongitude
|
||||
, SweepersOrderModel.getInstance().mLatitude))
|
||||
,new SweeperOperationStatusRequest(SweeperOrderModel.getInstance().mLongitude
|
||||
, SweeperOrderModel.getInstance().mLatitude))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(getSubscribeImpl(context,callback,"stopTakeOrder"));
|
||||
@@ -134,11 +131,11 @@ public class SweepersServiceManager {
|
||||
* @param context
|
||||
* @param callback
|
||||
*/
|
||||
public void startTakeOrder(Context context, ISweepersServiceCallback<BaseData> callback){
|
||||
public void startTakeOrder(Context context, ISweeperServiceCallback<BaseData> callback){
|
||||
mService.startTakeOrder(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new SweepersOperationStatusRequest(SweepersOrderModel.getInstance().mLongitude
|
||||
, SweepersOrderModel.getInstance().mLatitude))
|
||||
,new SweeperOperationStatusRequest(SweeperOrderModel.getInstance().mLongitude
|
||||
, SweeperOrderModel.getInstance().mLatitude))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(getSubscribeImpl(context,callback,"startTakeOrder"));
|
||||
@@ -149,7 +146,7 @@ public class SweepersServiceManager {
|
||||
* @param context
|
||||
* @param callback
|
||||
*/
|
||||
public void queryOperationStatus(Context context, ISweepersServiceCallback<SweepersOperationStatusResponse> callback){
|
||||
public void queryOperationStatus(Context context, ISweeperServiceCallback<SweeperOperationStatusResponse> callback){
|
||||
mService.queryOperationStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.subscribeOn( Schedulers.io() )
|
||||
@@ -158,7 +155,7 @@ public class SweepersServiceManager {
|
||||
}
|
||||
|
||||
|
||||
public void queryBusLines(Context context, ISweepersServiceCallback<SweepersQueryLinesResponse> callback){
|
||||
public void queryBusLines(Context context, ISweeperServiceCallback<SweeperQueryLinesResponse> callback){
|
||||
mService.queryBusLines(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -167,11 +164,11 @@ public class SweepersServiceManager {
|
||||
}
|
||||
|
||||
public void updateOrderRoute(Context context,int lineId, int startSiteId, int endSiteId
|
||||
, List< SweepersRoutePlanningUpdateReqBean.Result > points
|
||||
, ISweepersServiceCallback<BaseData> callback){
|
||||
, List< SweeperRoutePlanningUpdateReqBean.Result > points
|
||||
, ISweeperServiceCallback<BaseData> callback){
|
||||
mService.updateOrderRoute(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new SweepersRoutePlanningUpdateReqBean(MoGoAiCloudClientConfig.getInstance().getSn()
|
||||
,new SweeperRoutePlanningUpdateReqBean(MoGoAiCloudClientConfig.getInstance().getSn()
|
||||
,lineId,startSiteId,endSiteId, points))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -186,7 +183,7 @@ public class SweepersServiceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void runCarHeartbeat(Context context, double lon, double lat,
|
||||
ISweepersServiceCallback<BaseData> callback) {
|
||||
ISweeperServiceCallback<BaseData> callback) {
|
||||
mService.runCarHeartbeat(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken(),new CarHeartbeatReqBean(
|
||||
MoGoAiCloudClientConfig.getInstance().getSn(), lon, lat))
|
||||
@@ -195,7 +192,7 @@ public class SweepersServiceManager {
|
||||
.subscribe(getSubscribeImpl(context, callback, "runCarHeartbeat"));
|
||||
}
|
||||
|
||||
private <T extends BaseData> SubscribeImpl getSubscribeImpl(Context context, ISweepersServiceCallback<T> callback, String apiName){
|
||||
private <T extends BaseData> SubscribeImpl getSubscribeImpl(Context context, ISweeperServiceCallback<T> callback, String apiName){
|
||||
return new SubscribeImpl<T>(RequestOptions.create(context)){
|
||||
@Override
|
||||
public void onSuccess(T o) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.presenter;
|
||||
package com.mogo.och.sweeper.presenter;
|
||||
|
||||
import android.os.Looper;
|
||||
|
||||
@@ -7,22 +7,22 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLinesResponse;
|
||||
import com.mogo.och.sweepers.callback.ISweepersLinesCallback;
|
||||
import com.mogo.och.sweepers.model.SweepersLineModel;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweepers.ui.SweepersSwitchLineView;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
import com.mogo.och.sweeper.callback.ISweeperLinesCallback;
|
||||
import com.mogo.och.sweeper.model.SweeperLineModel;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
import com.mogo.och.sweeper.ui.SweeperSwitchLineView;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/9
|
||||
*/
|
||||
public class SweepersLinePresenter extends Presenter<SweepersSwitchLineView> implements ISweepersLinesCallback {
|
||||
public class SweeperLinePresenter extends Presenter<SweeperSwitchLineView> implements ISweeperLinesCallback {
|
||||
|
||||
public SweepersLinePresenter(SweepersSwitchLineView view) {
|
||||
public SweeperLinePresenter(SweeperSwitchLineView view) {
|
||||
super(view);
|
||||
SweepersLineModel.getInstance().init();
|
||||
SweepersOrderModel.getInstance().init();
|
||||
SweeperLineModel.getInstance().init();
|
||||
SweeperOrderModel.getInstance().init();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -32,7 +32,7 @@ public class SweepersLinePresenter extends Presenter<SweepersSwitchLineView> imp
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
SweepersLineModel.getInstance().setBusLinesCallback(this);
|
||||
SweeperLineModel.getInstance().setBusLinesCallback(this);
|
||||
}
|
||||
|
||||
private void runOnUIThread( Runnable executor ) {
|
||||
@@ -47,7 +47,7 @@ public class SweepersLinePresenter extends Presenter<SweepersSwitchLineView> imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBusLinesChange(SweepersQueryLinesResponse lines) {
|
||||
public void onBusLinesChange(SweeperQueryLinesResponse lines) {
|
||||
runOnUIThread(() -> mView.onBusLinesChange(lines));
|
||||
}
|
||||
|
||||
@@ -57,19 +57,19 @@ public class SweepersLinePresenter extends Presenter<SweepersSwitchLineView> imp
|
||||
}
|
||||
|
||||
public void queryBusLines(){
|
||||
SweepersLineModel.getInstance().queryBusLines();
|
||||
SweeperLineModel.getInstance().queryBusLines();
|
||||
}
|
||||
|
||||
public void commitSwitchLineId(int lineId){
|
||||
SweepersLineModel.getInstance().commitSwitchLineId(lineId);
|
||||
SweeperLineModel.getInstance().commitSwitchLineId(lineId);
|
||||
}
|
||||
|
||||
public void removeListener(){
|
||||
SweepersLineModel.getInstance().setBusLinesCallback(null);
|
||||
SweeperLineModel.getInstance().setBusLinesCallback(null);
|
||||
}
|
||||
|
||||
public void queryBusRoutes(){
|
||||
SweepersOrderModel.getInstance().querySweepersRoutes();
|
||||
SweeperOrderModel.getInstance().querySweeperRoutes();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.och.sweepers.presenter;
|
||||
package com.mogo.och.sweeper.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -18,15 +18,15 @@ import io.reactivex.schedulers.Schedulers;
|
||||
*
|
||||
* 管理轮询逻辑(订单轮询、新单轮询、新单抢单结果轮询等等)
|
||||
*/
|
||||
public class SweepersModelLoopManager {
|
||||
public class SweeperModelLoopManager {
|
||||
|
||||
private static final String TAG = SweepersModelLoopManager.class.getSimpleName();
|
||||
private static final String TAG = SweeperModelLoopManager.class.getSimpleName();
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final SweepersModelLoopManager INSTANCE = new SweepersModelLoopManager();
|
||||
private static final SweeperModelLoopManager INSTANCE = new SweeperModelLoopManager();
|
||||
}
|
||||
|
||||
public static SweepersModelLoopManager getInstance() {
|
||||
public static SweeperModelLoopManager getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@ public class SweepersModelLoopManager {
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.i(M_BUS + TAG, "startHeartbeatLoop()");
|
||||
mHeartbeatDisposable = Observable.interval(SweepersConst.LOOP_DELAY,
|
||||
SweepersConst.LOOP_PERIOD_60S, TimeUnit.MILLISECONDS)
|
||||
mHeartbeatDisposable = Observable.interval(SweeperConst.LOOP_DELAY,
|
||||
SweeperConst.LOOP_PERIOD_60S, TimeUnit.MILLISECONDS)
|
||||
.map((aLong -> aLong + 1))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(aLong -> SweepersOrderModel.getInstance().runCarHeartbeat());
|
||||
.subscribe(aLong -> SweeperOrderModel.getInstance().runCarHeartbeat());
|
||||
}
|
||||
|
||||
public void stopHeartbeatLoop() {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.presenter;
|
||||
package com.mogo.och.sweeper.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
@@ -16,14 +16,14 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweepers.bean.SweepersStationBean;
|
||||
import com.mogo.och.sweepers.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweepers.callback.ISweepersControllerStatusCallback;
|
||||
import com.mogo.och.sweepers.callback.IRefreshSweepersStationsCallback;
|
||||
import com.mogo.och.sweepers.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweepers.fragment.SweepersFragment;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweepers.util.SweepersTrajectoryManager;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback;
|
||||
import com.mogo.och.sweeper.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
import com.mogo.och.sweeper.util.SweeperTrajectoryManager;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -39,77 +39,77 @@ import system_master.SystemStatusInfo;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
implements ICarOperationStatusCallback, IRefreshSweepersStationsCallback, ISlidePannelHideCallback
|
||||
, IMoGoAutopilotStatusListener, ISweepersControllerStatusCallback {
|
||||
public class SweeperPresenter extends Presenter<SweeperFragment>
|
||||
implements ICarOperationStatusCallback, IRefreshSweeperStationsCallback, ISlidePannelHideCallback
|
||||
, IMoGoAutopilotStatusListener, ISweeperControllerStatusCallback {
|
||||
|
||||
private static final String TAG = "BusPresenter";
|
||||
|
||||
private int currentAutopilotStatus = -1;
|
||||
private List<SweepersStationBean> mStationList = new ArrayList<>();
|
||||
private List<SweeperStationBean> mStationList = new ArrayList<>();
|
||||
private int mCurrentStation = 0;
|
||||
private boolean isRestartAutopilot = false;
|
||||
|
||||
public SweepersPresenter(SweepersFragment view) {
|
||||
public SweeperPresenter(SweeperFragment view) {
|
||||
super(view);
|
||||
//2021.11.1 鹰眼架构整合,由IMoGoAutopilotStatusListener逐步替代IMogoAdasOCHCallback接口
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
SweepersOrderModel.getInstance().init();
|
||||
SweeperOrderModel.getInstance().init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@NonNull LifecycleOwner owner) {
|
||||
super.onCreate(owner);
|
||||
SweepersOrderModel.getInstance().queryOperationStatus();
|
||||
SweepersOrderModel.getInstance().querySweepersRoutes();
|
||||
SweeperOrderModel.getInstance().queryOperationStatus();
|
||||
SweeperOrderModel.getInstance().querySweeperRoutes();
|
||||
initModelListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(@NonNull LifecycleOwner owner) {
|
||||
super.onDestroy(owner);
|
||||
SweepersOrderModel.getInstance().release();
|
||||
SweeperOrderModel.getInstance().release();
|
||||
releaseListener();
|
||||
}
|
||||
|
||||
public void initModelListener() {
|
||||
SweepersOrderModel.getInstance().setCarOperationStatusCallback(this);
|
||||
SweepersOrderModel.getInstance().setRefreshBusStationsCallback(this);
|
||||
SweepersOrderModel.getInstance().setSlidePannelHideCallback(this);
|
||||
SweepersOrderModel.getInstance().setControllerStatusCallback(this);
|
||||
SweeperOrderModel.getInstance().setCarOperationStatusCallback(this);
|
||||
SweeperOrderModel.getInstance().setRefreshBusStationsCallback(this);
|
||||
SweeperOrderModel.getInstance().setSlidePannelHideCallback(this);
|
||||
SweeperOrderModel.getInstance().setControllerStatusCallback(this);
|
||||
}
|
||||
|
||||
public void releaseListener() {
|
||||
SweepersOrderModel.getInstance().setCarOperationStatusCallback(null);
|
||||
SweepersOrderModel.getInstance().setRefreshBusStationsCallback(null);
|
||||
SweepersOrderModel.getInstance().setSlidePannelHideCallback(null);
|
||||
SweepersOrderModel.getInstance().setControllerStatusCallback(null);
|
||||
SweeperOrderModel.getInstance().setCarOperationStatusCallback(null);
|
||||
SweeperOrderModel.getInstance().setRefreshBusStationsCallback(null);
|
||||
SweeperOrderModel.getInstance().setSlidePannelHideCallback(null);
|
||||
SweeperOrderModel.getInstance().setControllerStatusCallback(null);
|
||||
}
|
||||
|
||||
public void querySweepersRoutes() {
|
||||
SweepersOrderModel.getInstance().querySweepersRoutes();
|
||||
SweeperOrderModel.getInstance().querySweeperRoutes();
|
||||
}
|
||||
|
||||
public void debugResetStationStatus() {
|
||||
SweepersOrderModel.getInstance().debugResetStationStatus();
|
||||
SweeperOrderModel.getInstance().debugResetStationStatus();
|
||||
}
|
||||
|
||||
public void autoDriveToNextStation(boolean isRestart) {
|
||||
currentAutopilotStatus = -1;
|
||||
SweepersOrderModel.getInstance().autoDriveToNextStation(isRestart);
|
||||
SweeperOrderModel.getInstance().autoDriveToNextStation(isRestart);
|
||||
isRestartAutopilot = false;
|
||||
}
|
||||
|
||||
public void restartAutopilot() {
|
||||
if (SweepersOrderModel.getInstance().isGoingToNextStation()){
|
||||
if (SweeperOrderModel.getInstance().isGoingToNextStation()){
|
||||
currentAutopilotStatus = -1;
|
||||
SweepersOrderModel.getInstance().restartAutopilot();
|
||||
SweeperOrderModel.getInstance().restartAutopilot();
|
||||
isRestartAutopilot = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void onChangeOperationStatus() {
|
||||
SweepersOrderModel.getInstance().onChangeOperationStatus();
|
||||
SweeperOrderModel.getInstance().onChangeOperationStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,7 +120,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshBusStations(String lineName,List<SweepersStationBean> stationList
|
||||
public void refreshBusStations(String lineName,List<SweeperStationBean> stationList
|
||||
, int currentStation, int nextStation, boolean isArrived) {
|
||||
mStationList.clear();
|
||||
mStationList.addAll(stationList);
|
||||
@@ -128,7 +128,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
// functionDemoModeChange();
|
||||
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel =", " mCurrentStation =" + mCurrentStation);
|
||||
if (mView != null) {
|
||||
runOnUIThread(() -> mView.refreshSweepersStations(lineName,
|
||||
runOnUIThread(() -> mView.refreshSweeperStations(lineName,
|
||||
stationList, currentStation, nextStation, isArrived));
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& ((mCurrentStation > 0 && mCurrentStation < mStationList.size() - 1)
|
||||
|| ((mCurrentStation == 0 || mCurrentStation == mStationList.size() - 1)
|
||||
&& SweepersOrderModel.getInstance().isGoingToNextStation()))) {
|
||||
&& SweeperOrderModel.getInstance().isGoingToNextStation()))) {
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING));
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) {
|
||||
SweepersOrderModel.getInstance().onArriveAt(arrivalNotification);
|
||||
SweeperOrderModel.getInstance().onArriveAt(arrivalNotification);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,7 +175,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
// 设置UI【自动驾驶】按钮是否展示
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(true));
|
||||
if (SweepersOrderModel.getInstance().isGoingToNextStation()) {
|
||||
if (SweeperOrderModel.getInstance().isGoingToNextStation()) {
|
||||
runOnUIThread(() -> mView.hideSlidePanel());
|
||||
}
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
@@ -183,7 +183,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
(mCurrentStation > 0 && mCurrentStation < mStationList.size() - 1)
|
||||
|| (
|
||||
(mCurrentStation == 0 || mCurrentStation == mStationList.size() - 1)
|
||||
&& SweepersOrderModel.getInstance().isGoingToNextStation()
|
||||
&& SweeperOrderModel.getInstance().isGoingToNextStation()
|
||||
)
|
||||
)
|
||||
) {
|
||||
@@ -199,7 +199,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
// 改变UI自动驾驶状态
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus));
|
||||
SweepersOrderModel.getInstance().triggerStartServiceEvent(
|
||||
SweeperOrderModel.getInstance().triggerStartServiceEvent(
|
||||
isRestartAutopilot, true);
|
||||
}
|
||||
break;
|
||||
@@ -214,7 +214,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
(mCurrentStation > 0 && mCurrentStation < mStationList.size() - 1)
|
||||
|| (
|
||||
(mCurrentStation == 0 || mCurrentStation == mStationList.size() - 1)
|
||||
&& SweepersOrderModel.getInstance().isGoingToNextStation()
|
||||
&& SweeperOrderModel.getInstance().isGoingToNextStation()
|
||||
)
|
||||
)
|
||||
) {
|
||||
@@ -274,7 +274,7 @@ public class SweepersPresenter extends Presenter<SweepersFragment>
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
SweepersTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo);
|
||||
SweeperTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.receiver;
|
||||
package com.mogo.och.sweeper.receiver;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
|
||||
/**
|
||||
* 测试小巴车的场景
|
||||
@@ -15,7 +15,7 @@ import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
* @author donghongyu
|
||||
* @date 4/26/21 12:08 PM
|
||||
*/
|
||||
public class TestSweepersBroadcastReceiver extends BroadcastReceiver {
|
||||
public class TestSweeperBroadcastReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = "TestBusBroadcastReceiver";
|
||||
|
||||
private Context mContext;
|
||||
@@ -24,7 +24,7 @@ public class TestSweepersBroadcastReceiver extends BroadcastReceiver {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
try {
|
||||
this.mContext = context;
|
||||
int sceneType = intent.getIntExtra(SweepersConst.BROADCAST_TEST_SWEEPERS_CONTROL_TYPE_EXTRA_KEY, 0);
|
||||
int sceneType = intent.getIntExtra(SweeperConst.BROADCAST_TEST_SWEEPER_CONTROL_TYPE_EXTRA_KEY, 0);
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "sceneType:" + sceneType);
|
||||
|
||||
// 分发场景
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.ui;
|
||||
package com.mogo.och.sweeper.ui;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
@@ -22,9 +22,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweepers.bean.SweepersQueryLinesResponse;
|
||||
import com.mogo.och.sweepers.presenter.SweepersLinePresenter;
|
||||
import com.mogo.och.sweeper.R;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
import com.mogo.och.sweeper.presenter.SweeperLinePresenter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -33,26 +33,26 @@ import java.util.List;
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/8
|
||||
*/
|
||||
public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineView, SweepersLinePresenter>
|
||||
implements View.OnClickListener, SweepersSwitchLineView {
|
||||
public class SweeperSwitchLineActivity extends MvpActivity<SweeperSwitchLineView, SweeperLinePresenter>
|
||||
implements View.OnClickListener, SweeperSwitchLineView {
|
||||
|
||||
private ImageView mClose;
|
||||
private ConstraintLayout mNoDatasView;
|
||||
private RecyclerView mLinesListView;
|
||||
private TextView mLineCommitBtn;
|
||||
private SwitchLineAdapter mAdapter;
|
||||
private List<SweepersQueryLinesResponse.Result> mData = new ArrayList<>();
|
||||
private List<SweeperQueryLinesResponse.Result> mData = new ArrayList<>();
|
||||
private int mSelectLineId = -1;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_sweepers_switch_line;
|
||||
return R.layout.activity_sweeper_switch_line;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected SweepersLinePresenter createPresenter() {
|
||||
return new SweepersLinePresenter(this);
|
||||
protected SweeperLinePresenter createPresenter() {
|
||||
return new SweeperLinePresenter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,7 +126,7 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
* @param data
|
||||
*/
|
||||
@Override
|
||||
public void onBusLinesChange(SweepersQueryLinesResponse data){
|
||||
public void onBusLinesChange(SweeperQueryLinesResponse data){
|
||||
if (null == data){
|
||||
showNoData(true);
|
||||
return;
|
||||
@@ -148,8 +148,8 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
private void changeCommitBtnBg() {
|
||||
for (int i=0; i<mData.size();i++){
|
||||
if (mData.get(i).choose == 1){
|
||||
mLineCommitBtn.setBackgroundResource(R.drawable.sweepers_switch_line_btn_commit);
|
||||
mLineCommitBtn.setTextColor(getResources().getColor(R.color.sweepers_white));
|
||||
mLineCommitBtn.setBackgroundResource(R.drawable.sweeper_switch_line_btn_commit);
|
||||
mLineCommitBtn.setTextColor(getResources().getColor(R.color.sweeper_white));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
|
||||
@Override
|
||||
public void onChangeLineIdSuccess(){
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweepers_change_line_commit_tip_s));
|
||||
ToastUtils.showLong(getResources().getString(R.string.sweeper_change_line_commit_tip_s));
|
||||
mPresenter.queryBusRoutes();
|
||||
if (mAdapter != null){
|
||||
mAdapter.setOnLineItemClickListener(null);
|
||||
@@ -211,12 +211,12 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
static class SwitchLineAdapter extends RecyclerView.Adapter<SwitchLineViewHolder>{
|
||||
|
||||
private Context mContext;
|
||||
private List<SweepersQueryLinesResponse.Result> mData;
|
||||
private List<SweeperQueryLinesResponse.Result> mData;
|
||||
// RecyclerView设置点击事件
|
||||
private LineItemClickListener mItemClickListener ;
|
||||
private int clickPos = -1;
|
||||
|
||||
public SwitchLineAdapter(Context context, List<SweepersQueryLinesResponse.Result> data){
|
||||
public SwitchLineAdapter(Context context, List<SweeperQueryLinesResponse.Result> data){
|
||||
mContext = context;
|
||||
mData = data;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
@NonNull
|
||||
@Override
|
||||
public SwitchLineViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.sweepers_switch_line_list_item
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.sweeper_switch_line_list_item
|
||||
,parent,false);
|
||||
SwitchLineViewHolder viewHolder = new SwitchLineViewHolder(view);
|
||||
return viewHolder;
|
||||
@@ -232,10 +232,10 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull SwitchLineViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
SweepersQueryLinesResponse.Result line = mData.get(position);
|
||||
holder.lineName.setText(mContext.getString(R.string.sweepers_switch_line_name)+" "+line.name);
|
||||
holder.lineStartName.setText(mContext.getString(R.string.sweepers_line_start)+" "+line.startSiteName);
|
||||
holder.lineEndName.setText(mContext.getString(R.string.sweepers_line_end)+" "+line.endSiteName);
|
||||
SweeperQueryLinesResponse.Result line = mData.get(position);
|
||||
holder.lineName.setText(mContext.getString(R.string.sweeper_switch_line_name)+" "+line.name);
|
||||
holder.lineStartName.setText(mContext.getString(R.string.sweeper_line_start)+" "+line.startSiteName);
|
||||
holder.lineEndName.setText(mContext.getString(R.string.sweeper_line_end)+" "+line.endSiteName);
|
||||
|
||||
//设置item点击事件
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -251,18 +251,18 @@ public class SweepersSwitchLineActivity extends MvpActivity<SweepersSwitchLineVi
|
||||
//选中绑定
|
||||
if (clickPos > -1){
|
||||
if (clickPos == position){
|
||||
holder.selectIv.setImageResource(R.drawable.sweepers_selected_btn);
|
||||
holder.selectIv.setImageResource(R.drawable.sweeper_selected_btn);
|
||||
}else {
|
||||
holder.selectIv.setImageResource(R.drawable.sweepers_unselect_btn);
|
||||
holder.selectIv.setImageResource(R.drawable.sweeper_unselect_btn);
|
||||
}
|
||||
}else {
|
||||
if (line.choose == 1){//1:绑定 2:未绑定 默认绑定
|
||||
if (mItemClickListener != null) {
|
||||
mItemClickListener.onItemClick(position);
|
||||
}
|
||||
holder.selectIv.setImageResource(R.drawable.sweepers_selected_btn);
|
||||
holder.selectIv.setImageResource(R.drawable.sweeper_selected_btn);
|
||||
}else {
|
||||
holder.selectIv.setImageResource(R.drawable.sweepers_unselect_btn);
|
||||
holder.selectIv.setImageResource(R.drawable.sweeper_unselect_btn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mogo.och.sweeper.ui;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.och.sweeper.bean.SweeperQueryLinesResponse;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/2/10
|
||||
*/
|
||||
public interface SweeperSwitchLineView extends IView {
|
||||
|
||||
void onBusLinesChange(SweeperQueryLinesResponse data);
|
||||
void onChangeLineIdSuccess();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.ui;
|
||||
package com.mogo.och.sweeper.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
@@ -7,7 +7,7 @@ import android.widget.ImageView;
|
||||
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweeper.R;
|
||||
import com.mogo.och.common.module.wigets.OCHGradientTextView;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -17,29 +17,29 @@ import org.jetbrains.annotations.Nullable;
|
||||
*
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
public class SweeperTrafficLightView extends IViewTrafficLight {
|
||||
|
||||
private ImageView mLightIconIV;
|
||||
private OCHGradientTextView mLightTimeTV;
|
||||
private int mCurrentLightId;
|
||||
|
||||
public SweepersTrafficLightView(@Nullable Context context) {
|
||||
public SweeperTrafficLightView(@Nullable Context context) {
|
||||
this(context, null, 0);
|
||||
}
|
||||
|
||||
public SweepersTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
|
||||
public SweeperTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public SweepersTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
public SweeperTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.sweepers_traffic_light_view, this, true);
|
||||
mLightIconIV = findViewById(R.id.sweepers_traffic_light_iv);
|
||||
mLightTimeTV = findViewById(R.id.sweepers_traffic_light_time_tv);
|
||||
LayoutInflater.from(context).inflate(R.layout.sweeper_traffic_light_view, this, true);
|
||||
mLightIconIV = findViewById(R.id.sweeper_traffic_light_iv);
|
||||
mLightTimeTV = findViewById(R.id.sweeper_traffic_light_time_tv);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
super.disableWarningTrafficLight();
|
||||
UiThreadHandler.post(() -> {
|
||||
mCurrentLightId = 0;
|
||||
SweepersTrafficLightView.this.setVisibility(GONE);
|
||||
SweeperTrafficLightView.this.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
UiThreadHandler.post(() -> {
|
||||
if (redNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweepers_traffic_light_red_color_up),
|
||||
getResources().getColor(R.color.sweepers_traffic_light_red_color_down)});
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_red_color_up),
|
||||
getResources().getColor(R.color.sweeper_traffic_light_red_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(redNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
@@ -114,8 +114,8 @@ public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
UiThreadHandler.post(() -> {
|
||||
if (greenNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweepers_traffic_light_green_color_up),
|
||||
getResources().getColor(R.color.sweepers_traffic_light_green_color_down)});
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_green_color_up),
|
||||
getResources().getColor(R.color.sweeper_traffic_light_green_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(greenNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
@@ -129,8 +129,8 @@ public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
UiThreadHandler.post(() -> {
|
||||
if (yellowNum > 0) {
|
||||
mLightTimeTV.setVertrial(true);
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweepers_traffic_light_yellow_color_up),
|
||||
getResources().getColor(R.color.sweepers_traffic_light_yellow_color_down)});
|
||||
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_yellow_color_up),
|
||||
getResources().getColor(R.color.sweeper_traffic_light_yellow_color_down)});
|
||||
mLightTimeTV.setText(String.valueOf(yellowNum));
|
||||
} else {
|
||||
mLightTimeTV.setText("");
|
||||
@@ -147,19 +147,19 @@ public class SweepersTrafficLightView extends IViewTrafficLight {
|
||||
UiThreadHandler.post(() -> {
|
||||
switch (lightId) {
|
||||
case 1:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweepers_light_red_nor);
|
||||
SweepersTrafficLightView.this.setVisibility(VISIBLE);
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_red_nor);
|
||||
SweeperTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 2:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweepers_lightyellow_nor);
|
||||
SweepersTrafficLightView.this.setVisibility(VISIBLE);
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweeper_lightyellow_nor);
|
||||
SweeperTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
case 3:
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweepers_light_green_nor);
|
||||
SweepersTrafficLightView.this.setVisibility(VISIBLE);
|
||||
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_green_nor);
|
||||
SweeperTrafficLightView.this.setVisibility(VISIBLE);
|
||||
break;
|
||||
default:
|
||||
SweepersTrafficLightView.this.setVisibility(GONE);
|
||||
SweeperTrafficLightView.this.setVisibility(GONE);
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.sweepers.util;
|
||||
package com.mogo.och.sweeper.util;
|
||||
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@@ -37,7 +37,7 @@ public class BDRouteDataTestUtils {
|
||||
builder.setLongitude(s.getDouble("lon"));
|
||||
list.add(builder.build());
|
||||
}
|
||||
SweepersOrderModel.getInstance().debugUpdateOrderRoute(list);
|
||||
SweeperOrderModel.getInstance().debugUpdateOrderRoute(list);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.util;
|
||||
package com.mogo.och.sweeper.util;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -10,23 +10,23 @@ import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* OCH sweepers埋点工具
|
||||
* OCH sweeper埋点工具
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
public class SweepersAnalyticsManager {
|
||||
public class SweeperAnalyticsManager {
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final SweepersAnalyticsManager INSTANCE = new SweepersAnalyticsManager();
|
||||
private static final SweeperAnalyticsManager INSTANCE = new SweeperAnalyticsManager();
|
||||
}
|
||||
|
||||
public static SweepersAnalyticsManager getInstance() {
|
||||
return SweepersAnalyticsManager.SingletonHolder.INSTANCE;
|
||||
public static SweeperAnalyticsManager getInstance() {
|
||||
return SweeperAnalyticsManager.SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SweepersAnalyticsManager {
|
||||
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_START_RESULT
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_START_RESULT
|
||||
, CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
@@ -51,20 +51,20 @@ public class SweepersAnalyticsManager {
|
||||
public void triggerStartAutopilotEvent(
|
||||
boolean restart, boolean send, String startName, String endName, int lineId) {
|
||||
mStartAutopilotKey = restart ?
|
||||
SweepersConst.EVENT_KEY_RESTART_AUTOPILOT : SweepersConst.EVENT_KEY_START_SERVICE;
|
||||
SweeperConst.EVENT_KEY_RESTART_AUTOPILOT : SweeperConst.EVENT_KEY_START_SERVICE;
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
|
||||
String dateTime = DateTimeUtils.getTimeText(
|
||||
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
|
||||
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_SN, sn);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_ENV_ONLINE,
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_SN, sn);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_ENV_ONLINE,
|
||||
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_TIME, dateTime);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_START_NAME, startName);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_END_NAME, endName);
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_LINE_ID, lineId);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_TIME, dateTime);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_START_NAME, startName);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_END_NAME, endName);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_LINE_ID, lineId);
|
||||
|
||||
if (send) {
|
||||
// 开启成功,上报埋点
|
||||
@@ -72,10 +72,10 @@ public class SweepersAnalyticsManager {
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
mStartAutopilotParams.put(SweepersConst.EVENT_PARAM_START_RESULT, true);
|
||||
mStartAutopilotParams.put(SweeperConst.EVENT_PARAM_START_RESULT, true);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
} else {
|
||||
UiThreadHandler.postDelayed(startAutopilotRunnable, SweepersConst.LOOP_PERIOD_15S);
|
||||
UiThreadHandler.postDelayed(startAutopilotRunnable, SweeperConst.LOOP_PERIOD_15S);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.util;
|
||||
package com.mogo.och.sweeper.util;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -6,10 +6,9 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.sweepers.bean.SweepersRoutesResult;
|
||||
import com.mogo.och.sweepers.constant.SweepersConst;
|
||||
import com.mogo.och.sweepers.model.SweepersOrderModel;
|
||||
import com.mogo.och.sweeper.bean.SweeperRoutesResult;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -25,21 +24,21 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
* Bus轨迹管理:给MEC下发用于轨迹下载的信息
|
||||
* Created on 2022/6/23
|
||||
*/
|
||||
public class SweepersTrajectoryManager {
|
||||
private static final String TAG = SweepersTrajectoryManager.class.getSimpleName();
|
||||
public class SweeperTrajectoryManager {
|
||||
private static final String TAG = SweeperTrajectoryManager.class.getSimpleName();
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final SweepersTrajectoryManager INSTANCE = new SweepersTrajectoryManager();
|
||||
private static final SweeperTrajectoryManager INSTANCE = new SweeperTrajectoryManager();
|
||||
}
|
||||
|
||||
public static SweepersTrajectoryManager getInstance() {
|
||||
return SweepersTrajectoryManager.SingletonHolder.INSTANCE;
|
||||
public static SweeperTrajectoryManager getInstance() {
|
||||
return SweeperTrajectoryManager.SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private AutopilotControlParameters.AutoPilotLine mAutoPilotLine = null;
|
||||
private Disposable mSendReqDisposable = null;
|
||||
|
||||
public SweepersTrajectoryManager() {
|
||||
public SweeperTrajectoryManager() {
|
||||
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(-1,
|
||||
"", "", "", "", 0, "",
|
||||
"", "", "", "", 0);
|
||||
@@ -49,10 +48,10 @@ public class SweepersTrajectoryManager {
|
||||
* 同步Bus路线信息
|
||||
*/
|
||||
public void syncTrajectoryInfo() {
|
||||
SweepersRoutesResult routesResult = SweepersOrderModel.getInstance().getBusRoutesResult();
|
||||
if (SweepersOrderModel.getInstance().isWorking() && routesResult != null
|
||||
&& SweepersOrderModel.getInstance().getCurrentStationIndex() == 0
|
||||
&& !SweepersOrderModel.getInstance().isGoingToNextStation()) {
|
||||
SweeperRoutesResult routesResult = SweeperOrderModel.getInstance().getBusRoutesResult();
|
||||
if (SweeperOrderModel.getInstance().isWorking() && routesResult != null
|
||||
&& SweeperOrderModel.getInstance().getCurrentStationIndex() == 0
|
||||
&& !SweeperOrderModel.getInstance().isGoingToNextStation()) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "syncTrajectoryInfo() start.");
|
||||
startTrajReqLoop();
|
||||
} else {
|
||||
@@ -96,7 +95,7 @@ public class SweepersTrajectoryManager {
|
||||
}
|
||||
|
||||
private void setupAutoPilotLine() {
|
||||
SweepersRoutesResult routesResult = SweepersOrderModel.getInstance().getBusRoutesResult();
|
||||
SweeperRoutesResult routesResult = SweeperOrderModel.getInstance().getBusRoutesResult();
|
||||
if (routesResult == null) {
|
||||
CallerLogger.INSTANCE.e(M_BUS + TAG,
|
||||
"setupAutoPilotLine(): routesResult is null.");
|
||||
@@ -149,13 +148,13 @@ public class SweepersTrajectoryManager {
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "startTrajReqLoop()");
|
||||
setupAutoPilotLine();
|
||||
mSendReqDisposable = Observable.interval(SweepersConst.LOOP_DELAY,
|
||||
SweepersConst.LOOP_PERIOD_10S, TimeUnit.MILLISECONDS)
|
||||
mSendReqDisposable = Observable.interval(SweeperConst.LOOP_DELAY,
|
||||
SweeperConst.LOOP_PERIOD_10S, TimeUnit.MILLISECONDS)
|
||||
.map((aLong -> aLong + 1))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(aLong -> {
|
||||
if (aLong > SweepersConst.LOOP_SEND_TRAJ_TIMES) {
|
||||
if (aLong > SweeperConst.LOOP_SEND_TRAJ_TIMES) {
|
||||
stopTrajReqLoop();
|
||||
return;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.view;
|
||||
package com.mogo.och.sweeper.view;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
@@ -15,7 +15,7 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweeper.R;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2021/3/24 16:20
|
||||
@@ -30,7 +30,7 @@ public class BusArcView extends View {
|
||||
//圆弧颜色
|
||||
private int mArcColor;
|
||||
//圆弧的画笔的宽度
|
||||
private float mStrokeWith = getResources().getDimension(R.dimen.sweepers_ext_arcView_stroke_with);
|
||||
private float mStrokeWith = getResources().getDimension(R.dimen.sweeper_ext_arcView_stroke_with);
|
||||
//文字描述的paint
|
||||
private Paint mTextPaint;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BusArcView extends View {
|
||||
|
||||
mTextPaint.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
|
||||
//绘制中心文字描述
|
||||
mTextPaint.setTextSize(getResources().getDimension(R.dimen.sweepers_ext_arcView_des_text_size));
|
||||
mTextPaint.setTextSize(getResources().getDimension(R.dimen.sweeper_ext_arcView_des_text_size));
|
||||
mTextPaint.getTextBounds(mDes, 0, mDes.length(), mRect);
|
||||
canvas.drawText(mDes, getWidth() / 2, getHeight() * 17 / 20 + mRect.height() / 2, mTextPaint);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class BusArcView extends View {
|
||||
//设置文本的对齐方式
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
//mTextPaint.setTextSize(getResources().getDimensionPixelSize(R.dimen.dp_12));
|
||||
mTextPaint.setTextSize(getResources().getDimension(R.dimen.sweepers_ext_arcView_center_text_size));
|
||||
mTextPaint.setTextSize(getResources().getDimension(R.dimen.sweeper_ext_arcView_center_text_size));
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.view;
|
||||
package com.mogo.och.sweeper.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.view;
|
||||
package com.mogo.och.sweeper.view;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
@@ -21,7 +21,7 @@ import android.view.animation.DecelerateInterpolator;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.och.sweepers.R;
|
||||
import com.mogo.och.sweeper.R;
|
||||
|
||||
/**
|
||||
* 滑块滑动面板
|
||||
@@ -124,7 +124,7 @@ public class SlidePanelView extends View {
|
||||
textPaint.setShader(textGradient);
|
||||
textPaint.getFontMetrics(blockTextMetrics);
|
||||
|
||||
bmBlock = BitmapFactory.decodeResource(getResources(), R.drawable.sweepers_base_slide_block);
|
||||
bmBlock = BitmapFactory.decodeResource(getResources(), R.drawable.sweeper_base_slide_block);
|
||||
blockWidth = bmBlock.getWidth();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.sweepers.view;
|
||||
package com.mogo.och.sweeper.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/sweepers_autopilot_text_color_normal"/>
|
||||
<item android:color="@color/sweeper_autopilot_text_color_normal"/>
|
||||
</selector>
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1004 B After Width: | Height: | Size: 1004 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |