[6.1.0]
[灯态debug、司机屏15分钟提示]
This commit is contained in:
@@ -9,7 +9,6 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.magic.mogo.och.charter.R
|
||||
import com.magic.mogo.och.charter.base.CharterBaseFragment
|
||||
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
|
||||
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVED
|
||||
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVING
|
||||
import com.magic.mogo.och.charter.constant.CharterConst.Companion.LOOP_PERIOD_60S
|
||||
import com.magic.mogo.och.charter.net.login.LoginDriverM1Impl
|
||||
@@ -73,7 +72,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
|
||||
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result){
|
||||
requireActivity().runOnUiThread {
|
||||
isReturn5MTip = false
|
||||
isReturn15MTip = false
|
||||
showOrHideOrderUI(true)
|
||||
|
||||
passenger_phone.text = String.format(resources.getString(R.string.passenger_phone)
|
||||
@@ -105,7 +104,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
if (minutes >= 0){
|
||||
startCountDownTimer(minutes,LOOP_PERIOD_60S)
|
||||
}else{
|
||||
isReturn5MTip = false
|
||||
isReturn15MTip = false
|
||||
clearCountDownTimer()
|
||||
}
|
||||
}
|
||||
@@ -205,7 +204,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
|
||||
fun updateReturnCarStatus(returnSuccess: Boolean) {
|
||||
requireActivity().runOnUiThread {
|
||||
isReturn5MTip = false
|
||||
isReturn15MTip = false
|
||||
group_stations_panel.visibility = GONE
|
||||
no_line_data_view.visibility = VISIBLE
|
||||
no_order_data_tv.text = resources.getString(R.string.bus_no_task_tip)
|
||||
@@ -219,7 +218,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
}
|
||||
|
||||
|
||||
private var isReturn5MTip: Boolean = false
|
||||
private var isReturn15MTip: Boolean = false
|
||||
|
||||
private fun startCountDownTimer(total: Long, countDownInterval:Long){
|
||||
clearCountDownTimer()
|
||||
@@ -231,9 +230,9 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
resources.getString(R.string.count_down_txt)
|
||||
,minute.roundToInt())
|
||||
|
||||
if(minute.roundToInt() == 5 && !isReturn5MTip){//还车提示
|
||||
if(minute.roundToInt() == 15 && !isReturn15MTip){//还车提示
|
||||
mPresenter?.carReturnTip()
|
||||
isReturn5MTip = true
|
||||
isReturn15MTip = true
|
||||
}
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "倒计时分钟 = ${minute.roundToInt()}" )
|
||||
}
|
||||
|
||||
@@ -129,9 +129,9 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
|
||||
DriverM1Model.get().changeDest()
|
||||
}
|
||||
|
||||
fun carReturnTip(){ //提前 5分钟 提醒
|
||||
fun carReturnTip(){ //提前 15分钟 提醒
|
||||
DriverM1Model.get().pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp()
|
||||
,context.getString(R.string.last_5_minutes))
|
||||
,context.getString(R.string.last_15_minutes))
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<string name="count_down_txt">剩余%1$s分钟</string>
|
||||
<string name="during_time_tv">包车时间:%1$s</string>
|
||||
<string name="passenger_phone">乘客信息:%1$s</string>
|
||||
<string name="last_5_minutes">本次行程剩余5分钟,请知晓并通知乘客合理安排游玩时间</string>
|
||||
<string name="last_15_minutes">本次行程剩余15分钟,请知晓并通知乘客合理安排游玩时间</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.och.common.module.debug
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Environment
|
||||
import chassis.Chassis
|
||||
import chassis.Chassis.DoorNumber
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.amap.api.maps.model.LatLng
|
||||
@@ -11,6 +12,7 @@ import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisDoorStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -35,12 +37,13 @@ object DebugDataDispatch {
|
||||
const val locationMock = "location"
|
||||
const val carDoorMock = "carDoor"
|
||||
const val carNeedTurnAround = "trunAroud"
|
||||
const val carLightSwitch = "lightSwitch"
|
||||
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "location" --es path "sy73_log.json"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "globalPath" --es path "sy73.json"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "carDoor" --ei doorPostion 1 --ei doorStatus 1
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "trunAroud" --es code "IMAP_TRA_LOADED"
|
||||
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "lightSwitch" --ei lightPostion 0
|
||||
|
||||
val ROOT_PATH =
|
||||
Environment.getExternalStorageDirectory().absolutePath + File.separator + "MLog" + File.separator + "APPLog" + File.separator //程序外部存储跟目录
|
||||
@@ -83,6 +86,17 @@ object DebugDataDispatch {
|
||||
newBuilder.level = ""
|
||||
CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian(newBuilder.build())
|
||||
}
|
||||
carLightSwitch -> {
|
||||
//0-5
|
||||
// LIGHT_NONE = 0;
|
||||
// LIGHT_LEFT = 1;
|
||||
// LIGHT_RIGHT = 2;
|
||||
// LIGHT_FLASH = 3;
|
||||
// LIGHT_MANUAL = 4;
|
||||
// LIGHT_AUTO = 5;
|
||||
val lightPostion = intent.getIntExtra("lightPostion",0)
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(Chassis.LightSwitch.forNumber(lightPostion))
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user