Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230926_6.1.0
This commit is contained in:
@@ -561,7 +561,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
smallMapView.setVisibility(View.GONE);
|
||||
} else {
|
||||
mCloseNaviIcon.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.INVISIBLE);
|
||||
smallMapView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
@@ -605,7 +605,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
} else {
|
||||
closeRouteViewIFHadeAdd();
|
||||
mCloseNaviIcon.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.INVISIBLE);
|
||||
smallMapView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +493,9 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
}
|
||||
|
||||
private fun updateOrderUI(order: OrderDetail) {
|
||||
cancelOrder.visibility = View.VISIBLE
|
||||
cancelOrder.visibility = if (order.orderStatus
|
||||
== TaxiOrderStatusEnum.ArriveAtEnd.code
|
||||
) View.GONE else View.VISIBLE
|
||||
orderPhoneAndNum.visibility = View.VISIBLE
|
||||
taskClickBtn.visibility = View.VISIBLE
|
||||
taskTypeTv.visibility = View.VISIBLE
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.data.OCHOperationalMessage
|
||||
@@ -119,7 +118,7 @@ object TaxiTaskModel {
|
||||
|
||||
private var mPrepareTaskDelayRunnable: Runnable? = null
|
||||
|
||||
private var mIsArrivedSiteTag = false //到站标志位,防止围栏触发多次调用到站接口
|
||||
private var mIsArrivedSiteStartTag = false //到站接口请求标志位,防止围栏触发多次调用到站接口, true 接口请求, false : 接口请求完成
|
||||
|
||||
fun addTaskWithOrderListener(tag: String, listener: ITaxiTaskWithOrderCallback) {
|
||||
if (mTaxiTaskWithOrderCallbackMap.containsKey(tag)) {
|
||||
@@ -557,12 +556,12 @@ object TaxiTaskModel {
|
||||
siteId: Long, isArriveAtEndSite: Boolean,
|
||||
isArrivedNearestStation: Boolean = false
|
||||
) {
|
||||
if (mIsArrivedSiteTag) {
|
||||
if (mIsArrivedSiteStartTag) {
|
||||
DebugView.printInfoMsg("arriveSite接口正在调用中")
|
||||
i(TAG, message = "arriveSite接口正在调用中 mIsArrivedSite = $mIsArrivedSiteTag")
|
||||
i(TAG, message = "arriveSite接口正在调用中 mIsArrivedSite = $mIsArrivedSiteStartTag")
|
||||
return
|
||||
}
|
||||
mIsArrivedSiteTag = true
|
||||
mIsArrivedSiteStartTag = true
|
||||
DebugView.printInfoMsg("[上报ArriveSite] siteId=$siteId, isArriveAtEndSite=$isArriveAtEndSite")
|
||||
i(TAG, message = "submitArriveSite: siteId=$siteId isArriveAtEndSite=$isArriveAtEndSite")
|
||||
TaxiTaskWithOrderServiceManager.arriveSite(
|
||||
@@ -570,8 +569,10 @@ object TaxiTaskModel {
|
||||
siteId,
|
||||
object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
mIsArrivedSiteTag = false
|
||||
if (data == null || data.code != 0) return
|
||||
if (data == null || data.code != 0) {
|
||||
mIsArrivedSiteStartTag = false
|
||||
return
|
||||
}
|
||||
DebugView.printInfoMsg("[上报ArriveSite] success siteId=$siteId, isArriveAtEndSite=$isArriveAtEndSite")
|
||||
d(TAG, "submitArriveSite-onSuccess data=" + GsonUtil.jsonFromObject(data))
|
||||
mDriveToNearestStationTask = null
|
||||
@@ -587,7 +588,7 @@ object TaxiTaskModel {
|
||||
|
||||
override fun onError() {
|
||||
super.onError()
|
||||
mIsArrivedSiteTag = false
|
||||
mIsArrivedSiteStartTag = false
|
||||
if (!NetworkUtils.isConnected(mContext)) { // 网络异常,接口重试
|
||||
ToastUtils.showShort("网络出现异常,请稍后重试")
|
||||
DebugView.printErrorMsg("[上报ArriveSite] 网络出现异常,请稍后重试")
|
||||
@@ -598,7 +599,7 @@ object TaxiTaskModel {
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
mIsArrivedSiteTag = false
|
||||
mIsArrivedSiteStartTag = false
|
||||
DebugView.printErrorMsg("[上报ArriveSite] failed, code=$code, msg=$msg")
|
||||
d(TAG, "code=$code msg=$msg")
|
||||
ToastUtils.showShort("到站接口请求出现异常,请稍后重试,code=$code msg=$msg")
|
||||
@@ -718,6 +719,7 @@ object TaxiTaskModel {
|
||||
//注意: 需要去除到达乘客上车点的节点, 这个节点不拉取任务
|
||||
if (result.currentStatus == TaskStatusEnum.CompleteTask.code
|
||||
) {
|
||||
mIsArrivedSiteStartTag = false //任务完成说明到站, 更新到站标识位, 不再到站接口请求成功更新
|
||||
mADASStatusCallback?.updateAutopilotStatus()
|
||||
mTaxiTaskWithOrderCallbackMap.forEach {
|
||||
val listener = it.value
|
||||
@@ -728,6 +730,7 @@ object TaxiTaskModel {
|
||||
//达到终点后查询全程里程和用时
|
||||
if (QueryCurrentTaskRespBean.isOrderArriveAtEnd(result)) {
|
||||
d(TAG, "queryCurrentTaskOnce ArriveAtEnd")
|
||||
mIsArrivedSiteStartTag = false
|
||||
mTaxiTaskWithOrderCallbackMap.forEach {
|
||||
val listener = it.value
|
||||
listener.onOrderArriveAtEnd(result.order!!.orderNo)
|
||||
|
||||
@@ -66,6 +66,11 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//obu数据
|
||||
@Volatile
|
||||
private var hasObuLightStatus: Boolean = false
|
||||
|
||||
//是否有自车感知红绿灯数据
|
||||
@Volatile
|
||||
private var hasAutopilotPerception: Boolean = false
|
||||
|
||||
//红绿灯定时器,超时未更新隐藏红绿灯
|
||||
@Volatile
|
||||
private var lightCountDownTimer: CountDownTimer? = null
|
||||
@@ -90,7 +95,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
)
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasAiLightStatus) {
|
||||
trafficLights?.let { it ->
|
||||
trafficLights?.let {
|
||||
var light: TrafficLight? = null
|
||||
if (it.hasStraight()) {
|
||||
light = it.straight
|
||||
@@ -106,9 +111,13 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"onAutopilotPerceptionTrafficLight light = $light "
|
||||
)
|
||||
if (light == null) {
|
||||
hasAutopilotPerception = false
|
||||
//隐藏红绿灯显示
|
||||
hide("感知light为null隐藏", DataSourceType.TELEMATIC)
|
||||
} else {
|
||||
if(!hasAutopilotPerception){
|
||||
hasAutopilotPerception = true
|
||||
}
|
||||
onTrafficLightPlusSource(light.convert(), 0, DataSourceType.TELEMATIC)
|
||||
}
|
||||
}
|
||||
@@ -127,7 +136,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
)
|
||||
}
|
||||
if (!hasObuLightStatus) {
|
||||
hasAiLightStatus = true
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onTrafficLightStatus trafficLightResult = $trafficLightResult "
|
||||
@@ -156,7 +164,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
if (!hasObuLightStatus) {
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,15 +173,15 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
* 红绿灯接口请求失败
|
||||
*/
|
||||
override fun onTrafficRequestError() {
|
||||
hasAiLightStatus = false
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onTrafficRequestError hasObuLightStatus = $hasObuLightStatus ------> "
|
||||
)
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
if (!hasObuLightStatus) {
|
||||
hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD)
|
||||
}
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(hasAiLightStatus)
|
||||
hasAiLightStatus = false
|
||||
// if (!hasObuLightStatus) {
|
||||
// hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD)
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,14 +194,14 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否重置红绿灯数据,需要确保,在obu的红绿灯显示的时候,不执行。否则会闪屏
|
||||
* 是否重置红绿灯数据,需要确保,在obu的红绿灯显示或自车感知红绿灯显示的时候,不执行。否则会闪屏
|
||||
*/
|
||||
override fun resetTrafficLight(isReset: Boolean) {
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"resetTrafficLight ------> isReset = $isReset ---hasObuLightStatus = $hasObuLightStatus"
|
||||
)
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasObuLightStatus && !hasAutopilotPerception) {
|
||||
if (isReset) {
|
||||
hide("云端重置红绿灯数据", DataSourceType.AICLOUD)
|
||||
}
|
||||
@@ -228,6 +236,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
super.onTrafficLightPlusSource(light, remain, lightSource)
|
||||
if (lightSource == DataSourceType.OBU) {
|
||||
hasObuLightStatus = true
|
||||
hasAutopilotPerception = false
|
||||
}
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
@@ -293,6 +302,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"updateTrafficLight ----- currentTrafficLight = $currentTrafficLight"
|
||||
)
|
||||
currentTrafficLight?.let {
|
||||
hasAiLightStatus = true
|
||||
hasAutopilotPerception = false
|
||||
val remain = if (it.time() > 99) {
|
||||
99
|
||||
} else {
|
||||
|
||||
@@ -99,6 +99,10 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
ToastUtils.showShort("请求已取消!")
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
AD_REQUESTING -> {
|
||||
Log.d(TAG, "Click-自动驾驶正在请求平行驾驶")
|
||||
ToastUtils.showShort("自动驾驶正在请求平行驾驶")
|
||||
}
|
||||
UNAVAILABLE -> {
|
||||
Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求")
|
||||
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
|
||||
@@ -251,7 +255,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
AD_REQUESTING -> {
|
||||
stopSyncAnimation()
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.isEnabled = true
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
|
||||
@@ -290,18 +290,6 @@
|
||||
android:textOn="关闭obu预警融合"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCronet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启QUIC协议(网络信号差时)"
|
||||
android:textOn="关闭QUIC协议"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<!-- APP升级数据 start -->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbAppUpgrade"
|
||||
@@ -2365,6 +2353,17 @@
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCronet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启QUIC协议(服务器暂不支持)"
|
||||
android:textOn="关闭QUIC协议"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
Reference in New Issue
Block a user