[m1]
[1.1.2] [靠边停车后启动自驾需要重置靠边停车状态、确认线路和站点后弹出车控tab、添加靠边停车日志]
This commit is contained in:
@@ -652,7 +652,7 @@ object CharterPassengerModel {
|
||||
var first = -1
|
||||
if (distanceMap.size >= 2) {
|
||||
for (mutableEntry in distanceMap) {
|
||||
if (first > 0) {
|
||||
if (first >= 0) {
|
||||
// <可用站点标,是否靠近>
|
||||
var max = Math.max(first, mutableEntry.value)//正常点位
|
||||
if(max==data.size-1){// 车辆在终点和起点中间时
|
||||
@@ -664,7 +664,7 @@ object CharterPassengerModel {
|
||||
}
|
||||
}
|
||||
|
||||
return Pair(-1, false)
|
||||
return Pair(0, false)
|
||||
}
|
||||
|
||||
fun endOrder(callback: OchCommonServiceCallback<BaseData>?) {
|
||||
|
||||
@@ -122,6 +122,7 @@ class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
|
||||
ToastUtils.showShort("启动自动驾驶中")
|
||||
CallerAutoPilotControlManager.sendPlanningCmd(2)
|
||||
CharterPassengerModel.startAutopilot()
|
||||
CharterPassengerModel.leaveStation()
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.och.bus.passenger.presenter
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.ui.M1ContainFragment
|
||||
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
@@ -29,25 +30,27 @@ class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
|
||||
stopSideStatus: Boolean?,
|
||||
errorInfo: String?
|
||||
) {
|
||||
when (actionStatus) {
|
||||
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
|
||||
ToastUtils.showShort(errorInfo)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.START -> {
|
||||
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.DOING -> {
|
||||
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.Ending -> {
|
||||
stopSideStatus?.let {
|
||||
if(it){
|
||||
ToastUtils.showShort("靠边停车成功")
|
||||
}else{
|
||||
ToastUtils.showShort("靠边停车失败")
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
when (actionStatus) {
|
||||
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
|
||||
ToastUtils.showShort(errorInfo)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.START -> {
|
||||
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.DOING -> {
|
||||
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.Ending -> {
|
||||
stopSideStatus?.let {
|
||||
if(it){
|
||||
ToastUtils.showShort("靠边停车成功")
|
||||
}else{
|
||||
ToastUtils.showShort("靠边停车失败")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,11 @@ class M1ContainFragment :
|
||||
SETTINGORDERTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1OrderFragment.TAG)
|
||||
?: M1OrderFragment.newInstance()
|
||||
?: M1OrderFragment.newInstance(object :ChangeCheck{
|
||||
override fun changeChange() {
|
||||
cb_bp_setting_soft.isChecked = true
|
||||
}
|
||||
})
|
||||
}
|
||||
SETTINGENDORDERTAB -> {
|
||||
fragment =
|
||||
@@ -278,4 +282,7 @@ class M1ContainFragment :
|
||||
interface ContainDismiss{
|
||||
fun closeDialog()
|
||||
}
|
||||
interface ChangeCheck{
|
||||
fun changeChange()
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ import kotlinx.android.synthetic.m1.m1_order_fragment.*
|
||||
class M1OrderFragment :
|
||||
MvpFragment<M1OrderFragment?, BusPassengerFunctionOrderPresenter?>() {
|
||||
|
||||
private var changeCheck: M1ContainFragment.ChangeCheck?=null
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.m1_order_fragment
|
||||
}
|
||||
@@ -25,7 +27,7 @@ class M1OrderFragment :
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
|
||||
lsv_line_site.setchangeCheck(this.changeCheck)
|
||||
}
|
||||
|
||||
fun setViewByOrderStatus(currentStatus: OrderStatusEnum){
|
||||
@@ -59,10 +61,11 @@ class M1OrderFragment :
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionOrderFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): M1OrderFragment {
|
||||
fun newInstance(changeCheck: M1ContainFragment.ChangeCheck): M1OrderFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1OrderFragment()
|
||||
fragment.arguments = args
|
||||
fragment.changeCheck = changeCheck
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ class MainFragment :
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
setCarModle(R.raw.aiqinghao)
|
||||
cb_bp_video_player.onClick {
|
||||
openSettingPage(M1ContainFragment.VIDEOTAB)
|
||||
}
|
||||
@@ -155,9 +156,9 @@ class MainFragment :
|
||||
tv_distance_arrive_time.text = arrivedTime
|
||||
}
|
||||
|
||||
fun setCarModle(int: Int){
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.aiqinghao)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.aiqinghao
|
||||
fun setCarModle(rawInfo: Int){
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(rawInfo)
|
||||
HdMapBuildConfig.currentCarVrIconRes = rawInfo
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerPresenter {
|
||||
|
||||
@@ -51,7 +51,7 @@ class OrderSiteItemAdapter(private val context: Context, private val dataList: M
|
||||
|
||||
override fun onBindViewHolder(holder: TextVH, position: Int) {
|
||||
val siteInfo = dataList[holder.bindingAdapterPosition]
|
||||
if(holder.bindingAdapterPosition>=enableIndex){
|
||||
if(holder.bindingAdapterPosition>enableIndex){
|
||||
if(siteInfo.isCheck){
|
||||
holder.iv_site_checked.setImageResource(R.drawable.m1_order_site_checked)
|
||||
}else{
|
||||
@@ -75,11 +75,11 @@ class OrderSiteItemAdapter(private val context: Context, private val dataList: M
|
||||
if (siteInfo.isNear) {
|
||||
ToastUtils.showShort("您已在此站点附近")
|
||||
} else {
|
||||
ToastUtils.showShort("请选择返程路线")
|
||||
ToastUtils.showShort("站点已过,请选择返程路线")
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请切换线路")
|
||||
ToastUtils.showShort("请确认线路")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerModelLoopManager
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerServiceManager
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionDevicePresenter
|
||||
import com.mogo.och.bus.passenger.ui.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderLineItemAdapter
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderSiteItemAdapter
|
||||
import com.mogo.och.bus.passenger.view.BottomDecoration
|
||||
@@ -76,7 +77,7 @@ class LineSiteView @JvmOverloads constructor(
|
||||
interpolator = LinearInterpolator()
|
||||
duration = 1000
|
||||
}
|
||||
|
||||
private var changeCheck: M1ContainFragment.ChangeCheck?=null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_order_lineside, this, true)
|
||||
@@ -300,6 +301,7 @@ class LineSiteView @JvmOverloads constructor(
|
||||
checkLine?.let {
|
||||
lineAdapter.submitLine(it)
|
||||
}
|
||||
go2StartCar()
|
||||
} else {
|
||||
ToastUtils.showShort("司机端拒绝请重新选择")
|
||||
}
|
||||
@@ -312,6 +314,14 @@ class LineSiteView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun go2StartCar() {
|
||||
changeCheck?.changeChange()
|
||||
}
|
||||
|
||||
fun setchangeCheck(changeCheck: M1ContainFragment.ChangeCheck?){
|
||||
this.changeCheck = changeCheck
|
||||
}
|
||||
|
||||
private fun startAni() {
|
||||
g_lines_sites_data.visibility = View.GONE
|
||||
g_loading_group.visibility = View.VISIBLE
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_line_title"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_line_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="31dp"
|
||||
android:paddingEnd="@dimen/dp_31"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.och.common.module.manager
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@@ -56,6 +58,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
when (drivingAction) {
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
|
||||
// 表示开始靠边停车
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"开始靠边停车")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -65,6 +68,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
}
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
|
||||
//表示靠边停车成功
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车成功")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -73,6 +77,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
}
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
|
||||
//靠边停车失败
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -86,6 +91,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
when (drivingAction) {
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
|
||||
// 表示距离前方站点100m
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因:距离前方站点100m")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -94,6 +100,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
}
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
|
||||
//表示距离路口100m
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因:距离路口100m")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -102,6 +109,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
}
|
||||
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
|
||||
//正在变道
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因:正在变道")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
@@ -110,6 +118,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
|
||||
}
|
||||
else -> {
|
||||
//未知问题
|
||||
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因:未知问题")
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
|
||||
Reference in New Issue
Block a user