[charter]

[3.2.0]
[添加日志信息、地图终点和轨迹清理]
This commit is contained in:
yangyakun
2023-05-28 16:48:04 +08:00
parent 51970a440d
commit 7d6c6b9d77
5 changed files with 38 additions and 18 deletions

View File

@@ -235,8 +235,8 @@ object CharterPassengerModel {
}
when (state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
CallerAutoPilotControlManager.getGlobalPath()
cleanRoutePoints()
CallerAutoPilotControlManager.getGlobalPath()
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {}
@@ -263,6 +263,10 @@ object CharterPassengerModel {
)
globalPathResp?.wayPointsList?.let {
if (it.size > 0) {
CallerLogger.d(
M_BUS_P + TAG,
"收到轨迹:${it.size}--第一个点${it[0]}--最后一个点:${it.last()}"
)
updateRoutePoints(it)
startCalculateDistanceLoop()
}
@@ -755,6 +759,7 @@ object CharterPassengerModel {
private fun setOrderStatus(orderStatus: OrderStatusEnum) {
if (this.orderStatus != orderStatus) {
CallerLogger.d(M_BUS_P + TAG,"${this.orderInfo?.orderNo}新的状态:$orderStatus")
this.orderStatus = orderStatus
for (callback in orderStatusChangeListeners.values) {
callback.onStatusChange(this.orderStatus)
@@ -1066,6 +1071,7 @@ object CharterPassengerModel {
return
}
ToastCharterUtils.showShort("启动自动驾驶中")
cleanRoutePoints()
startAutoPilot(parameters)
CallerLogger.d(
SceneConstant.M_BUS + TAG,

View File

@@ -289,16 +289,18 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) :
}
override fun onStatusChange(currentStatus: OrderStatusEnum) {
when (currentStatus) {
OrderStatusEnum.OrderNoLine -> {
mView?.setVisableByTrun(showBiz = true)
extracted()
}
OrderStatusEnum.OrdersWithLine ->{
mView?.setVisableByTrun(showBiz = true)
}
else ->{
mView?.setVisableByTrun(showNorOrder = true)
UiThreadHandler.post {
when (currentStatus) {
OrderStatusEnum.OrderNoLine -> {
mView?.setVisableByTrun(showBiz = true)
extracted()
}
OrderStatusEnum.OrdersWithLine ->{
mView?.setVisableByTrun(showBiz = true)
}
else ->{
mView?.setVisableByTrun(showNorOrder = true)
}
}
}
}

View File

@@ -152,8 +152,10 @@ class BusPassengerPresenter(view: MainFragment?) :
when (currentStatus) {
OrderStatusEnum.Nothing -> {}
OrderStatusEnum.NoOrderUnuse -> {
mView?.closeOpenAndCloseDoor()
clearShowNoviceGuidanceSharedPrefs()
UiThreadHandler.post {
mView?.closeOpenAndCloseDoor()
clearShowNoviceGuidanceSharedPrefs()
}
}
OrderStatusEnum.OrderNoLine -> {
CallerOrderListenerManager.invokeOrderRemoval();
@@ -178,9 +180,10 @@ class BusPassengerPresenter(view: MainFragment?) :
else -> {}
}
UiThreadHandler.post {
mView?.showOpenAndCloseDoor()
mView?.cleanEndStation()
setDistancecAndTime(-1, -1)
UiThreadHandler.post {
mView?.showOpenAndCloseDoor()
setDistancecAndTime(-1, -1)
}
}
}
}

View File

@@ -257,6 +257,9 @@ class MainFragment :
bpFunctionGroup?.let {
bpFunctionGroup.dismissAllowingStateLoss()
}
UiThreadHandler.postDelayed({
cleanEndStation()
},2_000)
}
@Subscribe(threadMode = ThreadMode.MAIN)

View File

@@ -7,6 +7,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.callback.ITimeCallback
import com.mogo.och.bus.passenger.model.CharterPassengerModel
@@ -84,10 +85,15 @@ open class BottomOrderInfoView @JvmOverloads constructor(
val arriveTime = DateTimeUtil.second2Time(timeInSecond)
actv_order_end_time.text = arriveTime
}
setViewByOrderStatus(CharterPassengerModel.getCurrentOrderStatus())
UiThreadHandler.post {
setViewByOrderStatus(CharterPassengerModel.getCurrentOrderStatus())
}
}
override fun onStatusChange(currentStatus: OrderStatusEnum) {
setViewByOrderStatus(currentStatus)
UiThreadHandler.post {
setViewByOrderStatus(currentStatus)
}
}
}