[fix]
[3.2.0] [目的地语言、速度、订单信息]
This commit is contained in:
@@ -6,7 +6,6 @@ import android.net.ConnectivityManager
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener
|
||||
import com.mogo.commons.module.intent.IntentManager
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine
|
||||
@@ -48,8 +47,6 @@ import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.PinYinUtil
|
||||
import com.mogo.och.common.module.voice.VoiceManager
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.tts.base.LangTtsEntity
|
||||
import com.mogo.tts.base.LanguageType
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
@@ -433,12 +430,12 @@ object CharterPassengerModel {
|
||||
coordinateConverterWgsToGcj.latitude
|
||||
)
|
||||
// 小于15m到站
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"小于15米到站1")
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE && calculateLineDistance > 0) {
|
||||
CallerLogger.d(M_BUS_P + TAG,"小于15米到站1")
|
||||
arriveDest()
|
||||
}
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_SOON_AT_START_STATION_DISTANCE) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"小于100米到站")
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_SOON_AT_START_STATION_DISTANCE && calculateLineDistance > 0) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "小于100米到站")
|
||||
arriveDestSoon()
|
||||
}
|
||||
}
|
||||
@@ -675,6 +672,8 @@ object CharterPassengerModel {
|
||||
mogoLocation.latitude
|
||||
)
|
||||
if(lastSumLength>100) {
|
||||
ToastUtils.showLong("缺少轨迹数据")
|
||||
if (mRoutePoints.size == 0) return
|
||||
// 计算距离
|
||||
lastSumLength =
|
||||
CoordinateCalculateRouteUtil.calculateRouteSumLength(
|
||||
@@ -690,11 +689,11 @@ object CharterPassengerModel {
|
||||
"---lastSumLength: " + lastSumLength + "----lastTime : " + lastTime
|
||||
+ " thread = " + Thread.currentThread().name
|
||||
)
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_SOON_AT_START_STATION_DISTANCE) {
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_SOON_AT_START_STATION_DISTANCE&&lastSumLength>0) {
|
||||
CallerLogger.d(M_BUS_P + TAG,"小于100米到站2")
|
||||
arriveDestSoon()
|
||||
}
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE&&lastSumLength>0) {
|
||||
CallerLogger.d(M_BUS_P + TAG,"小于15米到站2")
|
||||
arriveDest()
|
||||
return
|
||||
@@ -918,8 +917,8 @@ object CharterPassengerModel {
|
||||
order.siteId?.let { siteId ->
|
||||
if (order.arriveStatus == OrderInfoResponse.ARRIVING) {
|
||||
if (broadcastList["${siteId}$ending100Key"] == null || broadcastList["${siteId}$ending100Key"] == false) {
|
||||
val string = mContext.getString(com.mogo.och.common.module.R.string.arrived_station_zh)
|
||||
VoiceNotice.showNotice(string,)
|
||||
val string = mContext.getString(R.string.arrived_station_left_100)
|
||||
VoiceNotice.showNotice(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
|
||||
class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
|
||||
@@ -15,4 +16,8 @@ class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
super.onDestroy(owner)
|
||||
}
|
||||
|
||||
fun haveOrder(): Boolean {
|
||||
return CharterPassengerModel.hasOrder()
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
@@ -23,6 +24,7 @@ import com.mogo.och.bus.passenger.bean.response.LineInfoResponse
|
||||
import com.mogo.och.bus.passenger.bean.response.OrderInfoResponse
|
||||
import com.mogo.och.bus.passenger.bean.response.SiteInfoResponse
|
||||
import com.mogo.och.bus.passenger.bean.response.TrajectoriesResponse
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerControllerStatusCallback
|
||||
import com.mogo.och.bus.passenger.callback.IDistanceCallback
|
||||
import com.mogo.och.bus.passenger.callback.IOrderChangeCallback
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
@@ -46,7 +48,7 @@ import kotlin.math.ceil
|
||||
class BusPassengerPresenter(view: MainFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<MainFragment?>(view),
|
||||
IDistanceCallback, IOrderChangeCallback, IOrderStatusChangeListener,
|
||||
OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback, LightAirconditionDoorCallback {
|
||||
OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback, LightAirconditionDoorCallback, IBusPassengerControllerStatusCallback {
|
||||
|
||||
private val lindIdAndView = ConcurrentHashMap<Long, MakerWithSiteNamewithCheck?>()
|
||||
|
||||
@@ -60,6 +62,7 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
CharterPassengerModel.init()
|
||||
// 定位监听
|
||||
CharterPassengerModel.setStationDistanceListener(TAG, this)
|
||||
CharterPassengerModel.setControllerStatusCallback(TAG,this)
|
||||
CharterPassengerModel.setCarTypeChangeListener(this)
|
||||
CharterPassengerModel.setStatusChangeListener(TAG, this)
|
||||
CallerTelematicListenerManager.addListener(TAG, DriverMessage)
|
||||
@@ -76,6 +79,12 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
OCHPlanningStopSideStatusManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onCarLocationChanged(location: MogoLocation?) {
|
||||
location?.let {
|
||||
setSpeed(it.gnssSpeed)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setSpeed(speed: Float) {
|
||||
UiThreadHandler.post {
|
||||
val speedKM = (Math.abs(speed) * 3.6f).toInt()
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
@@ -23,6 +24,7 @@ import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1VideoFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import kotlinx.android.synthetic.main.m1_contain_fragment.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
@@ -130,6 +132,18 @@ class M1ContainFragment :
|
||||
}
|
||||
}
|
||||
bb_bottom_bar.setOrderInfoClickListener{
|
||||
if (LoginStatusManager.isLogin()) {
|
||||
if(mPresenter?.haveOrder()==true){
|
||||
|
||||
}else{
|
||||
ToastUtils.showShort("请确认订单")
|
||||
return@setOrderInfoClickListener
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver))
|
||||
return@setOrderInfoClickListener
|
||||
}
|
||||
|
||||
CallerLogger.d(M_BUS_P+ TAG, "initViews---$tab")
|
||||
if(tab==ORDERINFO) {
|
||||
dismissAllowingStateLoss()
|
||||
|
||||
@@ -47,6 +47,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
private var mHits = LongArray(COUNTS)
|
||||
|
||||
private var preStatus = -1
|
||||
|
||||
private fun continuousClick(type:String) {
|
||||
//每次点击时,数组向前移动一位
|
||||
System.arraycopy(mHits, 1, mHits, 0, mHits.size - 1)
|
||||
@@ -96,6 +98,10 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun setAutoPilotSatusInfo(state: Int) {
|
||||
if(preStatus==state){
|
||||
return
|
||||
}
|
||||
preStatus = state
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {
|
||||
actv_auto_status.text = "安全接管中"
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:inputType="numberPassword"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:imeOptions="actionDone"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/charter_p_debugview_edit_bg"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<string name="m1_close_door_and_startauto">先关闭车门再启动吧~</string>
|
||||
<string name="m1_start_auto_fail">自驾系统繁忙,稍后再试试吧~</string>
|
||||
|
||||
<string name="arrived_station_left_100">%1$s站就要到啦!</string>
|
||||
<!-- <string name="m1_novice_guidance_tts">正在为您靠边停车,扶稳坐好哟</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">靠边停车成功</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆系统繁忙,请稍后再试</string>-->
|
||||
|
||||
Reference in New Issue
Block a user