Merge remote-tracking branch 'origin/dev_robobus-d_230322_3.0.0' into dev_robobus-d_230322_3.0.0
This commit is contained in:
@@ -9,5 +9,6 @@ import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
|
||||
interface DriverM1OrderCallback {
|
||||
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result) // 到达站
|
||||
fun updateOverCountDown(minutes: Long) //倒计时ms
|
||||
fun clearCountDown() //清除倒计时
|
||||
fun updateReturnCarStatus(returnSuccess: Boolean)
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun clearCountDownTimer() {
|
||||
fun clearCountDownTimer() {
|
||||
if (countDownTimer != null){
|
||||
countDownTimer?.cancel()
|
||||
countDownTimer = null
|
||||
|
||||
@@ -517,6 +517,7 @@ class DriverM1Model {
|
||||
DriverM1LooperManager.starCountDownLoop()
|
||||
}else{
|
||||
DriverM1LooperManager.stopCountDownLoop()
|
||||
mOrderCallback?.clearCountDown()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
|
||||
mView?.updateCountDown(minutes)
|
||||
}
|
||||
|
||||
override fun clearCountDown() {
|
||||
mView?.clearCountDownTimer()
|
||||
}
|
||||
|
||||
override fun updateReturnCarStatus(returnSuccess: Boolean) {
|
||||
mView?.updateReturnCarStatus(returnSuccess)
|
||||
}
|
||||
|
||||
@@ -37,16 +37,13 @@ object OchCommonLoginStatusDefaultModel : OchCommonLoginStatusModel() {
|
||||
}
|
||||
loginCallback?.loginSuccess(data)
|
||||
|
||||
updateLoginLocalStatus(isLogin())
|
||||
data?.data?.driverStatus?.let { updateLoginLocalStatus(it) }
|
||||
|
||||
}
|
||||
|
||||
private fun updateLoginLocalStatus(isLogin: Boolean) {
|
||||
var loginCacheStatus = LoginCacheStatus(if (isLogin){
|
||||
1
|
||||
}else {
|
||||
0
|
||||
},DateTimeUtil.getCurrentTimeStamp())
|
||||
private fun updateLoginLocalStatus(loginStatus: Int = 0) {
|
||||
var loginCacheStatus = LoginCacheStatus(loginStatus,DateTimeUtil.getCurrentTimeStamp())
|
||||
|
||||
CacheDataManager.instance.putCacheData(mContext, BusCacheKey.BUS_LOGIN_STATUS_CACHE,
|
||||
GsonUtils.toJson(loginCacheStatus))
|
||||
}
|
||||
@@ -60,7 +57,7 @@ object OchCommonLoginStatusDefaultModel : OchCommonLoginStatusModel() {
|
||||
}
|
||||
loginCallback?.loginFail(isLogin)
|
||||
|
||||
updateLoginLocalStatus(isLogin)
|
||||
updateLoginLocalStatus(0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.data.bean;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
@@ -93,6 +95,28 @@ public class BusStationBean {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BusStationBean that = (BusStationBean) o;
|
||||
return siteId == that.siteId
|
||||
&& seq == that.seq
|
||||
&& Double.compare(that.gcjLon, gcjLon) == 0
|
||||
&& Double.compare(that.gcjLat, gcjLat) == 0
|
||||
&& Double.compare(that.lon, lon) == 0
|
||||
&& Double.compare(that.lat, lat) == 0
|
||||
&& drivingStatus == that.drivingStatus
|
||||
&& leaving == that.leaving
|
||||
&& name.equals(that.name)
|
||||
&& nameKr.equals(that.nameKr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(siteId, name, nameKr, seq, gcjLon, gcjLat, lon, lat, drivingStatus, leaving);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusStationBean{" +
|
||||
@@ -107,4 +131,6 @@ public class BusStationBean {
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ public class BusPassengerModel {
|
||||
clearLocalRouteResult();
|
||||
return;
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = update");
|
||||
routesResult = result;
|
||||
|
||||
if (mRouteLineInfoCallback != null){
|
||||
@@ -578,6 +578,7 @@ public class BusPassengerModel {
|
||||
public void dynamicCalculateRouteInfo() {
|
||||
//计算当前位置和下一站的剩余点集合
|
||||
//计算剩余点总里程和时间
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==mTwoStationsRouts.size() = " + mTwoStationsRouts.size());
|
||||
if (mTwoStationsRouts.size() == 0){
|
||||
calculateTwoStationsRoute();
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ class PM2DrivingModel private constructor() {
|
||||
updateLocalOrder()
|
||||
return
|
||||
}
|
||||
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update")
|
||||
routesResult = result
|
||||
|
||||
mDrivingInfoCallback?.updateLine(result.name, result.runningDur)
|
||||
@@ -445,6 +445,7 @@ class PM2DrivingModel private constructor() {
|
||||
mNextStationIndex = i + 1
|
||||
return
|
||||
} else if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !station.isLeaving) {
|
||||
d(SceneConstant.M_BUS_P+TAG,"och-rotting--arrived ")
|
||||
mPreRouteIndex = 0
|
||||
isGoingToNextStation = false
|
||||
startOrStopCalculateRouteInfo(false)
|
||||
@@ -484,7 +485,7 @@ class PM2DrivingModel private constructor() {
|
||||
fun dynamicCalculateRouteInfo(){
|
||||
//计算当前位置和下一站的剩余点集合
|
||||
//计算剩余点总里程和时间
|
||||
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==mTwoStationsRouts.size() = " + mTwoStationsRouts.size)
|
||||
//计算当前位置和下一站的剩余点集合
|
||||
//计算剩余点总里程和时间
|
||||
if (mTwoStationsRouts.size == 0) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<string name="m2_over_map_style_path">m2_map_style.data</string>
|
||||
<string name="m2_over_map_style_extra_path">m2_map_style_extra.data</string>
|
||||
<string name="m2_p_auto_tv">Auto</string>
|
||||
<string name="m2_p_auto_tv">AUTO</string>
|
||||
<string name="m2_p_station_title_tv">下一站:</string>
|
||||
<string name="m2_p_station_title_arrived_tv">已到站</string>
|
||||
<string name="m2_p_empty_tv">暂无站点</string>
|
||||
|
||||
@@ -79,7 +79,6 @@ import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
import com.mogo.och.common.module.bean.dpmsg.BusCacheKey;
|
||||
import com.mogo.och.data.bean.BusTransferData;
|
||||
import com.mogo.och.data.manager.cache.CacheDataManager;
|
||||
import com.zhidao.socket.utils.LoginStatusUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -829,6 +828,7 @@ public class OrderModel {
|
||||
|
||||
private void pushCacheTransferData(BusRoutesResult result) {
|
||||
BusTransferData data = new BusTransferData(LoginStatusManager.isLogin() ? 1:0,result);
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "pushCacheTransferData = " + GsonUtils.toJson(data));
|
||||
CacheDataManager.Companion.getInstance().putCacheData(mContext,
|
||||
BusCacheKey.BUS_LINE_CACHE,
|
||||
GsonUtils.toJson(data));
|
||||
|
||||
@@ -207,13 +207,13 @@ class DispatchAutoPilotManager private constructor() :
|
||||
|
||||
fun affirm() {
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
receiverBean?.taskId?.let {
|
||||
receiverBean?.taskId?.let { it ->
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it,
|
||||
onSuccess = {
|
||||
//调用工控机开启自动驾驶
|
||||
startAutoPilot()
|
||||
},onError = {
|
||||
|
||||
},onError = { error->
|
||||
ToastUtils.showShort("上报调度失败${error}")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -351,7 +351,9 @@ class DispatchAutoPilotManager private constructor() :
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_STEER,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_GEAR_SWITCH,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_NO_RESPONSE,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_UNKNOWN->{
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_UNKNOWN,
|
||||
"IRECORDER_TASK_AUTO"//自动录包任务创建
|
||||
->{
|
||||
//如果到达终点,则不处理
|
||||
if(isArriveEnd){
|
||||
return
|
||||
|
||||
@@ -101,10 +101,14 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
override fun onUpdate(inputContent: String?) {
|
||||
if (inputContent != null) {
|
||||
try {
|
||||
speedLimit = inputContent.toInt()
|
||||
if(speedLimit>60){
|
||||
speedLimit = 60
|
||||
ToastUtils.showShort("最大限速60")
|
||||
if(inputContent.isEmpty()){
|
||||
speedLimit = 0
|
||||
}else{
|
||||
speedLimit = inputContent.toInt()
|
||||
if(speedLimit>60){
|
||||
speedLimit = 60
|
||||
ToastUtils.showShort("最大限速60")
|
||||
}
|
||||
}
|
||||
}catch (t: Exception){
|
||||
ToastUtils.showShort("最大限速60")
|
||||
@@ -112,6 +116,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,15 @@ class TakeOverView @JvmOverloads constructor(
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
visibility = View.VISIBLE
|
||||
//加入消息盒子
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X, V2XMsg(
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiTypeStrVr, ""
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
@@ -76,16 +85,6 @@ class TakeOverView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
)
|
||||
//加入消息盒子
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X, V2XMsg(
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiTypeStrVr, ""
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_393"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#CCFFFFFF"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_393"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#CCFFFFFF"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_393"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#CCFFFFFF"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rvMBoxBubbleList"
|
||||
android:layout_width="@dimen/dp_393"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user