[8.2.8][i18n] 所有吐司 中文抽取
This commit is contained in:
@@ -452,7 +452,8 @@ class DriverM1Model {
|
||||
&& TextUtils.isEmpty(it.csvFileUrl)
|
||||
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
CallerLogger.e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.magic.mogo.och.charter.view.autopilot
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.magic.mogo.och.charter.R
|
||||
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVED
|
||||
import com.magic.mogo.och.charter.callback.IDriverM1ControllerStatusCallback
|
||||
import com.magic.mogo.och.charter.constant.CharterConst
|
||||
@@ -54,7 +55,8 @@ class AutopilotStatusViewModel: ViewModel(), IDriverM1ControllerStatusCallback,
|
||||
fun restartAutopilot() {
|
||||
// todo 启动自驾必须有订单路线
|
||||
if(isAnimateRunning.get()){
|
||||
ToastUtils.showShort("启动自驾中")
|
||||
// ToastUtils.showShort("启动自驾中")
|
||||
ToastUtils.showShort(R.string.module_och_autopilot_starting)
|
||||
}else {
|
||||
if (DriverM1Model.get().isHaveOrder()) {
|
||||
DriverM1Model.get().restartAutopilot()
|
||||
|
||||
@@ -209,7 +209,8 @@ object CharterPassengerModel {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
guardianInfo?.let {
|
||||
if (it.code=="EMAP_ATTITUDE_INIT_FAILED") {
|
||||
ToastCharterUtils.showToastShort("请等待车辆完成掉头后再出发吧~")
|
||||
// ToastCharterUtils.showToastShort("请等待车辆完成掉头后再出发吧~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_emap_attitude_init_failed)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1122,7 +1123,8 @@ object CharterPassengerModel {
|
||||
fun startAutopilot() {
|
||||
orderInfo?.let {
|
||||
if (it.arriveStatus == OrderInfoResponse.ARRIVED) {
|
||||
ToastCharterUtils.showToastLong("已到达目的地请重新选择线路")
|
||||
// ToastCharterUtils.showToastLong("已到达目的地请重新选择线路")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_car_arrived)
|
||||
return
|
||||
}
|
||||
//1、判断轨迹Id是否可用
|
||||
@@ -1132,7 +1134,8 @@ object CharterPassengerModel {
|
||||
&& TextUtils.isEmpty(it.csvFileUrl)
|
||||
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
CallerLogger.e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -1151,14 +1154,16 @@ object CharterPassengerModel {
|
||||
}
|
||||
val parameters = initAutopilotControlParameters()
|
||||
if (null == parameters) {
|
||||
ToastCharterUtils.showToastShort("请选择站点")
|
||||
// ToastCharterUtils.showToastShort("请选择站点")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_please_choose_station)
|
||||
e(
|
||||
SceneConstant.M_BUS + TAG,
|
||||
"行程日志-AutopilotControlParameters is empty."
|
||||
)
|
||||
return
|
||||
}
|
||||
ToastCharterUtils.showToastShort("启动自动驾驶中")
|
||||
// ToastCharterUtils.showToastShort("启动自动驾驶中")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_starting_autopilot)
|
||||
cleanRoutePoints()
|
||||
OchAutoPilotManager.startAutoPilot(parameters)
|
||||
d(
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.och.charter.passenger.R
|
||||
import com.mogo.och.charter.passenger.bean.request.ArriveDestRequest
|
||||
import com.mogo.och.charter.passenger.bean.request.EndOrderRequest
|
||||
import com.mogo.och.charter.passenger.bean.response.*
|
||||
@@ -40,7 +41,8 @@ object BusPassengerServiceManager {
|
||||
|
||||
private fun beforeNet():Boolean{
|
||||
if (draiverSn.isBlank()) {
|
||||
ToastCharterUtils.showToastShort("已断开司机屏连接、请联系安全员")
|
||||
// ToastCharterUtils.showToastShort("已断开司机屏连接、请联系安全员")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_passenger_disconnect_driver)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -123,11 +123,13 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
OrderStatusEnum.NoOrderUse -> {
|
||||
when (CallerAutoPilotStatusListenerManager.getState()) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
|
||||
ToastCharterUtils.showToastShort("设备未就绪请稍等,请安全员主动停止车辆")
|
||||
// ToastCharterUtils.showToastShort("设备未就绪请稍等,请安全员主动停止车辆")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint)
|
||||
}
|
||||
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
|
||||
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_enable_hint)
|
||||
}
|
||||
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
@@ -136,7 +138,8 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
}
|
||||
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
// ToastCharterUtils.showToastShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_parallel_driving_hint)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
@@ -209,7 +212,8 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
|
||||
StopSideStatus.EndingSuccess -> {
|
||||
BeautifyManager.notifyViewChange(BeautifyManager.ChangeTypeEnum.STOPSITE_SUCCESS)
|
||||
ToastCharterUtils.showToastShort("靠边停车成功")
|
||||
// ToastCharterUtils.showToastShort("靠边停车成功")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_stop_site_success)
|
||||
VoiceNotice.showNotice(
|
||||
context.getString(R.string.charter_p_stop_site_success),
|
||||
AIAssist.LEVEL0
|
||||
@@ -217,7 +221,8 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
}
|
||||
|
||||
StopSideStatus.EndingFaile -> {
|
||||
ToastCharterUtils.showToastShort("车辆系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("车辆系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_stop_site_ending_fail)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
@@ -228,9 +233,11 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
override fun onDoorStatusCallback(isOpen: Boolean, isFirst: Boolean) {
|
||||
if (!isFirst) {
|
||||
if (isOpen) {
|
||||
ToastCharterUtils.showToastShort("已开启车门")
|
||||
// ToastCharterUtils.showToastShort("已开启车门")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_door_opened)
|
||||
} else {
|
||||
ToastCharterUtils.showToastShort("已关门车门")
|
||||
// ToastCharterUtils.showToastShort("已关门车门")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_door_closed)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +288,8 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
temp = LatLng(it.latitude, it.longitude)
|
||||
indexPoint.add(temp)
|
||||
}
|
||||
ToastCharterUtils.showToastShort("没有轨迹点")
|
||||
// ToastCharterUtils.showToastShort("没有轨迹点")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_not_point)
|
||||
return indexPoint
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,8 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
|
||||
if (mPresenter?.haveOrder() == true) {
|
||||
|
||||
} else {
|
||||
ToastCharterUtils.showToastShort("请确认订单")
|
||||
// ToastCharterUtils.showToastShort("请确认订单")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_order_affirm)
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -65,7 +65,8 @@ class GoViewWithArrive @JvmOverloads constructor(
|
||||
})
|
||||
setOnClickListener {
|
||||
if (ClickUtils.isClickTooFrequent(this,3000)) {
|
||||
ToastCharterUtils.showToastShort("请稍后点击")
|
||||
// ToastCharterUtils.showToastShort("请稍后点击")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_please_click_later)
|
||||
return@setOnClickListener
|
||||
}
|
||||
startGo()
|
||||
@@ -82,7 +83,8 @@ class GoViewWithArrive @JvmOverloads constructor(
|
||||
}
|
||||
when (CallerAutoPilotStatusListenerManager.getState()) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
|
||||
ToastCharterUtils.showToastShort("设备未就绪请稍等")
|
||||
// ToastCharterUtils.showToastShort("设备未就绪请稍等")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint1)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
|
||||
onceRegisterAutoStatus()
|
||||
@@ -90,10 +92,12 @@ class GoViewWithArrive @JvmOverloads constructor(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
// 重新起步
|
||||
StopSideManager.resetStopSide()
|
||||
ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
|
||||
// ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_running_hint)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
|
||||
// ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_running_hint)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
||||
@@ -31,17 +31,20 @@ class StopSiteView @JvmOverloads constructor(
|
||||
private fun stopSite(){
|
||||
when (CallerAutoPilotStatusListenerManager.getState()) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
|
||||
ToastCharterUtils.showToastShort("设备未就绪请稍等,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("设备未就绪请稍等,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint2)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
|
||||
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_running_not_stop)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
// 靠边停车
|
||||
StopSideManager.stopSide()
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,8 @@ class DebugView @JvmOverloads constructor(
|
||||
getFragment()?.showNoviceGuidanceFragment()
|
||||
}
|
||||
debug_change_modle.setOnClickListener {
|
||||
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_enable_hint)
|
||||
when (HdMapBuildConfig.currentCarVrIconRes) {
|
||||
R.raw.aiqinghao -> {
|
||||
getFragment()?.setCarMode(OrderInfoResponse.M1_FAMILY)
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.mogo.eagle.core.data.BaseData
|
||||
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.charter.passenger.R
|
||||
import com.mogo.och.charter.passenger.callback.ITimeCallback
|
||||
import com.mogo.och.charter.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
@@ -66,7 +67,8 @@ class OrderInfoViewModel: ViewModel(), ITimeCallback {
|
||||
CharterPassengerModel.endOrder(object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (null != data && 0 == data.code) {
|
||||
ToastCharterUtils.showToastShort("结束成功")
|
||||
// ToastCharterUtils.showToastShort("结束成功")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_success_achieved)
|
||||
CharterPassengerModel.setEndOrderStatus()
|
||||
viewCallback?.setViewGone()
|
||||
val msg = EndOrderMsg(
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.LineSite
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.charter.passenger.R
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.manager.stopside.StopSideManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
@@ -87,7 +88,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
if (msg.arriveStatus == 2) {
|
||||
return@post
|
||||
}
|
||||
ToastCharterUtils.showToastShort("站点确定")
|
||||
// ToastCharterUtils.showToastShort("站点确定")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_site_determined)
|
||||
viewCallback?.setEnableSiteStatus(true)
|
||||
checkLine = tempCheckLine
|
||||
checkSite = tempCheckSite
|
||||
@@ -100,7 +102,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
CharterPassengerModel.cleanbroadcastListInfo(checkSite)
|
||||
CharterPassengerModel.queryOrder()
|
||||
} else {
|
||||
ToastCharterUtils.showToastShort("司机端拒绝请重新选择")
|
||||
// ToastCharterUtils.showToastShort("司机端拒绝请重新选择")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_driver_end_rejected)
|
||||
viewCallback?.hideDataDriverRefuse()
|
||||
}
|
||||
RxUtils.disposeSubscribe(subscribeSelectSite)
|
||||
@@ -207,7 +210,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String) {
|
||||
ToastCharterUtils.showToastShort("查询线路失败")
|
||||
// ToastCharterUtils.showToastShort("查询线路失败")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_querying_route_failed)
|
||||
viewCallback?.setVisableByTrun(showNetError = true)
|
||||
}
|
||||
|
||||
@@ -220,7 +224,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
|
||||
fun changeSites(siteList: MutableList<SiteInfoResponse.SiteInfo>) {
|
||||
if (!CallerTelematicManager.getClientConnStatus()) {
|
||||
ToastCharterUtils.showToastLong("乘客屏无法连接司机屏请联系安全员")
|
||||
// ToastCharterUtils.showToastLong("乘客屏无法连接司机屏请联系安全员")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_passenger_not_connect_driver)
|
||||
return
|
||||
}
|
||||
val sentDataSite: MutableList<LineSite> = mutableListOf()
|
||||
@@ -252,7 +257,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
|
||||
RxUtils.disposeSubscribe(subscribeSelectSite)
|
||||
subscribeSelectSite = RxUtils.createSubscribe(120_000) {
|
||||
ToastCharterUtils.showToastShort("请联系安全员确认")
|
||||
// ToastCharterUtils.showToastShort("请联系安全员确认")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_please_security_officer_confirm)
|
||||
viewCallback?.hideDataDriverRefuse()
|
||||
}
|
||||
}
|
||||
@@ -300,13 +306,15 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
ToastCharterUtils.showToastShort("查询站点失败")
|
||||
// ToastCharterUtils.showToastShort("查询站点失败")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_query_site_failed)
|
||||
viewCallback?.setVisableByTrun(showNetError = true)
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
super.onError()
|
||||
ToastCharterUtils.showToastShort("查询站点失败")
|
||||
// ToastCharterUtils.showToastShort("查询站点失败")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_query_site_failed)
|
||||
viewCallback?.setVisableByTrun(showNetError = true)
|
||||
}
|
||||
})
|
||||
@@ -314,7 +322,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
|
||||
private fun checkServerStatus() {
|
||||
if (!CallerTelematicManager.getClientConnStatus()) {
|
||||
ToastCharterUtils.showToastShort("断开和司机端连接、请联系安全员")
|
||||
// ToastCharterUtils.showToastShort("断开和司机端连接、请联系安全员")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_disconnect_driver)
|
||||
BizLoopManager.removeLoopFunction(TAGLINELOOP)
|
||||
viewCallback?.hideDataDriverRefuse()
|
||||
CallerLogger.d(
|
||||
@@ -385,14 +394,16 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
}
|
||||
|
||||
else -> {
|
||||
ToastCharterUtils.showToastShort("自动驾驶中无法切换线路")
|
||||
// ToastCharterUtils.showToastShort("自动驾驶中无法切换线路")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_autopilot_now_not_change_line)
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -401,11 +412,13 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
} else {
|
||||
when (CallerAutoPilotStatusListenerManager.getState()) {
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
|
||||
return false
|
||||
}
|
||||
}
|
||||
ToastCharterUtils.showToastShort("请停车后再修改目的地~")
|
||||
// ToastCharterUtils.showToastShort("请停车后再修改目的地~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_stop_car_and_change_site)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -95,9 +95,11 @@ class OrderSiteItemAdapter(
|
||||
checkChangeListener?.onCheckListener(tempInfo)
|
||||
} else {
|
||||
if (siteInfo.isNear) {
|
||||
ToastCharterUtils.showToastShort("您已在此站点附近")
|
||||
// ToastCharterUtils.showToastShort("您已在此站点附近")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_in_site_nearby)
|
||||
} else {
|
||||
ToastCharterUtils.showToastShort("站点已过,请选择返程路线")
|
||||
// ToastCharterUtils.showToastShort("站点已过,请选择返程路线")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_site_having_already_hint)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,11 +385,13 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
|
||||
if (leftLight) {
|
||||
tv_light_top_01.text = context.getString(R.string.charter_p_open_light1)
|
||||
tv_light_top_01.isChecked = true
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯1")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯1")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ceiling_light_1)
|
||||
} else {
|
||||
tv_light_top_01.text = context.getString(R.string.charter_p_close_light1)
|
||||
tv_light_top_01.isChecked = false
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯1")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯1")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ceiling_light_1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -399,11 +401,13 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
|
||||
if (rightLight) {
|
||||
tv_light_top_02.text = context.getString(R.string.charter_p_open_light2)
|
||||
tv_light_top_02.isChecked = true
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯2")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯2")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ceiling_light_2)
|
||||
} else {
|
||||
tv_light_top_02.text = context.getString(R.string.charter_p__close_light2)
|
||||
tv_light_top_02.isChecked = false
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯2")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯2")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ceiling_light_2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -414,12 +418,14 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
|
||||
tv_light_atmosphere.text = context.getString(R.string.charter_p_open_atmosphere)
|
||||
tv_light_atmosphere.isChecked = true
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.charter_p_function_atmosphere_select)
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("打开氛围灯")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("打开氛围灯")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ambient_light)
|
||||
} else {
|
||||
tv_light_atmosphere.text = context.getString(R.string.charter_p_close_atmosphere)
|
||||
tv_light_atmosphere.isChecked = false
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.charter_p_function_atmosphere_nor)
|
||||
if (!isFirst) ToastCharterUtils.showToastShort("关闭氛围灯")
|
||||
// if (!isFirst) ToastCharterUtils.showToastShort("关闭氛围灯")
|
||||
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ambient_light)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.och.bridge.device.LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.bridge.device.data.AirconditionStatus
|
||||
import com.mogo.och.bridge.device.data.HeaterStatue
|
||||
import com.mogo.och.bridge.device.data.LightStatus
|
||||
import com.mogo.och.charter.passenger.R
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
@@ -146,7 +147,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
RxUtils.disposeSubscribe(airconditionDisposable)
|
||||
airconditionDisposable = RxUtils.createSubscribe(10000) {
|
||||
if (!LightAirconditionDoorStatusManager.airconditionStatus.isOpen && LightAirconditionDoorStatusManager.airconditionStatus.windSpeed != windSpeedCmd && LightAirconditionDoorStatusManager.airconditionStatus.temperature != temperatureCmd && LightAirconditionDoorStatusManager.airconditionStatus.pattert != modeCmd) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +161,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
RxUtils.disposeSubscribe(airconditionDisposable)
|
||||
airconditionDisposable = RxUtils.createSubscribe(10000) {
|
||||
if (LightAirconditionDoorStatusManager.airconditionStatus.isOpen) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +176,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
RxUtils.disposeSubscribe(heaterDisposable)
|
||||
heaterDisposable = RxUtils.createSubscribe(10000) {
|
||||
if (!LightAirconditionDoorStatusManager.heaterStatue.isOpen && LightAirconditionDoorStatusManager.heaterStatue.windSpeed != windSpeedCmd) {
|
||||
ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")
|
||||
// ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_fan_heater_operation_invalid)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,7 +188,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
RxUtils.disposeSubscribe(heaterDisposable)
|
||||
heaterDisposable = RxUtils.createSubscribe(10000) {
|
||||
if (LightAirconditionDoorStatusManager.heaterStatue.isOpen) {
|
||||
ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")//还是开着的
|
||||
// ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")//还是开着的
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_fan_heater_operation_invalid)//还是开着的
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,14 +201,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(1)
|
||||
RxUtils.createSubscribe {
|
||||
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(2)
|
||||
RxUtils.createSubscribe {
|
||||
if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,14 +223,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(1)
|
||||
RxUtils.createSubscribe {
|
||||
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(2)
|
||||
RxUtils.createSubscribe {
|
||||
if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,14 +245,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(1)
|
||||
RxUtils.createSubscribe {
|
||||
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(2)
|
||||
RxUtils.createSubscribe {
|
||||
if (LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) {
|
||||
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
override fun setStateAndUi(state: Int) {
|
||||
super.setStateAndUi(state)
|
||||
if(state==CURRENT_STATE_PLAYING_BUFFERING_START){
|
||||
ToastCharterUtils.showToastShort("加载中请稍等")
|
||||
// ToastCharterUtils.showToastShort("加载中请稍等")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_loading)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +282,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
CallerLogger.d(TAG,"onError--${what}--${extra}")
|
||||
MediaManager.setVideoFocusChange(false)
|
||||
mThumbImageViewLayout?.visibility = View.VISIBLE
|
||||
ToastCharterUtils.showToastLong("哎呀,出错了,看看其他视频吧")
|
||||
// ToastCharterUtils.showToastLong("哎呀,出错了,看看其他视频吧")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_video_error)
|
||||
currentTime = -1
|
||||
if(isIfCurrentIsFullscreen){
|
||||
smalllPlayer?.clearFullscreenLayout(this)
|
||||
|
||||
@@ -121,12 +121,14 @@ public class RecyclerVideoAdapter extends RecyclerView.Adapter<RecyclerItemVideo
|
||||
|
||||
@Override
|
||||
public void onPlayError(String url, Object... objects) {
|
||||
ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
|
||||
// ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
|
||||
ToastCharterUtils.INSTANCE.showCharterLongToast(R.string.module_och_video_error);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickStartError(String url, Object... objects) {
|
||||
ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
|
||||
// ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
|
||||
ToastCharterUtils.INSTANCE.showCharterLongToast(R.string.module_och_video_error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.viewpager.widget.ViewPager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.CountDownTimer
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.common.module.biz.media.data.MediaItem
|
||||
import com.mogo.och.biz.media.video.MediaLoopPlayView.Companion.IMAGE_COUNT_DOWN_SECONDS
|
||||
import com.mogo.och.biz.media.video.MediaLoopPlayView.Companion.TAG
|
||||
@@ -361,7 +362,8 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
||||
if (mNewDataList.isNotEmpty()) {
|
||||
setMediaData(mNewDataList)
|
||||
mNewDataList.clear()
|
||||
ToastUtils.showShort("宣传视频数据已更新")
|
||||
// ToastUtils.showShort("宣传视频数据已更新")
|
||||
ToastUtils.showShort(R.string.module_och_promotional_video_updated)
|
||||
MediaPlayLogger.printInfoLog("playNextItemView, 宣传视频数据已更新")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -91,7 +91,8 @@ class ReportErrorPointView : WindowRelativeLayout,
|
||||
tv_report_error_point_reason.onClick {
|
||||
val checkDataList = errorPointItemAdapter.getCheckDataList()
|
||||
if (checkDataList.isEmpty()) {
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
// ToastUtils.showShort("请选择问题类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
|
||||
return@onClick
|
||||
}
|
||||
tv_report_error_point_reason_cancel.isEnabled = false
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.routing.bean.PointError
|
||||
import com.mogo.och.biz.routing.bean.QueryPointErrorReasonsRsp
|
||||
import com.mogo.och.biz.routing.bean.SaveGrayContrailErrorReasons
|
||||
@@ -89,7 +90,8 @@ class ReportErrorPointViewModel : ViewModel() {
|
||||
object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (data != null && data.code == 0){
|
||||
ToastUtils.showShort("提交成功")
|
||||
// ToastUtils.showShort("提交成功")
|
||||
ToastUtils.showShort(R.string.module_och_submit_successfully)
|
||||
viewCallback?.submitErrorReasons()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.routing.bean.GrayLineBean
|
||||
import com.mogo.och.biz.routing.bean.QueryGrayContrailListRsp
|
||||
import com.mogo.och.biz.routing.bean.QuerySitesReasons
|
||||
@@ -109,7 +110,8 @@ class RoutingSelectModel : ViewModel() {
|
||||
"queryRoutingGrayLineList onFail: code=$code, msg=$msg"
|
||||
)
|
||||
OchChainLogManager.writeChainLogRouting("[查询灰度路线]","[查询灰度路线] 请求fail, code=$code, msg=$msg, sn=${SharedPrefsMgr.getInstance().sn}")
|
||||
ToastUtils.showShort("查询灰度线路列表异常, 请稍后重试, code=$code")
|
||||
// ToastUtils.showShort("查询灰度线路列表异常, 请稍后重试, code=$code")
|
||||
ToastUtils.showShort(R.string.module_och_query_routing_gray_line_list_fail, code)
|
||||
viewCallback?.onQueryRoutingGrayLineListFailed(msg ?: "查询灰度线路列表异常, 请稍后重试")
|
||||
}
|
||||
|
||||
@@ -191,7 +193,8 @@ class RoutingSelectModel : ViewModel() {
|
||||
val grayId = data.taskId
|
||||
val stationList = data.stationList
|
||||
if (grayLineBean == null || contrailBean == null || stationList.size < 2) {
|
||||
ToastUtils.showShort("灰度线路或轨迹信息异常,请稍后再试")
|
||||
// ToastUtils.showShort("灰度线路或轨迹信息异常,请稍后再试")
|
||||
ToastUtils.showShort(R.string.module_och_query_routing_gray_line_error)
|
||||
OchChainLogManager.writeChainLogRouting("[开始任务]","[开始任务] 灰度线路或轨迹信息异常,请稍后再试")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -96,7 +96,8 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC
|
||||
RoutingItemAdapter.LineItemClickListener {
|
||||
override fun onItemClick(data: GrayLineBean) {
|
||||
if(data.contrailId==null||data.contrailId!!<=0L){
|
||||
ToastUtils.showShort("请设置轨迹信息")
|
||||
// ToastUtils.showShort("请设置轨迹信息")
|
||||
ToastUtils.showShort(R.string.module_och_please_set_trajectory_info)
|
||||
}
|
||||
OchChainLogManager.writeChainLogRouting("[选择灰度任务]","[选择灰度任务] 当前选择 ${data} ")
|
||||
resetStatus()
|
||||
@@ -255,7 +256,8 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC
|
||||
mRoutingLineList.clear()
|
||||
mRoutingLineList.addAll(data)
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
ToastUtils.showShort("刷新成功")
|
||||
// ToastUtils.showShort("刷新成功")
|
||||
ToastUtils.showShort(R.string.module_och_please_refresh_success)
|
||||
} else {
|
||||
showEmptyView()
|
||||
}
|
||||
|
||||
@@ -226,7 +226,8 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac
|
||||
* 服务完成
|
||||
*/
|
||||
override fun onSubmitEndTaskSuccess() {
|
||||
ToastUtils.showLong("结束任务成功")
|
||||
// ToastUtils.showLong("结束任务成功")
|
||||
ToastUtils.showLong(R.string.module_och_task_finish_success)
|
||||
RoutingServiceManager.invokeCallback(false)
|
||||
// 移除高德导航计算距离
|
||||
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
|
||||
|
||||
@@ -271,7 +271,8 @@ class TaxiRunningView: ConstraintLayout, TaxiRunningModel.RoutingRuningCallback,
|
||||
}
|
||||
|
||||
override fun onSubmitEndTaskSuccess() {
|
||||
ToastUtils.showLong("结束任务成功")
|
||||
// ToastUtils.showLong("结束任务成功")
|
||||
ToastUtils.showLong(R.string.module_och_task_finish_success)
|
||||
RoutingServiceManager.invokeCallback(false)
|
||||
// 移除高德导航计算距离
|
||||
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bridge.R
|
||||
import com.mogo.och.bridge.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.bridge.autopilot.autopilot.bean.SessionWithTime
|
||||
import com.mogo.och.bridge.autopilot.line.LineManager
|
||||
@@ -52,7 +53,8 @@ object OchAutoPilotManager {
|
||||
clearGlobalSessionId("检测session 自带的时间 ${currentTimeMillis}_${sessionInfo.setTime}_${sessionInfo.sessionId}")
|
||||
return true
|
||||
}else{
|
||||
ToastUtils.showLong("自驾启动中,请勿重复点击")
|
||||
// ToastUtils.showLong("自驾启动中,请勿重复点击")
|
||||
ToastUtils.showLong(R.string.module_och_autopilot_starting_not_click)
|
||||
OchAutopilotAnalytics.triggerCanStartAutopilotBySessionId(globalSessionId.get())
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bridge.R
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.bridge.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotManager
|
||||
@@ -456,7 +457,8 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
}
|
||||
CallerLogger.d(TAG, "${parameters?.wayLatLons}\n${parameters?.blackLatLons}")
|
||||
if (parameters == null) {
|
||||
ToastUtils.showShort("未设置起始或终点站点")
|
||||
// ToastUtils.showShort("未设置起始或终点站点")
|
||||
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
|
||||
}
|
||||
return parameters
|
||||
}
|
||||
@@ -533,13 +535,15 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
fun startAutopilot() {
|
||||
|
||||
if (startStation == null || endStation == null) {
|
||||
ToastUtils.showShort("未设置起始或终点站点")
|
||||
// ToastUtils.showShort("未设置起始或终点站点")
|
||||
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
|
||||
return
|
||||
}
|
||||
|
||||
startStation?.let {
|
||||
if (!it.isLeaving) {
|
||||
ToastUtils.showShort("请滑动出发后再启动自驾")
|
||||
// ToastUtils.showShort("请滑动出发后再启动自驾")
|
||||
ToastUtils.showShort(R.string.module_och_please_slide_hint)
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -555,14 +559,16 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if (_contraiInfo == null) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
return
|
||||
} else {
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
&& TextUtils.isEmpty(_contraiInfo!!.csvFileUrl)
|
||||
&& TextUtils.isEmpty(_contraiInfo!!.csvFileMd5)
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -685,7 +691,8 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
} else {
|
||||
// 地盘有但是和och出不一样
|
||||
// todo 需要och 重新出发轨迹下载操作
|
||||
ToastUtils.showShort("${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查")
|
||||
// ToastUtils.showShort("${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查")
|
||||
ToastUtils.showShort(R.string.module_och_autopilot_id_diff, autopilotIdFromFsm, teleOrderId)
|
||||
OchChainLogManager.writeChainLogAutopilot(
|
||||
"自驾Id",
|
||||
"${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查"
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.function.main.MainPresenter
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.utils.PermissionUtil
|
||||
|
||||
open class BaseBluetoothManager {
|
||||
@@ -48,7 +49,8 @@ open class BaseBluetoothManager {
|
||||
return BluetoothState.OFF
|
||||
}
|
||||
}
|
||||
ToastUtils.showShort("设备无蓝牙硬件")
|
||||
// ToastUtils.showShort("设备无蓝牙硬件")
|
||||
ToastUtils.showShort(R.string.module_och_not_bluetooth)
|
||||
return BluetoothState.NONE
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import android.bluetooth.BluetoothProfile
|
||||
import android.util.Log
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import io.reactivex.disposables.Disposable
|
||||
@@ -190,7 +191,8 @@ class OchBluetoothGattCallback(device: BluetoothDevice) : BluetoothGattCallback(
|
||||
return null
|
||||
}
|
||||
val service = mBluetoothGatt!!.getService(uuid)
|
||||
if (service == null) ToastUtils.showShort("没有找到服务UUID=$uuid")
|
||||
// if (service == null) ToastUtils.showShort("没有找到服务UUID=$uuid")
|
||||
if (service == null) ToastUtils.showShort(R.string.module_och_bluetooth_not_find_uuid, "$uuid")
|
||||
return service
|
||||
}
|
||||
|
||||
@@ -223,7 +225,8 @@ class OchBluetoothGattCallback(device: BluetoothDevice) : BluetoothGattCallback(
|
||||
fun connectGattAndSend(data: String) {
|
||||
RxUtils.disposeSubscribe(timeoutCLose)
|
||||
if(isConnected){
|
||||
ToastUtils.showShort("已连接成功")
|
||||
// ToastUtils.showShort("已连接成功")
|
||||
ToastUtils.showShort(R.string.module_och_bluetooth_connected)
|
||||
OchChainLogManager.writeChainLogWriteOff("司机端核销成功","已连接成功")
|
||||
waitSendData[data] = BleManager.UUID_CHAR_WRITE
|
||||
sendData()
|
||||
|
||||
@@ -43,7 +43,8 @@ class DebugViewWatchDogFragment :
|
||||
actv_password_submit.setOnClickListener {
|
||||
val text = acet_close.text
|
||||
if(text==null||text.isEmpty()){
|
||||
ToastCharterUtils.showToastShort("请输入密码")
|
||||
// ToastCharterUtils.showToastShort("请输入密码")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_input_pwd)
|
||||
}else{
|
||||
if(text.toString() == "123987"){
|
||||
dismissAllowingStateLoss()
|
||||
@@ -52,7 +53,8 @@ class DebugViewWatchDogFragment :
|
||||
}
|
||||
ToggleDebugView.toggleDebugView.toggle(requireContext())
|
||||
}else{
|
||||
ToastCharterUtils.showToastShort("请输入正确密码")
|
||||
// ToastCharterUtils.showToastShort("请输入正确密码")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_input_pwd_error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.utils.PermissionUtil
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
import io.reactivex.Observable
|
||||
@@ -36,9 +38,11 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
return@observable
|
||||
}
|
||||
if (newValue) {
|
||||
ToastCharterUtils.showToastLong("长链接状态恢复")
|
||||
// ToastCharterUtils.showToastLong("长链接状态恢复")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_long_link_status_restored)
|
||||
} else {
|
||||
ToastCharterUtils.showToastLong("长链接异常,请开启相应权限或者查看网络")
|
||||
// ToastCharterUtils.showToastLong("长链接异常,请开启相应权限或者查看网络")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_long_link_error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,13 +86,16 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
//长链接状态 socketStatus
|
||||
|
||||
var toastStr = ""
|
||||
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!networkStatus) toastStr += " 网络异常 "
|
||||
// if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!locationStatusPermsStatus) toastStr += StringUtils.getString(R.string.module_och_location_service_error)
|
||||
// if (!networkStatus) toastStr += " 网络异常 "
|
||||
if (!networkStatus) toastStr += StringUtils.getString(R.string.module_och_network_service_error)
|
||||
|
||||
i(TAG, "abnormal_factors_Str = $toastStr")
|
||||
|
||||
if (!FunctionBuildConfig.isDemoMode && toastStr !== "") {
|
||||
ToastCharterUtils.showToastLong(toastStr + "请开启相应权限或者查看网络")
|
||||
// ToastCharterUtils.showToastLong(toastStr + "请开启相应权限或者查看网络")
|
||||
ToastCharterUtils.showToastLong(R.string.module_och_please_open_permission, toastStr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.utils.PermissionUtil
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
import com.mogo.tts.base.zhi.AsrTextBean
|
||||
@@ -165,7 +166,8 @@ object ZhiStateManager : ZhiRecordWinUi {
|
||||
return
|
||||
}
|
||||
if (!isFastClick()) {
|
||||
ToastCharterUtils.showToastShort("请稍后唤醒")
|
||||
// ToastCharterUtils.showToastShort("请稍后唤醒")
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_please_wait_wake_up)
|
||||
return
|
||||
}
|
||||
if (PermissionUtil.checkPermission(AbsMogoApplication.getApp(), Manifest.permission.RECORD_AUDIO)) {
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.och.common.module.R;
|
||||
import com.mogo.och.common.module.utils.PermissionUtil;
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils;
|
||||
|
||||
@@ -175,14 +176,16 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
}
|
||||
}
|
||||
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp()) || result.getErrorCode() == 2) {
|
||||
ToastCharterUtils.showToastShort("网络异常,请重试");
|
||||
// ToastCharterUtils.showToastShort("网络异常,请重试");
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_network_error_retry);
|
||||
if (mNaviChangedCallback != null) {
|
||||
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!PermissionUtil.isLocServiceEnable(AbsMogoApplication.getApp()) || !PermissionUtil.checkPermission(AbsMogoApplication.getApp(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION})) {
|
||||
ToastCharterUtils.showToastShort("请开启车机定位后重试");
|
||||
// ToastCharterUtils.showToastShort("请开启车机定位后重试");
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_open_location_permission_retry);
|
||||
if (mNaviChangedCallback != null) {
|
||||
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.och.common.module.R;
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils;
|
||||
|
||||
public class ToastUtilsOch {
|
||||
@@ -36,7 +37,8 @@ public class ToastUtilsOch {
|
||||
|
||||
public static void toastRequestError(Context context,String failMsg){
|
||||
if (!NetworkUtils.isConnected(context)) {
|
||||
ToastCharterUtils.showToastShort("网络异常,请稍后重试");
|
||||
// ToastCharterUtils.showToastShort("网络异常,请稍后重试");
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_network_error_retry1);
|
||||
}else {
|
||||
ToastCharterUtils.showToastShort(failMsg);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ class CommonFeedbackDialog : BaseFloatDialog, LifecycleObserver {
|
||||
private var listener:Listener?=null
|
||||
|
||||
private var mRunnable:Runnable= Runnable {
|
||||
ToastUtils.showLong("超时未响应,请求失败")
|
||||
// ToastUtils.showLong("超时未响应,请求失败")
|
||||
ToastUtils.showLong(R.string.module_och_timeout)
|
||||
}
|
||||
|
||||
constructor(builder: Builder, context: Context) : super(context) {
|
||||
|
||||
@@ -30,6 +30,22 @@ object ToastCharterUtils {
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showToastLong(@StringRes resId: Int) {
|
||||
val string = StringUtils.getString(resId)
|
||||
string?.let {
|
||||
showToastLong(it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showToastLong(@StringRes resId: Int, vararg args: Any?) {
|
||||
val string = StringUtils.getString(resId, args)
|
||||
string?.let {
|
||||
showToastLong(it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showToastShort(toastText: String?){
|
||||
CallerLogger.d(SceneConstant.M_OCHCOMMON + TAG,"showToastShort吐司内容:${toastText}")
|
||||
@@ -60,6 +76,12 @@ object ToastCharterUtils {
|
||||
}
|
||||
|
||||
|
||||
fun showCharterLongToast(@StringRes resId: Int) {
|
||||
val string = StringUtils.getString(resId)
|
||||
string?.let {
|
||||
showCharterLongToast(it)
|
||||
}
|
||||
}
|
||||
fun showCharterLongToast(toastText: String) {
|
||||
val context = ActivityUtils.getTopActivity()
|
||||
val marker = ToastCharterView(context)
|
||||
|
||||
@@ -198,7 +198,8 @@ object LineModel {
|
||||
}
|
||||
if (!isBackground) {
|
||||
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp())) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试")
|
||||
// ToastUtils.showShort("网络异常,请稍后重试")
|
||||
ToastUtils.showShort(R.string.module_och_network_error)
|
||||
} else {
|
||||
ToastUtils.showShort(failMsg)
|
||||
}
|
||||
@@ -293,7 +294,8 @@ object LineModel {
|
||||
d(TAG, "commitSwitchLineId onError${e.printStackTrace()}")
|
||||
if (e is DataException) {
|
||||
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
|
||||
ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
// ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
|
||||
mBusLinesCallbackMap.forEach {
|
||||
it.value.onChangeLineIdFail()
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.och.data.bean.BusStationBean
|
||||
import com.mogo.och.data.bean.ContraiInfo
|
||||
import com.mogo.och.data.bean.LineInfo
|
||||
import com.mogo.och.data.bean.SiteIntroduce
|
||||
import com.mogo.och.offline.R
|
||||
import com.mogo.och.offline.repository.db.bean.LineDataBean
|
||||
import com.mogo.och.offline.model.LineModel
|
||||
import com.mogo.och.offline.model.LineModel.currentTask
|
||||
@@ -100,7 +101,8 @@ object RepositoryManager {
|
||||
currentTask?.lineId?.let {
|
||||
ContraiDb.queryAutopilotInfoByLineid(it)?.apply {
|
||||
if (lineId == null || lineId!! < 0L||csvFileUrl.isNullOrEmpty()||csvFileMd5.isNullOrEmpty()||txtFileUrl.isNullOrEmpty()||txtFileMd5.isNullOrEmpty()) {
|
||||
ToastUtils.showLong("请设置轨迹信息")
|
||||
// ToastUtils.showLong("请设置轨迹信息")
|
||||
ToastUtils.showLong(R.string.module_och_set_line_info)
|
||||
OchChainLogManager.writeChainLogAutopilot("轨迹错误",this.toString())
|
||||
CallerLogger.d(TAG,"轨迹错误,$this")
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.offline.R
|
||||
import com.mogo.och.offline.repository.db.bean.LineDataBean
|
||||
import com.mogo.och.offline.callback.IBusLinesCallback
|
||||
import com.mogo.och.offline.model.LineModel
|
||||
@@ -86,7 +87,8 @@ class SwtichLineModel : ViewModel(), IBusLinesCallback {
|
||||
|
||||
fun changeLineStart(checkTask:LineDataBean) {
|
||||
if(checkTask==null){
|
||||
ToastUtils.showShort("请重新选择线路")
|
||||
// ToastUtils.showShort("请重新选择线路")
|
||||
ToastUtils.showShort(R.string.module_och_please_choose_line)
|
||||
return
|
||||
}
|
||||
val newTask = TaskDataBean()
|
||||
|
||||
@@ -130,14 +130,16 @@ object LineModel {
|
||||
if(RepositoryManager.supportDb()) {
|
||||
if (e is DataException) {
|
||||
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
|
||||
ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
// ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
|
||||
mBusLinesCallbackMap.forEach {
|
||||
it.value.onChangeLineIdFail()
|
||||
}
|
||||
}
|
||||
}else{
|
||||
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
|
||||
ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
// ToastUtils.showShort("选择任务失败:${e.message}")
|
||||
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
|
||||
mBusLinesCallbackMap.forEach {
|
||||
it.value.onChangeLineIdFail()
|
||||
}
|
||||
@@ -261,7 +263,8 @@ object LineModel {
|
||||
"taskId:${currentTask?.taskId}--lineInfo:${LineManager.lineInfos}"
|
||||
OchChainLogManager.writeChainLog("结束任务", changeInfo)
|
||||
} else {
|
||||
ToastUtils.showShort("结束任务失败请稍后再试")
|
||||
// ToastUtils.showShort("结束任务失败请稍后再试")
|
||||
ToastUtils.showShort(R.string.module_och_task_finish_fail)
|
||||
mBusLinesCallbackMap.forEach {
|
||||
it.value.onCompleteTaskFail()
|
||||
}
|
||||
|
||||
@@ -117,7 +117,8 @@ object SynchDataModel {
|
||||
}
|
||||
if (!isBackground) {
|
||||
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp())) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试")
|
||||
// ToastUtils.showShort("网络异常,请稍后重试")
|
||||
ToastUtils.showShort(R.string.module_och_network_error)
|
||||
} else {
|
||||
ToastUtils.showShort(failMsg)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.data.bean.ContraiInfo
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import com.mogo.och.weaknet.bean.request.QueryPointRequest
|
||||
import com.mogo.och.weaknet.bean.request.ShuttleEventRequest
|
||||
import com.mogo.och.weaknet.bean.response.BusRoutesResponse
|
||||
@@ -122,7 +123,8 @@ class WeaknetRepository : ILineRepository {
|
||||
currentTask?.lineId?.let {
|
||||
ContraiDb.queryAutopilotInfoByLineid(it)?.apply {
|
||||
if (lineId == null || lineId!! < 0L||csvFileUrl.isNullOrEmpty()||csvFileMd5.isNullOrEmpty()||txtFileUrl.isNullOrEmpty()||txtFileMd5.isNullOrEmpty()) {
|
||||
ToastUtils.showLong("请设置轨迹信息")
|
||||
// ToastUtils.showLong("请设置轨迹信息")
|
||||
ToastUtils.showLong(R.string.module_och_set_line_info)
|
||||
OchChainLogManager.writeChainLogAutopilot("轨迹错误",this.toString())
|
||||
CallerLogger.d(TAG,"轨迹错误,$this")
|
||||
}
|
||||
|
||||
@@ -72,14 +72,17 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
|
||||
actv_submit_task.onClick {
|
||||
val tempCheckTask = mAdapter.getCheckTask()
|
||||
if(tempCheckTask==null){
|
||||
ToastUtils.showShort("请选择任务")
|
||||
// ToastUtils.showShort("请选择任务")
|
||||
ToastUtils.showShort(R.string.module_och_please_choose_task)
|
||||
}else{
|
||||
if(tempCheckTask.status == TaskDataBean.used){
|
||||
val reason = tempData[tempCheckTask.taskId]
|
||||
if(reason==null){
|
||||
ToastUtils.showShort("该任务已被其他车辆使用、请切换任务")
|
||||
// ToastUtils.showShort("该任务已被其他车辆使用、请切换任务")
|
||||
ToastUtils.showShort(R.string.module_och_this_task_not_use)
|
||||
}else{
|
||||
ToastUtils.showShort("该任务已被${reason}使用、请切换任务")
|
||||
// ToastUtils.showShort("该任务已被${reason}使用、请切换任务")
|
||||
ToastUtils.showShort(R.string.module_och_this_task_not_use1, reason)
|
||||
}
|
||||
}else {
|
||||
viewModel?.changeLineStart(tempCheckTask)
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import com.mogo.och.weaknet.callback.IBusLinesCallback
|
||||
import com.mogo.och.weaknet.model.LineModel
|
||||
import com.mogo.och.weaknet.repository.RepositoryManager
|
||||
@@ -116,7 +117,8 @@ class SwtichTaskModel : ViewModel(), IBusLinesCallback {
|
||||
|
||||
fun changeLineStart(checkTask:TaskDataBean) {
|
||||
if(tasksBelongLine==null){
|
||||
ToastUtils.showShort("请重新选择线路")
|
||||
// ToastUtils.showShort("请重新选择线路")
|
||||
ToastUtils.showShort(R.string.module_och_please_choose_line)
|
||||
return
|
||||
}
|
||||
viewCallback?.showLoading()
|
||||
|
||||
@@ -404,7 +404,8 @@ public class SweeperOperateTaskModel {
|
||||
&& TextUtils.isEmpty(mCurrentSubTaskDetail.getCsvFileUrl())
|
||||
&& TextUtils.isEmpty(mCurrentSubTaskDetail.getCsvFileUrlDPQP())
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试");
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试");
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory);
|
||||
CallerLogger.e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -605,7 +606,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[查询当前任务] 请求failed, 网络异常,请稍后重试");
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -636,7 +638,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[查询主任务] 请求error, 网络异常,请稍后重试");
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -683,7 +686,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[查询子任务] 请求failed, 网络异常,请稍后重试, taskId=" + taskId);
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -748,7 +752,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[查询子任务详情及轨迹信息] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -804,7 +809,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[子任务开始上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -859,7 +865,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[子任务结束上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
|
||||
} else {
|
||||
if (isAutopilotSubTaskArriveEndSite) return;
|
||||
@@ -908,7 +915,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[子任务跳过上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
@@ -952,7 +960,8 @@ public class SweeperOperateTaskModel {
|
||||
public void onFail(int code, String msg) {
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
// ToastUtils.showShort("网络异常,请稍后重试");
|
||||
ToastUtils.showShort(R.string.module_och_network_error);
|
||||
DebugView.Companion.printErrorMsg("[主任务重置] 请求failed, 网络异常,请稍后重试, taskId=" + taskId);
|
||||
} else {
|
||||
ToastUtils.showShort(msg);
|
||||
|
||||
@@ -1252,7 +1252,8 @@ object TaxiTaskModel {
|
||||
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrl)
|
||||
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrlDPQP)
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
DebugView.printErrorMsg("[启自驾] 无发布轨迹, 请发布后重试")
|
||||
e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
|
||||
@@ -78,7 +78,8 @@ class CancleOrderView : WindowRelativeLayout, CancleOrderViewModel.CancleOrderVi
|
||||
tv_report_cancle_reason.onClick {
|
||||
val checkDataList = cancleOrderItemAdapter.getCheckDataList()
|
||||
if (checkDataList.isEmpty()) {
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
// ToastUtils.showShort("请选择问题类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
|
||||
return@onClick
|
||||
}
|
||||
tv_report_cancle_reason_cancel.isEnabled = false
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.mogo.och.data.taxi.TaxiOrderStatusEnum
|
||||
import com.mogo.och.unmanned.passenger.bean.TaxiPassengerBaseRespBean
|
||||
import com.mogo.och.unmanned.passenger.constant.TaxiPassengerConst
|
||||
import com.mogo.och.unmanned.passenger.network.TaxiPassengerServiceManager
|
||||
import com.mogo.och.unmanned.taxi.passenger.R
|
||||
|
||||
object AutopilotManager : IOchAutopilotStatusListener {
|
||||
|
||||
@@ -68,7 +69,8 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
&& TextUtils.isEmpty(it.csvFileUrl)
|
||||
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
|
||||
) {
|
||||
ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
|
||||
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
|
||||
CallerLogger.e(
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.unmanned.passenger.ui.aiview.AIMessageManager
|
||||
import com.mogo.och.unmanned.passenger.ui.aiview.bean.AIMessage
|
||||
import com.mogo.och.unmanned.taxi.passenger.R
|
||||
|
||||
class RoadCrossRoamViewModel: ViewModel(), IMoGoMapRoadListener {
|
||||
|
||||
@@ -45,7 +46,8 @@ class RoadCrossRoamViewModel: ViewModel(), IMoGoMapRoadListener {
|
||||
// 处于漫游模式下不做处理
|
||||
if (CallerMapIdentifyManager.roam.second) {
|
||||
if (CallerMapIdentifyManager.roam.first != TAG) {
|
||||
ToastUtils.showLong("正在漫游中,不展示路口漫游")
|
||||
// ToastUtils.showLong("正在漫游中,不展示路口漫游")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_roam_now)
|
||||
}
|
||||
CallerLogger.d(TAG, "正在漫游中,不展示路口漫游")
|
||||
return
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
|
||||
import com.mogo.eagle.core.function.biz.R
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
@@ -24,6 +25,7 @@ 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.mogo.logger.scene.SceneConstant.Companion.M_BIZ
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_COMPLETED
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM
|
||||
@@ -162,42 +164,50 @@ class DispatchAutoPilotManager private constructor() :
|
||||
}
|
||||
if(it.trajUrl == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "trajUrl-null")
|
||||
ToastUtils.showShort("trajUrl数据为空")
|
||||
// ToastUtils.showShort("trajUrl数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_traj_url_data_null)
|
||||
return
|
||||
}
|
||||
if(it.trajMd5 == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "trajMd5-null")
|
||||
ToastUtils.showShort("trajMd5数据为空")
|
||||
// ToastUtils.showShort("trajMd5数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_traj_md5_data_null)
|
||||
return
|
||||
}
|
||||
if(it.stopUrl == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "stopUrl-null")
|
||||
ToastUtils.showShort("stopUrl数据为空")
|
||||
// ToastUtils.showShort("stopUrl数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_stop_url_data_null)
|
||||
return
|
||||
}
|
||||
if(it.stopMd5 == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "stopMd5-null")
|
||||
ToastUtils.showShort("stopMd5数据为空")
|
||||
// ToastUtils.showShort("stopMd5数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_stop_md5_data_null)
|
||||
return
|
||||
}
|
||||
if(it.vehicleModel == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "vehicleModel-null")
|
||||
ToastUtils.showShort("vehicleModel数据为空")
|
||||
// ToastUtils.showShort("vehicleModel数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_vehicle_model_data_null)
|
||||
return
|
||||
}
|
||||
if(it.lineName == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "lineName-null")
|
||||
ToastUtils.showShort("lineName数据为空")
|
||||
// ToastUtils.showShort("lineName数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_line_name_data_null)
|
||||
return
|
||||
}
|
||||
if(it.startLocAddress == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "startLocAddress-null")
|
||||
ToastUtils.showShort("startLocAddress数据为空")
|
||||
// ToastUtils.showShort("startLocAddress数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_start_loc_address_data_null)
|
||||
return
|
||||
}
|
||||
if(it.endLocAddress == null){
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, "endLocAddress-null")
|
||||
ToastUtils.showShort("endLocAddress数据为空")
|
||||
// ToastUtils.showShort("endLocAddress数据为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_end_loc_address_data_null)
|
||||
return
|
||||
}
|
||||
val currentAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.lineName,it.trajUrl,it.trajMd5,
|
||||
@@ -227,7 +237,8 @@ class DispatchAutoPilotManager private constructor() :
|
||||
//调用工控机开启自动驾驶
|
||||
startAutoPilot()
|
||||
},onError = { error->
|
||||
ToastUtils.showShort("上报调度失败${error}")
|
||||
// ToastUtils.showShort("上报调度失败${error}")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_reported_dispatch_failure, error)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -244,10 +255,13 @@ class DispatchAutoPilotManager private constructor() :
|
||||
//取消自动驾驶
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
isDispatch = false
|
||||
ToastUtils.showShort("云调度取消确认成功")
|
||||
// ToastUtils.showShort("云调度取消确认成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_cloud_cancel_autopilot_success)
|
||||
CallerLogger.i("$M_BIZ$TAG","stopAffirm 取消自动驾驶")
|
||||
}, onError = {error ->
|
||||
ToastUtils.showShort("停止调度确认失败${error}")
|
||||
// ToastUtils.showShort("停止调度确认失败${error}")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_biz_cloud_cancel_autopilot_error, error)
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -341,11 +355,14 @@ class DispatchAutoPilotManager private constructor() :
|
||||
receiverBean?.let {
|
||||
//调度完成,同步云端,并且吐司提示
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_COMPLETED, it.taskId)
|
||||
ToastUtils.showLong("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
val msg = StringUtils.getString(R.string.module_mogo_core_function_biz_cloud_complete_arrive, it.endLocAddress)
|
||||
// ToastUtils.showLong("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
ToastUtils.showShort(msg)
|
||||
//取消自动驾驶
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
//语音提示到站
|
||||
AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
// AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
AIAssist.getInstance(mContext).speakTTSVoice(msg)
|
||||
}
|
||||
}else{
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, mapOf("arriveErrorMsg" to "不在到站距离范围内", "ArriveAtStation" to arrivalNotification, "distanceFromSelf" to distanceFromSelf), true)
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.v2x.VipMessage
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.biz.R
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
@@ -259,7 +260,8 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
",bearing:$bearing" +
|
||||
",controlTime:$controlTime"
|
||||
,true)
|
||||
ToastUtils.showLong("服务异常,请稍后重试")
|
||||
// ToastUtils.showLong("服务异常,请稍后重试")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_biz_serve_error)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicStatusListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.R
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasListenerImpl
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
|
||||
import com.mogo.eagle.core.function.datacenter.autopilot.server.AsyncDataToAutopilotServer
|
||||
@@ -156,7 +157,8 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
override fun onStartServer() {
|
||||
ToastUtils.showShort("司机端服务启动成功!")
|
||||
// ToastUtils.showShort("司机端服务启动成功!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_datacenter_driver_service_started_successfully)
|
||||
if (timer == null) {
|
||||
timer = Timer()
|
||||
}
|
||||
@@ -175,7 +177,8 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
override fun onStopServer() {
|
||||
ToastUtils.showLong("司机端服务停止!")
|
||||
// ToastUtils.showLong("司机端服务停止!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_driver_service_stop)
|
||||
timer?.cancel()
|
||||
timer = null
|
||||
invokeNettyConnResult("司机端服务停止!")
|
||||
@@ -258,7 +261,8 @@ class MoGoAutopilotControlProvider :
|
||||
AsyncDataToAutopilotServer.INSTANCE.initServer()
|
||||
}.onFailure { throwable ->
|
||||
if (DebugConfig.isDebug()) {
|
||||
ToastUtils.showLong("AutoPilot出现异常,请立即处理!")
|
||||
// ToastUtils.showLong("AutoPilot出现异常,请立即处理!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_autopilot_exception)
|
||||
}
|
||||
throwable.printStackTrace()
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastMan
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.datacenter.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_D_C
|
||||
@@ -74,7 +75,7 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
CallerAutopilotCarConfigListenerManager.invokeAutopilotCertFileResult(certificationResult)
|
||||
}
|
||||
|
||||
private fun connectToast(reason: String) {
|
||||
private fun connectToast(reason: Int) {
|
||||
if (CallerIpcConnectStateToastManager.isToast) {
|
||||
ToastUtils.showShort(reason)
|
||||
}
|
||||
@@ -124,7 +125,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
AdasConstants.IpcConnectionStatus.CONNECTED -> {
|
||||
connectStatusDescribe = "已连接"
|
||||
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
|
||||
connectToast("域控已连接")
|
||||
// connectToast("域控已连接")
|
||||
connectToast(R.string.module_core_ipc_connection_status_connected)
|
||||
CallerIpcConnectStateToastManager.ipcConnected()
|
||||
// 初始化自动驾驶状态信息
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectIP =
|
||||
@@ -182,19 +184,22 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
AdasConstants.IpcConnectionStatus.CONNECTING -> {
|
||||
connectStatusDescribe = "连接中"
|
||||
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
|
||||
connectToast("域控连接中")
|
||||
// connectToast("域控连接中")
|
||||
connectToast(R.string.module_core_ipc_connection_status_connecting)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.RECONNECTING_TIMER -> {
|
||||
connectStatusDescribe = "重连中(定时器)"
|
||||
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
|
||||
connectToast("域控重连中")
|
||||
// connectToast("域控重连中")
|
||||
connectToast(R.string.module_core_ipc_connection_status_reconnecting)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.RECONNECTING_NETWORK -> {
|
||||
connectStatusDescribe = "重连中(网络监听)"
|
||||
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
|
||||
connectToast("域控重连中")
|
||||
// connectToast("域控重连中")
|
||||
connectToast(R.string.module_core_ipc_connection_status_reconnecting)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION -> {
|
||||
@@ -215,7 +220,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
connectStatusDescribe
|
||||
)
|
||||
resetArgs()
|
||||
connectToast("非法域控地址")
|
||||
// connectToast("非法域控地址")
|
||||
connectToast(R.string.module_core_ipc_connection_status_illegal_address)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.SEARCH_ADDRESS -> {
|
||||
@@ -224,7 +230,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
"$M_D_C$TAG",
|
||||
connectStatusDescribe
|
||||
)
|
||||
connectToast("正在搜索域控地址")
|
||||
// connectToast("正在搜索域控地址")
|
||||
connectToast(R.string.module_core_ipc_connection_status_search_address)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.NOT_FOUND_ADDRESS -> {
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.mogo.eagle.core.function.call.och.CallerOchBizFunctionCall4EagleManag
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -518,7 +519,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, it.body)
|
||||
}
|
||||
TelematicConstant.PASSENGER_APP_REBOOT -> {
|
||||
ToastUtils.showLong("乘客屏已收到重启命令")
|
||||
// ToastUtils.showLong("乘客屏已收到重启命令")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_received_restart_command)
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
@@ -550,7 +552,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
isReceiveSN = false
|
||||
}
|
||||
// AdasManager.getInstance().startDispatchHandler()
|
||||
ToastUtils.showShort("连接司机屏成功!")
|
||||
// ToastUtils.showShort("连接司机屏成功!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_datacenter_passenger_link_driver_success)
|
||||
invokeReqStatusLog(mapOf("dpConnectStatus" to true))
|
||||
val byteArray = byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
|
||||
@@ -567,7 +570,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
isFirstDisc = false
|
||||
AppConfigInfo.plateNumber = ""
|
||||
AppConfigInfo.iPCMacAddress = ""
|
||||
ToastUtils.showLong("断开和司机屏的连接!")
|
||||
// ToastUtils.showLong("断开和司机屏的连接!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_disconnect_driver)
|
||||
invokeReqStatusLog(mapOf("dpConnectStatus" to false))
|
||||
AdasManager.getInstance().stopDispatchHandler()
|
||||
}
|
||||
@@ -575,7 +579,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
|
||||
ConnectState.STATUS_CONNECT_ERROR -> {
|
||||
AppConfigInfo.plateNumber = ""
|
||||
ToastUtils.showLong("和司机端连接异常!")
|
||||
// ToastUtils.showLong("和司机端连接异常!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_connect_driver_error)
|
||||
invokeReqStatusLog(mapOf("dpConnectErrorMsg" to "$content"))
|
||||
AdasManager.getInstance().stopDispatchHandler()
|
||||
}
|
||||
|
||||
@@ -192,10 +192,12 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration)
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort("工控机连接状态异常")
|
||||
// ToastUtils.showShort("工控机连接状态异常")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_adas_connect_error)
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort("网络异常,请检查网络")
|
||||
// ToastUtils.showShort("网络异常,请检查网络")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_network_error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,13 +275,16 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
reportTypeWindow?.showFloatWindow(xPosition,yPosition)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("工控机连接状态异常")
|
||||
// ToastUtils.showShort("工控机连接状态异常")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_adas_connect_error)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("网络异常,请检查网络")
|
||||
// ToastUtils.showShort("网络异常,请检查网络")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_network_error)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_do_no_click_continuously)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -324,13 +329,16 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
caseListDialog.show()
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("工控机连接状态异常")
|
||||
// ToastUtils.showShort("工控机连接状态异常")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_adas_connect_error)
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("网络异常,请检查网络")
|
||||
// ToastUtils.showShort("网络异常,请检查网络")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_network_error)
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_do_no_click_continuously)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -355,13 +363,16 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
})
|
||||
aiDataCollectWindow.showFloatWindow()
|
||||
} else {
|
||||
ToastUtils.showShort("工控机连接状态异常")
|
||||
// ToastUtils.showShort("工控机连接状态异常")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_adas_connect_error)
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("网络异常,请检查网络")
|
||||
// ToastUtils.showShort("网络异常,请检查网络")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_network_error)
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_bad_case_do_no_click_continuously)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -137,7 +137,8 @@ class AIDataCollectView @JvmOverloads constructor(
|
||||
//上报
|
||||
tvUpload.setOnClickListener {
|
||||
if(collectList.isEmpty()){
|
||||
ToastUtils.showShort("请选择最少一个原因")
|
||||
// ToastUtils.showShort("请选择最少一个原因")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_last_chose_one)
|
||||
return@setOnClickListener
|
||||
}
|
||||
collectReason.clear()
|
||||
@@ -170,7 +171,8 @@ class AIDataCollectView @JvmOverloads constructor(
|
||||
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
TipToast.shortTip("上报失败")
|
||||
// TipToast.shortTip("上报失败")
|
||||
TipToast.shortTip(R.string.module_core_reporting_failed)
|
||||
} else {
|
||||
//上报成功
|
||||
ThreadUtils.runOnUiThread {
|
||||
@@ -270,7 +272,8 @@ class AIDataCollectView @JvmOverloads constructor(
|
||||
|
||||
override fun onAiDataError() {
|
||||
if(BadCaseReasonStore.getAiDataRecord().isEmpty()){
|
||||
ToastUtils.showShort("AI数据采集数据请求错误且无缓存数据可用")
|
||||
// ToastUtils.showShort("AI数据采集数据请求错误且无缓存数据可用")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_ai_data_gather_error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,8 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
//上报
|
||||
tvCollectReport.setOnClickListener {
|
||||
if(collectList.isEmpty()){
|
||||
ToastUtils.showShort("请选择最少一个原因")
|
||||
// ToastUtils.showShort("请选择最少一个原因")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_last_chose_one)
|
||||
return@setOnClickListener
|
||||
}
|
||||
collectReason.clear()
|
||||
@@ -196,9 +197,11 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
TipToast.shortTip("上报失败")
|
||||
// TipToast.shortTip("上报失败")
|
||||
TipToast.shortTip(R.string.module_core_reporting_failed)
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
// TipToast.shortTip("上报成功")
|
||||
TipToast.shortTip(R.string.module_core_reporting_success)
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey?.let {
|
||||
val descReqEntity = BagDescriptionEntity(collectReason.toString(),false,"",true)
|
||||
@@ -343,7 +346,8 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
|
||||
override fun onAiDataError() {
|
||||
if(BadCaseReasonStore.getAiDataRecord().isEmpty()){
|
||||
ToastUtils.showShort("AI数据采集数据请求错误且无缓存数据可用")
|
||||
// ToastUtils.showShort("AI数据采集数据请求错误且无缓存数据可用")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_ai_data_gather_error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,19 +95,23 @@ internal class BadCaseConfigView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
if (mPreviousDuration < 0 || mPreviousDuration > 30) {
|
||||
ToastUtils.showLong("前溯采集时长最长30S")
|
||||
// ToastUtils.showLong("前溯采集时长最长30S")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_bad_case_previous_duration)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (mBackDuration < 0 || mBackDuration > 300) {
|
||||
ToastUtils.showLong("采集总时长最长300S")
|
||||
// ToastUtils.showLong("采集总时长最长300S")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_bad_case_Back_duration_max)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if ((mPreviousDuration + mBackDuration) < 5) {
|
||||
ToastUtils.showLong("采集总时长最短5S")
|
||||
// ToastUtils.showLong("采集总时长最短5S")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_bad_case_Back_duration_min)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if ((mPreviousDuration + mBackDuration) > 300) {
|
||||
ToastUtils.showLong("采集总时长最长300S")
|
||||
// ToastUtils.showLong("采集总时长最长300S")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_bad_case_all)
|
||||
return@setOnClickListener
|
||||
}
|
||||
BadCaseConfig.previousDuration = mPreviousDuration
|
||||
@@ -115,7 +119,8 @@ internal class BadCaseConfigView @JvmOverloads constructor(
|
||||
BadCaseConfig.totalDuration =
|
||||
BadCaseConfig.previousDuration + BadCaseConfig.backDuration
|
||||
} catch (e: Exception) {
|
||||
ToastUtils.showLong("输入时间格式不合法,请重新输入")
|
||||
// ToastUtils.showLong("输入时间格式不合法,请重新输入")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_input_time_illegality)
|
||||
etInitiativePreTime.text = null
|
||||
etInitiativeAfterTime.text = null
|
||||
return@setOnClickListener
|
||||
@@ -125,7 +130,8 @@ internal class BadCaseConfigView @JvmOverloads constructor(
|
||||
//保存录制模板采集类型
|
||||
BadCaseConfig.type = mType
|
||||
//吐司提示保存成功
|
||||
ToastUtils.showLong("保存成功")
|
||||
// ToastUtils.showLong("保存成功")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_save_success)
|
||||
//关闭配置窗口
|
||||
clickListener?.onClose()
|
||||
}
|
||||
|
||||
@@ -143,7 +143,8 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
bagUploadDialog?.show()
|
||||
bagUploadDialog?.setAllUpload(selectedBagNum,selectedBagSize)
|
||||
}else{
|
||||
ToastUtils.showShort("请先选择要上传的Bag包")
|
||||
// ToastUtils.showShort("请先选择要上传的Bag包")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_upload_bag)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -154,7 +155,8 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
bagManagerEntity.keyReq = bagManagerList[0].key
|
||||
CallerAutoPilotControlManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}else{
|
||||
ToastUtils.showShort("请先选择要删除的Bag包")
|
||||
// ToastUtils.showShort("请先选择要删除的Bag包")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_del_bag)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -412,32 +414,43 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
//上传Cos执行完成
|
||||
if(bagManagerList.size == 0 && selectedBagNum != 0){
|
||||
ToastUtils.showShort("上传命令完成")
|
||||
// ToastUtils.showShort("上传命令完成")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_bag_complete)
|
||||
bagUploadDialog?.uploadCompleted()
|
||||
tvCancelSelect.performClick()
|
||||
}
|
||||
|
||||
when (bagManager.uploadCosResp.stat) {
|
||||
0 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶成功")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_cos_success, "${bagManager.uploadCosResp.key}")
|
||||
}
|
||||
1 -> {
|
||||
//执行中
|
||||
}
|
||||
2 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶执行python失败")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶执行python失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_cos_python_fail, "${bagManager.uploadCosResp.key}")
|
||||
}
|
||||
3 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶拷贝过程失败")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶拷贝过程失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_cos_copy_fail, "${bagManager.uploadCosResp.key}")
|
||||
}
|
||||
4 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶合并过程失败")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶合并过程失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_cos_merge_fail, "${bagManager.uploadCosResp.key}")
|
||||
}
|
||||
5 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶上传过程失败")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶上传过程失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_upload_cos_fail, "${bagManager.uploadCosResp.key}")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶 ${bagManager.uploadCosResp.message}")
|
||||
// ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶 ${bagManager.uploadCosResp.message}")
|
||||
ToastUtils.showShort(
|
||||
R.string.module_mogo_core_function_devatools_upload_cos,
|
||||
"${bagManager.uploadCosResp.key}",
|
||||
bagManager.uploadCosResp.message
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,8 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
if (recordType != null) {
|
||||
Boolean success = CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(2, recordType.getId(), addTopicList);
|
||||
if (Boolean.TRUE.equals(success)) {
|
||||
ToastUtils.showShort("Topic设置成功");
|
||||
// ToastUtils.showShort("Topic设置成功");
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_topic_set_success);
|
||||
if (recordType.getId() == 0) {
|
||||
//自定义Topic
|
||||
BadCaseConfig.customTopicList.clear();
|
||||
@@ -173,7 +174,8 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
recordType.getTopicsList().removeAll(allTopicList);
|
||||
dismiss();
|
||||
} else {
|
||||
ToastUtils.showShort("Topic设置失败");
|
||||
// ToastUtils.showShort("Topic设置失败");
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_topic_set_fail);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -206,7 +206,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
//上报
|
||||
tvInitiativeReport.setOnClickListener {
|
||||
if(uploadList.isEmpty()){
|
||||
ToastUtils.showShort("请选择最少一个原因")
|
||||
// ToastUtils.showShort("请选择最少一个原因")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_last_chose_one)
|
||||
return@setOnClickListener
|
||||
}
|
||||
uploadReason.clear()
|
||||
@@ -257,7 +258,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +336,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
audioFileName = "Audio_${System.currentTimeMillis()}_BadCase"
|
||||
@@ -389,7 +392,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
}
|
||||
|
||||
override fun onUploadFail(filePath: String) {
|
||||
TipToast.shortTip("上传语音文件失败")
|
||||
// TipToast.shortTip("上传语音文件失败")
|
||||
TipToast.shortTip(R.string.module_core_upload_voice_file_failed)
|
||||
//将语音文件上传Cos监听移除
|
||||
removeUploadListener(singlePath)
|
||||
}
|
||||
@@ -444,12 +448,14 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
itx["coordinate"] = "latitude:${getChassisLocationWGS84().latitude};longitude:${getChassisLocationWGS84().longitude}" //坐标
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
TipToast.shortTip("上报失败")
|
||||
// TipToast.shortTip("上报失败")
|
||||
TipToast.shortTip(R.string.module_core_reporting_failed)
|
||||
ThreadUtils.runOnUiThread {
|
||||
tvInitiativeReport.text = "上报"
|
||||
}
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
// TipToast.shortTip("上报成功")
|
||||
TipToast.shortTip(R.string.module_core_reporting_success)
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey.let {
|
||||
val hasAudio = downloadUrl != null
|
||||
@@ -603,7 +609,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
|
||||
override fun onInitiativeError() {
|
||||
if(BadCaseReasonStore.getInitiativeDataRecord().isEmpty()){
|
||||
ToastUtils.showShort("主动录包数据采集错误且无缓存数据可用")
|
||||
// ToastUtils.showShort("主动录包数据采集错误且无缓存数据可用")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_initiative_record_bad_fail)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
tvPassiveReport.setOnClickListener {
|
||||
hasOperated = true
|
||||
if(uploadList.isEmpty()){
|
||||
TipToast.shortTip("请选择至少一个Case")
|
||||
// TipToast.shortTip("请选择至少一个Case")
|
||||
TipToast.shortTip(R.string.module_core_please_choose_noe_case)
|
||||
return@setOnClickListener
|
||||
}
|
||||
uploadReason.clear()
|
||||
@@ -259,7 +260,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private val mInitListener = InitListener { code ->
|
||||
Log.i(TAG, "SpeechRecognizer init() code = $code")
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +339,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
audioFileName = "Audio_${System.currentTimeMillis()}_BadCase"
|
||||
@@ -392,7 +395,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
}
|
||||
|
||||
override fun onUploadFail(filePath: String) {
|
||||
TipToast.shortTip("上传语音文件失败")
|
||||
// TipToast.shortTip("上传语音文件失败")
|
||||
TipToast.shortTip(R.string.module_core_upload_voice_file_failed)
|
||||
//将语音文件上传Cos监听移除
|
||||
removeUploadListener(singlePath)
|
||||
}
|
||||
@@ -449,12 +453,14 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
TipToast.shortTip("上报失败")
|
||||
// TipToast.shortTip("上报失败")
|
||||
TipToast.shortTip(R.string.module_core_reporting_failed)
|
||||
ThreadUtils.runOnUiThread{
|
||||
tvPassiveReport.text = "上报"
|
||||
}
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
// TipToast.shortTip("上报成功")
|
||||
TipToast.shortTip(R.string.module_core_reporting_success)
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey?.let {
|
||||
val hasAudio = downloadUrl != null
|
||||
@@ -571,7 +577,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
|
||||
override fun onPassiveError() {
|
||||
if(BadCaseReasonStore.getPassiveDataRecord().isEmpty()){
|
||||
ToastUtils.showShort("被动录包数据采集错误且无缓存数据可用")
|
||||
// ToastUtils.showShort("被动录包数据采集错误且无缓存数据可用")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_passivity_record_bad_fail)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,8 @@ class BagManagerListAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
if(RecordBitmapUtils.checkHasImage(bagInfoEntity.key)){
|
||||
bagClickListener?.lookMapScreen(bagInfoEntity.key)
|
||||
}else{
|
||||
ToastUtils.showShort("该截图录制失败或已删除")
|
||||
// ToastUtils.showShort("该截图录制失败或已删除")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_record_bitmap_fail)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,8 @@ class BindingCarNetWorkManager private constructor() {
|
||||
when (info.getData().compare) {
|
||||
"0" -> showBindingCarDialog()
|
||||
"3" -> showModifyBindingCarDialog()
|
||||
"null" -> TipToast.shortTip("当前工控机没有入库")
|
||||
// "null" -> TipToast.shortTip("当前工控机没有入库")
|
||||
"null" -> TipToast.shortTip(R.string.module_core_ipc_not_db)
|
||||
}
|
||||
// updateCarVrIconRes(info.getData().brandId)
|
||||
} else {
|
||||
|
||||
@@ -25,12 +25,14 @@ import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.core.log.record.LogcatManager
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.zhidao.loglib.bean.RemoteLogPushContent
|
||||
import com.zhidao.loglib.call.LogInfoManagerFactory
|
||||
import com.zhidao.loglib.core.ILogListener
|
||||
import com.zhidao.loglib.core.LogInfoManager
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.logcat.config.LogRecordConfig
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.CACHE_MAP_UPLOAD
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.CACHE_TRACE_UPLOAD
|
||||
@@ -114,27 +116,33 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
obj.pkgName = mContext?.packageName
|
||||
when (obj.type) {
|
||||
START_CATCH_LOG -> if (!catchingList.contains(obj.pkgName)) {
|
||||
TipToast.longTip("云端下发抓取日志,时间:${obj.duration}分钟")
|
||||
// TipToast.longTip("云端下发抓取日志,时间:${obj.duration}分钟")
|
||||
TipToast.longTip(StringUtils.getString(R.string.module_core_cloud_send_get_log, obj.duration))
|
||||
startCatchLog(obj.duration)
|
||||
}
|
||||
STOP_CATCH_LOG -> {
|
||||
TipToast.longTip("云端下发停止抓取日志")
|
||||
// TipToast.longTip("云端下发停止抓取日志")
|
||||
TipToast.longTip(R.string.module_core_cloud_stop_send_get_log)
|
||||
stopCatchLog(obj)
|
||||
}
|
||||
LOCAL_CONFIG_OPEN_LOG -> {
|
||||
TipToast.longTip("云端下发打开日志开关")
|
||||
// TipToast.longTip("云端下发打开日志开关")
|
||||
TipToast.longTip(R.string.module_core_cloud_send_open_log_switch)
|
||||
openLoggerLevel()
|
||||
}
|
||||
LOCAL_CONFIG_CLOSE_LOG -> {
|
||||
TipToast.longTip("云端下发关闭日志开关")
|
||||
// TipToast.longTip("云端下发关闭日志开关")
|
||||
TipToast.longTip(R.string.module_core_cloud_send_close_log_switch)
|
||||
closeLoggerLevel()
|
||||
}
|
||||
CACHE_TRACE_UPLOAD -> {
|
||||
TipToast.longTip("上传本地缓存链路日志")
|
||||
// TipToast.longTip("上传本地缓存链路日志")
|
||||
TipToast.longTip(R.string.module_core_upload_cache_log)
|
||||
LogInfoManagerFactory.cacheTraceLogUpload()
|
||||
}
|
||||
CACHE_MAP_UPLOAD -> {
|
||||
TipToast.longTip("上传本地地图缓存日志")
|
||||
// TipToast.longTip("上传本地地图缓存日志")
|
||||
TipToast.longTip(R.string.module_core_upload_cache_map_log)
|
||||
mapCacheUpload = true
|
||||
}
|
||||
LOCAL_CONFIG_CLOSE_SINGLE_FW -> {
|
||||
@@ -200,7 +208,8 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
@BizConfig(FOUNDATION, "", BIZ_FULL_LOG)
|
||||
fun startCatchLog(duration: Int = 10, logPrefixName: String? = null) {
|
||||
if (catchingList.contains(manualContent.pkgName + logPrefixName)) {
|
||||
TipToast.shortTip("已经在抓取日志了,请稍后再试")
|
||||
// TipToast.shortTip("已经在抓取日志了,请稍后再试")
|
||||
TipToast.shortTip(R.string.module_core_started_capture_log)
|
||||
} else {
|
||||
CallerLogger.d("$M_DEVA$TAG", "开始抓取日志==== duration : $duration")
|
||||
manualContent.type = START_CATCH_LOG
|
||||
@@ -220,7 +229,8 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
CallerLogger.d("$M_DEVA$TAG", "startCatchLog path : ${content.pkgName + logPrefixName}")
|
||||
if (SharedPrefsMgr.getInstance().sn == null) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
TipToast.shortTip("缺少设备唯一ID,请检查网络")
|
||||
// TipToast.shortTip("缺少设备唯一ID,请检查网络")
|
||||
TipToast.shortTip(R.string.module_core_device_not_uuid)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -330,7 +340,8 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
|
||||
override fun onError(errorCount: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
TipToast.shortTip("日志抓取出现错误,出错数量:$errorCount")
|
||||
// TipToast.shortTip("日志抓取出现错误,出错数量:$errorCount")
|
||||
TipToast.shortTip(StringUtils.getString(R.string.module_core_get_log_error, errorCount))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,7 +322,8 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen
|
||||
MoFangAnalyticUtils.track(EVENT_MOFANG_CONNECT, mutableMapOf(EVENT_MOFANG_CONNECT_PARAMS_SETTING_REQ to "${System.currentTimeMillis()}"))
|
||||
linkedLog.record(mapOf("callback" to "onBluetoothSettingRequest"))
|
||||
UiThreadHandler.post {
|
||||
Toast.makeText(Utils.getApp(), "检测到魔方未正确连接,请在系统蓝牙设置页面,找到魔方并配对连接...", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(Utils.getApp(), "检测到魔方未正确连接,请在系统蓝牙设置页面,找到魔方并配对连接...", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(Utils.getApp(), com.mogo.eagle.core.widget.R.string.module_core_mofang_connect_error, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import java.util.*
|
||||
|
||||
class MonitorManager private constructor(var context: Context) {
|
||||
@@ -46,9 +47,11 @@ class MonitorManager private constructor(var context: Context) {
|
||||
}
|
||||
}, 1000, 60000)
|
||||
isStarted = true
|
||||
ToastUtils.showShort("性能监控启动成功!")
|
||||
// ToastUtils.showShort("性能监控启动成功!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_start_monitor_success)
|
||||
} else {
|
||||
ToastUtils.showShort("性能监控已启动,请勿重复启动!")
|
||||
// ToastUtils.showShort("性能监控已启动,请勿重复启动!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_monitor_started)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,6 +62,7 @@ class MonitorManager private constructor(var context: Context) {
|
||||
timer?.cancel()
|
||||
timer = null
|
||||
isStarted = false
|
||||
ToastUtils.showShort("性能监控停止成功!")
|
||||
// ToastUtils.showShort("性能监控停止成功!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_stop_monitor_success)
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import system_master.SsmInfo
|
||||
@@ -93,7 +94,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
|
||||
}
|
||||
}else if(msg.what == 4){
|
||||
if(shouldToast && secondVersionShouldToast){
|
||||
ToastUtils.showLong("暂无待升级任务!")
|
||||
// ToastUtils.showLong("暂无待升级任务!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_not_upgrade_task)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +227,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
|
||||
//冷启动未完成(进行中),或驾驶状态为自驾状态,或当前有订单,直接默认选择稍后升级,
|
||||
// 并toast提示“收到车辆部署任务,请在车辆空闲时发起升级”
|
||||
CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.DELAY)
|
||||
ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
// ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_receive_upgrade_task)
|
||||
}
|
||||
OTAUpgradeConfig.promptedUpgrade.add(request.otaToken)
|
||||
}
|
||||
@@ -361,7 +364,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
|
||||
//冷启动未完成(进行中),或驾驶状态为自驾状态,或当前有订单,直接默认选择稍后升级,
|
||||
// 并toast提示“收到车辆部署任务,请在车辆空闲时发起升级”
|
||||
CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.DELAY)
|
||||
ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
// ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_receive_upgrade_task)
|
||||
}
|
||||
OTAUpgradeConfig.promptedUpgrade.add(status.otaInfo.otaToken)
|
||||
}
|
||||
@@ -445,7 +449,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
|
||||
val cmd = jsonObject.optString("cmd")
|
||||
//无升级任务
|
||||
if("ASK_PAD_NO_UPGRADE" == cmd){
|
||||
ToastUtils.showShort("暂无OTA升级任务")
|
||||
// ToastUtils.showShort("暂无OTA升级任务")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_not_ota_task)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -521,7 +526,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
|
||||
Log.i(TAG,query.toString())
|
||||
CallerAutoPilotControlManager.sendOtaPadMsgQuery(query.toString())
|
||||
|
||||
ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
// ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_receive_upgrade_task)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.mogo.eagle.core.utilcode.util.IAppStateListener
|
||||
import com.mogo.eagle.core.utilcode.util.PermissionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.OverViewStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.toState
|
||||
@@ -156,7 +157,8 @@ internal class OverViewImpl(ctx: Context) : IFlow<OverViewStatus>(ctx),
|
||||
}
|
||||
|
||||
override fun onDenied() {
|
||||
ToastUtils.showShort("定位权限被拒绝, 可能导致RTK定位不准确,请开启~")
|
||||
// ToastUtils.showShort("定位权限被拒绝, 可能导致RTK定位不准确,请开启~")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_not_location_permission)
|
||||
isGpsException = true
|
||||
send(OverViewStatus(true))
|
||||
CallerDevaToolsListenerManager.invokeGpsStatus(false)
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.util.*
|
||||
import androidx.core.location.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.PermissionUtils.SimpleCallback
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.GpsStatus
|
||||
import java.util.concurrent.atomic.*
|
||||
@@ -71,7 +72,8 @@ internal class GpsImpl(ctx: Context): IFlow<GpsStatus>(ctx) {
|
||||
}
|
||||
|
||||
override fun onDenied() {
|
||||
ToastUtils.showShort("定位权限被拒绝, 可能导致RTK定位不准确,请开启~")
|
||||
// ToastUtils.showShort("定位权限被拒绝, 可能导致RTK定位不准确,请开启~")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_not_location_permission)
|
||||
send(enabled = isLocationEnabled(), isGranted = false)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -189,7 +189,8 @@ class UpgradeAppNetWorkManager private constructor() {
|
||||
mDownloadRequested = true
|
||||
try {
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(Utils.getApp(), "检测到新版本[${info.result.versionName}]并且当前设备支持静默升级,开始下载新版本...", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(Utils.getApp(), "检测到新版本[${info.result.versionName}]并且当前设备支持静默升级,开始下载新版本...", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(Utils.getApp(),com.mogo.eagle.core.widget.R.string.module_core_find_new_version_quiesce_install , Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.weak.network.SdtManager
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock
|
||||
|
||||
@@ -97,7 +98,8 @@ object WeakNetworkStrategy {
|
||||
invokeWeakResult("url为:$url, 耗时为:$timeStamp${if (isFail) " 连接失败!" else ""}")
|
||||
}
|
||||
if (timeStamp >= WEAK_HTTP_RTT) {
|
||||
ToastUtils.showShort("当前网络质量差!")
|
||||
// ToastUtils.showShort("当前网络质量差!")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_network_bad_quality)
|
||||
} else if (timeStamp in 300 until WEAK_HTTP_RTT) {
|
||||
// invokeWeakResult("url为:$url, 耗时为:$timeStamp${if (isFail) " 连接失败!" else ""}")
|
||||
SdtManager.startActiveCheck()
|
||||
|
||||
@@ -233,7 +233,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
//故障类型选择
|
||||
tvFaultType.setOnClickListener {
|
||||
if (!hasLevel2) {
|
||||
ToastUtils.showShort("运营后台没有配置故障类型")
|
||||
// ToastUtils.showShort("运营后台没有配置故障类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_operation_not_configured_fault_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (faultTypeSelectStatus) {
|
||||
@@ -273,7 +274,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
//故障原因选择
|
||||
tvFaultReason.setOnClickListener {
|
||||
if (tvFaultType.text.isEmpty()) {
|
||||
ToastUtils.showShort("请先选择故障类型")
|
||||
// ToastUtils.showShort("请先选择故障类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_operation_choose_fault_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (faultReasonSelectStatus) {
|
||||
@@ -305,7 +307,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
}
|
||||
ivTimeAdd.setOnClickListener {
|
||||
if (workOrderOccurrenceTime + 60000 > System.currentTimeMillis()) {
|
||||
ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
// ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_occurrence_time_should_be_before_current_time)
|
||||
return@setOnClickListener
|
||||
}
|
||||
workOrderOccurrenceTime += 60000
|
||||
@@ -358,11 +361,13 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
//上报
|
||||
tvFaultReport.setOnClickListener {
|
||||
if (level2Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
// ToastUtils.showShort("请完整填写再上报")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_complete_submit_again)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (hasLevel3 && level3Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
// ToastUtils.showShort("请完整填写再上报")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_complete_submit_again)
|
||||
return@setOnClickListener
|
||||
}
|
||||
reportNote = etNoteInput.text.toString()
|
||||
@@ -421,7 +426,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
@@ -450,7 +456,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,7 +599,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
|
||||
override fun problemPadAddError(msg: String) {
|
||||
super.problemPadAddError(msg)
|
||||
ToastUtils.showShort("故障原因上报失败$msg")
|
||||
// ToastUtils.showShort("故障原因上报失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cause_upload_fail, msg)
|
||||
}
|
||||
|
||||
override fun getCategoriesSuccess(list: List<CategoryInfo>) {
|
||||
@@ -627,7 +635,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
hasLevel3 = false
|
||||
} else {
|
||||
hasLevel2 = false
|
||||
ToastUtils.showShort("故障类型列表为空")
|
||||
// ToastUtils.showShort("故障类型列表为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_type_list_empty)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -635,6 +644,7 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
// ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_list_get_fail, msg)
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,8 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
//一键上报
|
||||
ivOneClickReport.setOnClickListener {
|
||||
if(!canOneReport){
|
||||
ToastUtils.showShort("故障描述获取失败不能上报")
|
||||
// ToastUtils.showShort("故障描述获取失败不能上报")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_des_get_fail)
|
||||
return@setOnClickListener
|
||||
}
|
||||
hasReportOperate = true
|
||||
@@ -185,7 +186,8 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
clickListener?.closeWindow()
|
||||
},1500)
|
||||
}else{
|
||||
ToastUtils.showShort("主动录包命令下发失败")
|
||||
// ToastUtils.showShort("主动录包命令下发失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_initiative_record_bad_cmd_send_fail)
|
||||
clickListener?.closeWindow()
|
||||
}
|
||||
}
|
||||
@@ -316,14 +318,16 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
|
||||
override fun problemPadAddError(msg: String) {
|
||||
super.problemPadAddError(msg)
|
||||
ToastUtils.showShort("故障原因上报失败$msg")
|
||||
// ToastUtils.showShort("故障原因上报失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cause_upload_fail, msg)
|
||||
clickListener?.closeWindow()
|
||||
}
|
||||
|
||||
override fun getCategoriesSuccess(list: List<CategoryInfo>) {
|
||||
super.getCategoriesSuccess(list)
|
||||
if(list.isEmpty()){
|
||||
ToastUtils.showShort("一键上报故障描述后台未配置")
|
||||
// ToastUtils.showShort("一键上报故障描述后台未配置")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cloud_not_configured)
|
||||
canOneReport = false
|
||||
}else{
|
||||
when (level) {
|
||||
@@ -352,7 +356,8 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("一键上报故障描述获取失败$msg")
|
||||
// ToastUtils.showShort("一键上报故障描述获取失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_desc_get_fail, msg)
|
||||
canOneReport = false
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
//接管类型选择
|
||||
tvTakeOverType.setOnClickListener {
|
||||
if(!hasLevel2){
|
||||
ToastUtils.showShort("运营后台没有配置接管类型")
|
||||
// ToastUtils.showShort("运营后台没有配置接管类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_cloud_not_take_over_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(faultTypeSelectStatus){
|
||||
@@ -238,7 +239,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
//接管原因选择
|
||||
tvTakeOverReason.setOnClickListener {
|
||||
if(tvTakeOverType.text.isEmpty()){
|
||||
ToastUtils.showShort("请先选择接管类型")
|
||||
// ToastUtils.showShort("请先选择接管类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_take_over_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(faultReasonSelectStatus){
|
||||
@@ -299,11 +301,13 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
//保存
|
||||
tvTakeOverSave.setOnClickListener{
|
||||
if(level2Name.isEmpty()){
|
||||
ToastUtils.showShort("请完整填写再保存")
|
||||
// ToastUtils.showShort("请完整填写再保存")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_input_save)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(hasLevel3 && level3Name.isEmpty()){
|
||||
ToastUtils.showShort("请完整填写再保存")
|
||||
// ToastUtils.showShort("请完整填写再保存")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_input_save)
|
||||
return@setOnClickListener
|
||||
}
|
||||
mTakeOverRecordInfo.reportNote = etNoteInput.text.toString()
|
||||
@@ -347,7 +351,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
@@ -372,7 +377,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,7 +561,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
hasLevel3 = false
|
||||
}else{
|
||||
hasLevel2 = false
|
||||
ToastUtils.showShort("接管类型列表为空")
|
||||
// ToastUtils.showShort("接管类型列表为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_take_over_type_list_empty)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,7 +570,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("接管列表获取失败:$msg")
|
||||
// ToastUtils.showShort("接管列表获取失败:$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_take_over_type_list_get_error, msg)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,7 +101,8 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
})
|
||||
}
|
||||
if(takeOverReasonWindow?.getWindowShowStatus() == true){
|
||||
ToastUtils.showShort("接管原因弹窗已存在,请先编辑现有接管原因")
|
||||
// ToastUtils.showShort("接管原因弹窗已存在,请先编辑现有接管原因")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_take_over_window_showing)
|
||||
}else{
|
||||
takeOverReasonWindow?.showFloatWindow(takeOverRecordInfo)
|
||||
}
|
||||
@@ -129,7 +130,8 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
tvUpload.setOnClickListener {
|
||||
if (ClickUtils.isFastClick()){
|
||||
if(selectedUploadRecord.isEmpty()){
|
||||
ToastUtils.showShort("请选择需要上传的接管记录")
|
||||
// ToastUtils.showShort("请选择需要上传的接管记录")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_take_over_info)
|
||||
}else{
|
||||
val recordIterator = selectedUploadRecord.iterator()
|
||||
val padProblemList= ArrayList<PadTakeOverInfo>()
|
||||
@@ -137,7 +139,8 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
val uploadRecord = recordIterator.next()
|
||||
uploadRecord.let {
|
||||
if(it.level1Id == 0 || it.level2Id == 0 || it.level3Id == 0){
|
||||
ToastUtils.showShort("请编辑选中的接管记录")
|
||||
// ToastUtils.showShort("请编辑选中的接管记录")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_edit_take_over_info)
|
||||
return@setOnClickListener
|
||||
}
|
||||
val reason = if(it.reportNote.isEmpty()){
|
||||
@@ -158,13 +161,15 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
CallerDevaToolsManager.takeOverPadAdd(padAddProblemReq)
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请勿快速点击")
|
||||
// ToastUtils.showShort("请勿快速点击")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_dot_quick_click)
|
||||
}
|
||||
}
|
||||
//删除
|
||||
tvDeleteSelect.setOnClickListener {
|
||||
if(selectedUploadRecord.isEmpty()){
|
||||
ToastUtils.showShort("请选择需要删除的接管记录")
|
||||
// ToastUtils.showShort("请选择需要删除的接管记录")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_del_take_over_info)
|
||||
}else{
|
||||
scope.launch(Dispatchers.IO){
|
||||
CallerTakeOverRecordEventManager.invokeRemoveRecord(selectedUploadRecord)
|
||||
@@ -227,7 +232,8 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
|
||||
override fun problemPadAddSuccess() {
|
||||
super.problemPadAddSuccess()
|
||||
ToastUtils.showShort("接管记录上传成功")
|
||||
// ToastUtils.showShort("接管记录上传成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_take_over_info_upload_success)
|
||||
//更新记录状态并且刷新列表
|
||||
ThreadUtils.runOnUiThread {
|
||||
selectedUploadRecord.forEach {
|
||||
@@ -243,7 +249,8 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
|
||||
override fun problemPadAddError(msg: String) {
|
||||
super.problemPadAddError(msg)
|
||||
ToastUtils.showShort("接管记录上传失败$msg")
|
||||
// ToastUtils.showShort("接管记录上传失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_take_over_info_upload_fail, msg)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,7 +74,8 @@ class TakeOverSceneWindow constructor(activity: Activity) {
|
||||
//前一个场景
|
||||
ivScenePrevious.setOnClickListener {
|
||||
if(currentIndex == 0){
|
||||
ToastUtils.showShort("没有上一个场景了")
|
||||
// ToastUtils.showShort("没有上一个场景了")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_none_last_scene)
|
||||
}else{
|
||||
currentIndex = (currentIndex-1).coerceAtLeast(0)
|
||||
vpSceneImage.currentItem = currentIndex
|
||||
@@ -86,7 +87,8 @@ class TakeOverSceneWindow constructor(activity: Activity) {
|
||||
currentIndex = (currentIndex + 1).coerceAtMost(2)
|
||||
vpSceneImage.currentItem = currentIndex
|
||||
}else{
|
||||
ToastUtils.showShort("没有下一个场景了")
|
||||
// ToastUtils.showShort("没有下一个场景了")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_none_last_scene)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,8 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
}
|
||||
ivTimeAdd.setOnClickListener {
|
||||
if(workOrderOccurrenceTime + 60000 > System.currentTimeMillis()){
|
||||
ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
// ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_occurrence_time_should_be_before_current_time)
|
||||
return@setOnClickListener
|
||||
}
|
||||
workOrderOccurrenceTime += 60000
|
||||
@@ -209,11 +210,13 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
tvWorkOrderReport.setOnClickListener {
|
||||
//工单问题类型必选,没有选择,进行提示
|
||||
if(workOrderType.isEmpty()){
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
// ToastUtils.showShort("请选择问题类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(etDescribeInput.text.toString().isEmpty()){
|
||||
ToastUtils.showShort("请填写问题描述")
|
||||
// ToastUtils.showShort("请填写问题描述")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_desc)
|
||||
return@setOnClickListener
|
||||
}
|
||||
GlobalScope.launch(Dispatchers.IO){
|
||||
@@ -254,7 +257,8 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
@@ -278,7 +282,8 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,12 +391,14 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
}
|
||||
|
||||
override fun workOrderReportSuccess() {
|
||||
ToastUtils.showShort("工单上报成功")
|
||||
// ToastUtils.showShort("工单上报成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_work_order_upload_success)
|
||||
hideFloatWindow()
|
||||
}
|
||||
|
||||
override fun workOrderReportError() {
|
||||
ToastUtils.showShort("工单上报失败")
|
||||
// ToastUtils.showShort("工单上报失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_work_order_upload_fail)
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
|
||||
@@ -78,7 +78,8 @@ class TakeOverListAdapter(private val context: Context): RecyclerView.Adapter<Ta
|
||||
clickListener?.onSelectRecord(recordEntity,isChecked)
|
||||
}
|
||||
holder.ivCannotCheck.setOnClickListener {
|
||||
ToastUtils.showShort("该条记录已上传,不可选择")
|
||||
// ToastUtils.showShort("该条记录已上传,不可选择")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_uploaded_dot_choose)
|
||||
}
|
||||
holder.tvFaultStartTime.text = TimeUtils.millis2String(recordEntity.faultStartTime,getHourMinSecondFormat())
|
||||
holder.tvLineName.text = recordEntity.lineName
|
||||
@@ -110,7 +111,8 @@ class TakeOverListAdapter(private val context: Context): RecyclerView.Adapter<Ta
|
||||
}
|
||||
holder.ivRecordStatusLabel.setOnClickListener {
|
||||
if(recordEntity.reportStatus){
|
||||
ToastUtils.showShort("此条记录已上传不可再次编辑")
|
||||
// ToastUtils.showShort("此条记录已上传不可再次编辑")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_uploaded_dot_edit)
|
||||
}else{
|
||||
clickListener?.onEditRecord(recordEntity)
|
||||
}
|
||||
|
||||
@@ -140,7 +140,8 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
)
|
||||
val provider = CallerDevaToolsManager.upgradeProvider()
|
||||
if (provider?.isDownloading() == true) {
|
||||
ToastUtils.showShort("正在下载最新版本,请稍候再试...")
|
||||
// ToastUtils.showShort("正在下载最新版本,请稍候再试...")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_downloading_new_version)
|
||||
return@setOnClickListener
|
||||
}
|
||||
CallerDevaToolsManager.queryAppUpgrade { upgradeStatus, errorInfo ->
|
||||
@@ -168,7 +169,8 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
CallerAutoPilotControlManager.sendOtaPadMsgQuery(query.toString())
|
||||
CallerOTAManager.invokeOtaPadMsgQuery()
|
||||
}else{
|
||||
ToastUtils.showLong("当前SSM节点未成功启动或当前版本不支持OTA升级")
|
||||
// ToastUtils.showLong("当前SSM节点未成功启动或当前版本不支持OTA升级")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_ssm_not_start)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -391,10 +393,12 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
}
|
||||
CallerHmiManager.showOTAUpgradeDialog(1,true,upgradeReason+upgradeTime)
|
||||
}else{
|
||||
ToastUtils.showLong("请结束订单后触发升级")
|
||||
// ToastUtils.showLong("请结束订单后触发升级")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_stop_order_upgrade)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showLong("暂无待升级任务!")
|
||||
// ToastUtils.showLong("暂无待升级任务!")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_devatools_not_upgrade_task)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
//故障类型选择
|
||||
tvFaultType.setOnClickListener {
|
||||
if (!hasLevel2) {
|
||||
ToastUtils.showShort("运营后台没有配置故障类型")
|
||||
// ToastUtils.showShort("运营后台没有配置故障类型")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_operation_not_configured_fault_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (faultTypeSelectStatus) {
|
||||
@@ -223,11 +224,13 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
//故障原因选择
|
||||
tvFaultReason.setOnClickListener {
|
||||
if (tvFaultType.text.isEmpty()) {
|
||||
ToastUtils.showShort("请先选择故障类型")
|
||||
// ToastUtils.showShort("请先选择故障类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_operation_choose_fault_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(!hasLevel3){
|
||||
ToastUtils.showShort("后台未配置故障原因")
|
||||
// ToastUtils.showShort("后台未配置故障原因")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_cloud_not_fault_cause)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
@@ -257,7 +260,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
}
|
||||
ivTimeAdd.setOnClickListener {
|
||||
if (workOrderOccurrenceTime + 60000 > System.currentTimeMillis()) {
|
||||
ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
// ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_occurrence_time_should_be_before_current_time)
|
||||
return@setOnClickListener
|
||||
}
|
||||
workOrderOccurrenceTime += 60000
|
||||
@@ -312,11 +316,13 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
tvFaultReport.setOnClickListener {
|
||||
if(ClickUtils.isFastClick()){
|
||||
if (level2Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
// ToastUtils.showShort("请完整填写再上报")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_complete_submit_again)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (hasLevel3 && level3Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
// ToastUtils.showShort("请完整填写再上报")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_complete_submit_again)
|
||||
return@setOnClickListener
|
||||
}
|
||||
reportNote = etNoteInput.text.toString()
|
||||
@@ -359,7 +365,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
val q = RegeocodeQuery(latLon, 200f, GeocodeSearch.AMAP)
|
||||
geocodeSearch.getFromLocationAsyn(q)
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_dot_continuous_upload)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,7 +387,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
@@ -405,7 +413,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,7 +508,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
|
||||
override fun problemPadAddError(msg: String) {
|
||||
super.problemPadAddError(msg)
|
||||
ToastUtils.showShort("故障原因上报失败$msg")
|
||||
// ToastUtils.showShort("故障原因上报失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cause_upload_fail, msg)
|
||||
|
||||
}
|
||||
|
||||
override fun getCategoriesSuccess(list: List<CategoryInfo>) {
|
||||
@@ -533,7 +544,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
hasLevel3 = false
|
||||
} else {
|
||||
hasLevel2 = false
|
||||
ToastUtils.showShort("故障类型列表为空")
|
||||
// ToastUtils.showShort("故障类型列表为空")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_type_list_empty)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -542,7 +554,8 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
if(ProjectUtils.isSaas()){
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
// ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_fault_list_get_fail, msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
//一键上报
|
||||
ivOneClickReport.setOnClickListener {
|
||||
if(!canOneReport){
|
||||
ToastUtils.showShort("故障描述获取失败不能上报")
|
||||
// ToastUtils.showShort("故障描述获取失败不能上报")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_fault_des_get_fail)
|
||||
return@setOnClickListener
|
||||
}
|
||||
hasReportOperate = true
|
||||
@@ -145,7 +146,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
clickListener?.closeReportView()
|
||||
},1500)
|
||||
}else{
|
||||
ToastUtils.showShort("主动录包命令下发失败")
|
||||
// ToastUtils.showShort("主动录包命令下发失败")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_initiative_record_bad_cmd_send_fail)
|
||||
this@ReportTypeView.visibility = View.GONE
|
||||
clickListener?.closeReportView()
|
||||
}
|
||||
@@ -236,7 +238,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
|
||||
override fun problemPadAddError(msg: String) {
|
||||
super.problemPadAddError(msg)
|
||||
ToastUtils.showShort("故障原因上报失败$msg")
|
||||
// ToastUtils.showShort("故障原因上报失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cause_upload_fail, msg)
|
||||
ThreadUtils.runOnUiThread {
|
||||
this.visibility = View.GONE
|
||||
clickListener?.closeReportView()
|
||||
@@ -246,7 +249,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
override fun getCategoriesSuccess(list: List<CategoryInfo>) {
|
||||
super.getCategoriesSuccess(list)
|
||||
if(list.isEmpty()){
|
||||
ToastUtils.showShort("一键上报故障描述后台未配置")
|
||||
// ToastUtils.showShort("一键上报故障描述后台未配置")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_cloud_not_configured)
|
||||
canOneReport = false
|
||||
}else{
|
||||
when (level) {
|
||||
@@ -275,7 +279,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("一键上报故障描述获取失败$msg")
|
||||
// ToastUtils.showShort("一键上报故障描述获取失败$msg")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_fault_desc_get_fail, msg)
|
||||
canOneReport = false
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
}
|
||||
iv_time_add.setOnClickListener {
|
||||
if(workOrderOccurrenceTime + 60000 > System.currentTimeMillis()){
|
||||
ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
// ToastUtils.showShort("发生时间应在当前时间之前")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_occurrence_time_should_be_before_current_time)
|
||||
return@setOnClickListener
|
||||
}
|
||||
workOrderOccurrenceTime += 60000
|
||||
@@ -184,11 +185,13 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
if(ClickUtils.isFastClick()){
|
||||
//工单问题类型必选,没有选择,进行提示
|
||||
if(workOrderType.isEmpty()){
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
// ToastUtils.showShort("请选择问题类型")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(et_describe_input.text.toString().isEmpty()){
|
||||
ToastUtils.showShort("请填写问题描述")
|
||||
// ToastUtils.showShort("请填写问题描述")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_desc)
|
||||
return@setOnClickListener
|
||||
}
|
||||
GlobalScope.launch(Dispatchers.IO){
|
||||
@@ -212,7 +215,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
CallerDevaToolsManager.workOrderReport(workOrderReportInfo)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_dot_continuous_upload)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +238,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
// 不显示听写对话框
|
||||
ret = it.startListening(mRecognizerListener)
|
||||
if (ret != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
// ToastUtils.showShort("听写失败,错误码:$ret,请点击网址https://www.xfyun.cn/document/error-code查询解决方案")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_fail, ret)
|
||||
}
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
@@ -258,7 +263,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
*/
|
||||
private val mInitListener = InitListener { code ->
|
||||
if (code != ErrorCode.SUCCESS) {
|
||||
ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
// ToastUtils.showShort("讯飞语音听写初始化失败,错误码:$code")
|
||||
ToastUtils.showShort(com.zhjt.mogo_core_function_devatools.R.string.module_mogo_core_function_devatools_iflytek_speech_recognizer_init_fail, code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +328,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun workOrderReportSuccess() {
|
||||
ToastUtils.showShort("工单上报成功")
|
||||
// ToastUtils.showShort("工单上报成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_work_order_upload_success)
|
||||
ThreadUtils.runOnUiThread {
|
||||
this@WorkOrderView.visibility = View.GONE
|
||||
clickListener?.closeWorkOrderView()
|
||||
@@ -330,7 +337,8 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun workOrderReportError() {
|
||||
ToastUtils.showShort("工单上报失败")
|
||||
// ToastUtils.showShort("工单上报失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_work_order_upload_fail)
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
|
||||
@@ -187,7 +187,8 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
val recordBagMsg = msgBoxBean.bean as RecordBagMsg
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
if(recordBagMsg.isShow){
|
||||
ToastUtils.showShort("当前录包上报面板已打开,请勿重复操作")
|
||||
// ToastUtils.showShort("当前录包上报面板已打开,请勿重复操作")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_bad_case_view_opened)
|
||||
}else{
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean, activity, false)
|
||||
|
||||
@@ -44,15 +44,18 @@ class ToolDriverRomaView @JvmOverloads constructor(
|
||||
|
||||
toolDriverRomaContainer.setOnClickListener {
|
||||
if (ClickUtils.isClickTooFrequent(this, 2500)) {
|
||||
ToastUtils.showShort("不要频繁点击哦~")
|
||||
// ToastUtils.showShort("不要频繁点击哦~")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_dot_often_click)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (!click) {
|
||||
ToastUtils.showShort("漫游准备中,请等待")
|
||||
// ToastUtils.showShort("漫游准备中,请等待")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_roam_starting)
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (!MogoStatusManager.getInstance().isSocketOnLine) {
|
||||
ToastUtils.showShort("长链状态异常,请检查链接后开启漫游")
|
||||
// ToastUtils.showShort("长链状态异常,请检查链接后开启漫游")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_long_connection_state_error)
|
||||
return@setOnClickListener
|
||||
}
|
||||
click = false
|
||||
|
||||
@@ -48,7 +48,8 @@ class ToolRestartSystemView @JvmOverloads constructor(
|
||||
*/
|
||||
private fun showRebootDialog() {
|
||||
if (!connectStatus) {
|
||||
ToastUtils.showShort("尚未连接工控机,无法重启系统")
|
||||
// ToastUtils.showShort("尚未连接工控机,无法重启系统")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_not_sent_reboot_ipc)
|
||||
return
|
||||
}
|
||||
//dialog
|
||||
@@ -58,12 +59,14 @@ class ToolRestartSystemView @JvmOverloads constructor(
|
||||
override fun confirm() {
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == 2) {
|
||||
//当前处于自动驾驶状态,不可进行重启,Toast提示
|
||||
ToastUtils.showShort("请先退出自动驾驶状态")
|
||||
// ToastUtils.showShort("请先退出自动驾驶状态")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_please_exit_autopilot_state)
|
||||
} else {
|
||||
//确认重启
|
||||
CallerLogger.d("$M_HMI$TAG", "reboot confirm")
|
||||
CallerAutoPilotControlManager.sendIpcReboot()
|
||||
ToastUtils.showLong("重启命令已发送")
|
||||
// ToastUtils.showLong("重启命令已发送")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_send_reboot_success)
|
||||
//打开冷启动页面
|
||||
CallerHmiManager.showColdStartWindow()
|
||||
}
|
||||
|
||||
@@ -200,30 +200,36 @@ class ToolStopServiceView @JvmOverloads constructor(
|
||||
*/
|
||||
private fun powerOff() {
|
||||
if (!connectStatus) {
|
||||
ToastUtils.showShort("尚未连接工控机,无法下发一键停服命令")
|
||||
// ToastUtils.showShort("尚未连接工控机,无法下发一键停服命令")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_not_sent_shutdown_ipc)
|
||||
return
|
||||
}
|
||||
if (AppConfigInfo.dockerVersion.isEmpty()) {
|
||||
ToastUtils.showShort("尚未连接工控机,无法下发一键停服命令")
|
||||
// ToastUtils.showShort("尚未连接工控机,无法下发一键停服命令")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_not_sent_shutdown_ipc)
|
||||
return
|
||||
}
|
||||
if (ParseVersionUtils.parseVersion(true, AppConfigInfo.dockerVersion) < 40100) {
|
||||
ToastUtils.showShort("此域控版本不支持一键停服功能,最低支持版本为4.1.0")
|
||||
// ToastUtils.showShort("此域控版本不支持一键停服功能,最低支持版本为4.1.0")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_ipc_version_nonsupport_shutdown_ipc)
|
||||
return
|
||||
}
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == 2) {
|
||||
//当前处于自动驾驶状态,不可进行重启,Toast提示
|
||||
ToastUtils.showShort("请先退出自动驾驶状态")
|
||||
// ToastUtils.showShort("请先退出自动驾驶状态")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_please_exit_autopilot_state)
|
||||
return
|
||||
}
|
||||
if (isExecutingPowerOff) {
|
||||
//一键停服命令下发执行中
|
||||
ToastUtils.showShort("一键停服命令下发中,请勿重复点击")
|
||||
// ToastUtils.showShort("一键停服命令下发中,请勿重复点击")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_sending_shutdown_ipc)
|
||||
return
|
||||
}
|
||||
if (isPowerOffCountDown) {
|
||||
//系统停服中
|
||||
ToastUtils.showShort("系统停服中,请勿重复点击")
|
||||
// ToastUtils.showShort("系统停服中,请勿重复点击")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_shutdowning_ipc)
|
||||
return
|
||||
}
|
||||
//将是否正在下发一键停服命令标签改为true
|
||||
|
||||
@@ -98,30 +98,37 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
//开始拷贝数据
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagCopyDate(currentCopyDate)
|
||||
if(result){
|
||||
ToastUtils.showShort("已发起拷贝")
|
||||
// ToastUtils.showShort("已发起拷贝")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_start_copy)
|
||||
}else{
|
||||
ToastUtils.showShort("拷贝命令发送失败")
|
||||
// ToastUtils.showShort("拷贝命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_copy_cmd_error)
|
||||
}
|
||||
}
|
||||
2 -> {
|
||||
//拷贝中
|
||||
ToastUtils.showShort("正在拷贝中...")
|
||||
// ToastUtils.showShort("正在拷贝中...")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_copying)
|
||||
}
|
||||
3 -> {
|
||||
//拷贝成功
|
||||
ToastUtils.showShort("当前日期数据已拷贝成功")
|
||||
// ToastUtils.showShort("当前日期数据已拷贝成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_now_date_copy_success)
|
||||
}
|
||||
4 -> {
|
||||
//剩余空间不足
|
||||
ToastUtils.showShort("当前硬盘剩余空间不足")
|
||||
// ToastUtils.showShort("当前硬盘剩余空间不足")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_insufficient_disk_space)
|
||||
}
|
||||
5 -> {
|
||||
//所选日期无法拷贝
|
||||
ToastUtils.showShort("所选日期无法拷贝")
|
||||
// ToastUtils.showShort("所选日期无法拷贝")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_choose_date_not_copy)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_bad_case_do_no_click_continuously)
|
||||
}
|
||||
}
|
||||
//拔出硬盘
|
||||
@@ -134,13 +141,16 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
//如果处于未拷贝状态,则调用硬盘安全弹出请求
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagSafeUnmount()
|
||||
if(result){
|
||||
ToastUtils.showShort("硬盘安全弹出命令已发送")
|
||||
// ToastUtils.showShort("硬盘安全弹出命令已发送")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_disk_safely_ejecting)
|
||||
}else{
|
||||
ToastUtils.showShort("硬盘安全弹出命令发送失败")
|
||||
// ToastUtils.showShort("硬盘安全弹出命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_disk_safely_ejecting_fail)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
// ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_bad_case_do_no_click_continuously)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +158,8 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
viewDiskCopyDate.setOnClickListener {
|
||||
if(copyStatus == 2){
|
||||
//数据拷贝中,不可再选择日期
|
||||
ToastUtils.showShort("数据拷贝中,不可再次选择日期,请耐心等待")
|
||||
// ToastUtils.showShort("数据拷贝中,不可再次选择日期,请耐心等待")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_data_copying)
|
||||
}else{
|
||||
//隐藏当前视图
|
||||
pbDiskCopyProgress.visibility = View.GONE
|
||||
@@ -556,7 +567,8 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
//硬盘是否已安全弹出,是-True,否-False
|
||||
Logger.i(TAG,"硬盘是否已安全弹出,是-True,否-False="+diskCopy.diskUnmount)
|
||||
if(diskCopy.diskUnmount){
|
||||
ToastUtils.showShort("硬盘已安全弹出")
|
||||
// ToastUtils.showShort("硬盘已安全弹出")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_disk_safely_ejecting)
|
||||
//隐藏数据落盘辅助工具视图
|
||||
this@DiskCopyView.visibility = View.GONE
|
||||
}
|
||||
|
||||
@@ -30,9 +30,11 @@ class TerminateCopyDataDialog(context: Context) :
|
||||
tvCopyTerminateConfirm.setOnClickListener {
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagAbortCopy()
|
||||
if(result){
|
||||
ToastUtils.showShort("终止数据拷贝命令已发送")
|
||||
// ToastUtils.showShort("终止数据拷贝命令已发送")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_stop_copy)
|
||||
}else{
|
||||
ToastUtils.showShort("终止数据拷贝命令发送失败")
|
||||
// ToastUtils.showShort("终止数据拷贝命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_stop_copy_fail)
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.lookaround.data.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -299,7 +300,8 @@ class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChas
|
||||
delay(5000)
|
||||
val d = data
|
||||
if (d == null || !d.isValid()) {
|
||||
Toast.makeText(Utils.getApp(), "当前MAP版本不支持360环视,请升级MAP版本", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(Utils.getApp(), "当前MAP版本不支持360环视,请升级MAP版本", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(Utils.getApp(), R.string.module_core_ipc_version_nonsupport_360_look_around, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,8 @@ class MoFangStatusView : LinearLayout, OnMoFangStatusListener, IMoGoAutopilotSta
|
||||
return
|
||||
}
|
||||
if (!CallerAutoPilotStatusListenerManager.isConnect()) {
|
||||
ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
// ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_ipc_disconnect_not_use_mofang)
|
||||
return
|
||||
}
|
||||
if (keyCode == KeyEvent.KEYCODE_A) {
|
||||
@@ -169,7 +170,8 @@ class MoFangStatusView : LinearLayout, OnMoFangStatusListener, IMoGoAutopilotSta
|
||||
return
|
||||
}
|
||||
if (!CallerAutoPilotStatusListenerManager.isConnect()) {
|
||||
ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
// ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_ipc_disconnect_not_use_mofang)
|
||||
return
|
||||
}
|
||||
if (keyCode == KeyEvent.KEYCODE_A) {
|
||||
@@ -218,7 +220,8 @@ class MoFangStatusView : LinearLayout, OnMoFangStatusListener, IMoGoAutopilotSta
|
||||
return
|
||||
}
|
||||
if (!CallerAutoPilotStatusListenerManager.isConnect()) {
|
||||
ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
// ToastUtils.showShort("工控机连接异常,无法执行魔方命令")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_ipc_disconnect_not_use_mofang)
|
||||
return
|
||||
}
|
||||
if (keyCodes.size != 2) {
|
||||
|
||||
@@ -177,7 +177,8 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
val recordBagMsg = msgBoxBean.bean as RecordBagMsg
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
if(recordBagMsg.isShow){
|
||||
ToastUtils.showShort("当前录包上报面板已打开,请勿重复操作")
|
||||
// ToastUtils.showShort("当前录包上报面板已打开,请勿重复操作")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_bad_case_view_opened)
|
||||
}else{
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean, activity, false)
|
||||
|
||||
@@ -1227,7 +1227,8 @@ class OperatePanelLayout : LinearLayout {
|
||||
"01" -> {
|
||||
//关闭成功
|
||||
Log.d(TAG, "-- 驾驶位视频流关闭成功 --")
|
||||
ToastUtils.showShort("驾驶位视频流功能已关闭")
|
||||
// ToastUtils.showShort("驾驶位视频流功能已关闭")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_drive_seat_video_stream_close)
|
||||
FunctionBuildConfig.isDriveSeatVideoStream = false
|
||||
lastTimeOnSendDriveVideo = 0L
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also { it.isChecked = false }
|
||||
@@ -1235,7 +1236,8 @@ class OperatePanelLayout : LinearLayout {
|
||||
"11" -> {
|
||||
//打开成功
|
||||
Log.d(TAG, "-- 驾驶位视频流打开成功 --")
|
||||
ToastUtils.showShort("驾驶位视频流功能已开启")
|
||||
// ToastUtils.showShort("驾驶位视频流功能已开启")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_drive_seat_video_stream_open)
|
||||
FunctionBuildConfig.isDriveSeatVideoStream = true
|
||||
lastTimeOnSendDriveVideo = 0L
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also { it.isChecked = true }
|
||||
@@ -1245,7 +1247,8 @@ class OperatePanelLayout : LinearLayout {
|
||||
"0" -> {
|
||||
Log.d(TAG, "-- 设备下线 --")
|
||||
FunctionBuildConfig.isDriveSeatVideoStream = false // 设备下线
|
||||
ToastUtils.showShort("驾驶位视频流功能因设备下线已关闭")
|
||||
// ToastUtils.showShort("驾驶位视频流功能因设备下线已关闭")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_drive_seat_video_stream_device_live_close)
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also {
|
||||
it.isChecked = false
|
||||
it.isEnabled = false
|
||||
@@ -1304,17 +1307,20 @@ class OperatePanelLayout : LinearLayout {
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverPerformTask()||
|
||||
CallerHmiManager.isShuttleDriverPerformTask()
|
||||
) {
|
||||
ToastUtils.showLong("请先结束当前任务")
|
||||
// ToastUtils.showLong("请先结束当前任务")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_current_task)
|
||||
return false
|
||||
}
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverTakingOrders()) {
|
||||
ToastUtils.showLong("请先结束接单状态")
|
||||
// ToastUtils.showLong("请先结束接单状态")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_receive_order_state)
|
||||
return false
|
||||
}
|
||||
CallerHmiManager.setTaxiUnmanedDriverLineRoutingVerifyMode(true)
|
||||
} else {
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverLineRoutingPerformTask()) {
|
||||
ToastUtils.showLong("请先结束当前任务")
|
||||
// ToastUtils.showLong("请先结束当前任务")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_current_task)
|
||||
return false
|
||||
}
|
||||
CallerHmiManager.setTaxiUnmanedDriverLineRoutingVerifyMode(false)
|
||||
@@ -1373,13 +1379,19 @@ class OperatePanelLayout : LinearLayout {
|
||||
val interval = SystemClock.elapsedRealtime() - lastTimeOnSendDriveVideo
|
||||
if (interval <= TimeUnit.SECONDS.toMillis(10)) {
|
||||
val seconds = TimeUnit.MILLISECONDS.toSeconds(interval)
|
||||
ToastUtils.showShort("未收到乘客屏响应,${ if (seconds >= 1) "请${seconds}秒后再试" else "请稍候再试"}")
|
||||
// ToastUtils.showShort("未收到乘客屏响应,${ if (seconds >= 1) "请${seconds}秒后再试" else "请稍候再试"}")
|
||||
if (seconds >= 1) {
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_drive_seat_video_stream_device_response_second, seconds)
|
||||
} else {
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_drive_seat_video_stream_device_response)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
lastTimeOnSendDriveVideo = SystemClock.elapsedRealtime()
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
ToastUtils.showShort(if (isChecked) "驾驶位视频流功能开启指令已发送,等待乘客端响应" else "驾驶位视频流功能关闭指令已发送,等待乘客端响应")
|
||||
// ToastUtils.showShort(if (isChecked) "驾驶位视频流功能开启指令已发送,等待乘客端响应" else "驾驶位视频流功能关闭指令已发送,等待乘客端响应")
|
||||
ToastUtils.showShort(if (isChecked) R.string.module_mogo_core_function_hmi_send_open_drive_seat_video_stream_cmd else R.string.module_mogo_core_function_hmi_send_close_drive_seat_video_stream_cmd)
|
||||
clickEventAnalytics("视频流驾驶位开关", isChecked)
|
||||
val map = HashMap<String, String>()
|
||||
map["open"] = if (isChecked) "1" else "0"
|
||||
@@ -2135,13 +2147,16 @@ class OperatePanelLayout : LinearLayout {
|
||||
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(FunctionBuildConfig.maxSpeedLimit.toInt())
|
||||
when {
|
||||
isSuccess -> {
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
// ToastUtils.showShort("车速设置成功,立即生效")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_success)
|
||||
}
|
||||
else -> {
|
||||
if (!CallerAutoPilotStatusListenerManager.isConnect()) {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
// ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_fail)
|
||||
} else {
|
||||
ToastUtils.showShort("设置车速失败")
|
||||
// ToastUtils.showShort("设置车速失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_fail_disconnect)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2154,10 +2169,12 @@ class OperatePanelLayout : LinearLayout {
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值", FunctionBuildConfig.detouringSpeed)
|
||||
val isSuccess = CallerAutoPilotControlManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed)
|
||||
if (isSuccess == true) {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
|
||||
// ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_detouring_speed_success)
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值设置", "成功")
|
||||
} else {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置失败")
|
||||
// ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_detouring_speed_fail)
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值设置", "失败")
|
||||
}
|
||||
clickEventAnalytics("变道速度阈值", true)
|
||||
@@ -2167,10 +2184,12 @@ class OperatePanelLayout : LinearLayout {
|
||||
FunctionBuildConfig.overTakeSpeed = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.overTakeSpeed)
|
||||
val isSuccess = CallerAutoPilotControlManager.sendOvertakeMaxSpeed(FunctionBuildConfig.overTakeSpeed)
|
||||
if (isSuccess == true) {
|
||||
ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置成功")
|
||||
// ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_sop_detouring_speed_success)
|
||||
hmiAction("SOP 超车目标障碍物速度阈值设置", "成功")
|
||||
} else {
|
||||
ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置失败")
|
||||
// ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_sop_detouring_speed_fail)
|
||||
hmiAction("SOP 超车目标障碍物速度阈值设置", "失败")
|
||||
}
|
||||
clickEventAnalytics("超车速度阈值", true)
|
||||
|
||||
@@ -84,7 +84,8 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
btnOk.isEnabled = false
|
||||
holder.itemView.isEnabled = false
|
||||
ll.isSelected = false
|
||||
ToastUtils.showShort("阈值最大为${max.safeScale()}$unit")
|
||||
// ToastUtils.showShort("阈值最大为${max.safeScale()}$unit")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_limit_max_value, "${max.safeScale()}$unit")
|
||||
return@doAfterTextChanged
|
||||
}
|
||||
val temp = current.safeScale()
|
||||
@@ -118,7 +119,8 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
minus.onClickWidthDuration(100) {
|
||||
val minusAfter = cur - step
|
||||
if (minusAfter < min) {
|
||||
ToastUtils.showShort("阈值最小为${min.safeScale()}$unit")
|
||||
// ToastUtils.showShort("阈值最小为${min.safeScale()}$unit")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_limit_min_value, "${min.safeScale()}$unit")
|
||||
return@onClickWidthDuration
|
||||
}
|
||||
cur = minusAfter
|
||||
@@ -140,7 +142,8 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
add.onClickWidthDuration(100) {
|
||||
val addAfter = cur + step
|
||||
if (addAfter > max) {
|
||||
ToastUtils.showShort("阈值最大为${max.safeScale()}$unit")
|
||||
// ToastUtils.showShort("阈值最大为${max.safeScale()}$unit")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_limit_max_value, "${max.safeScale()}$unit")
|
||||
return@onClickWidthDuration
|
||||
}
|
||||
holder.itemView.isEnabled = false
|
||||
|
||||
@@ -1129,7 +1129,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
CallerAutoPilotControlManager.sendIpcReboot()
|
||||
ToastUtils.showLong("重启命令已发送")
|
||||
// ToastUtils.showLong("重启命令已发送")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_send_reboot_success)
|
||||
}
|
||||
btnAppReboot.onClick {
|
||||
killApp()
|
||||
|
||||
@@ -646,7 +646,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
ivSpeedReduce.setOnClickListener {
|
||||
if (FunctionBuildConfig.detouringSpeed <= 3) {
|
||||
ToastUtils.showShort("阈值最小可为3 m/s")
|
||||
// ToastUtils.showShort("阈值最小可为3 m/s")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_detouring_speed_min_value)
|
||||
} else {
|
||||
FunctionBuildConfig.detouringSpeed--
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
@@ -655,7 +656,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
ivSpeedAdd.setOnClickListener {
|
||||
if (FunctionBuildConfig.detouringSpeed >= 7) {
|
||||
ToastUtils.showShort("阈值最大可为7 m/s")
|
||||
// ToastUtils.showShort("阈值最大可为7 m/s")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_detouring_speed_max_value)
|
||||
} else {
|
||||
FunctionBuildConfig.detouringSpeed++
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
@@ -666,10 +668,12 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
val isSuccess =
|
||||
CallerAutoPilotControlManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed.toDouble())
|
||||
if (isSuccess == true) {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
|
||||
// ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_detouring_speed_success)
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值设置", "成功")
|
||||
} else {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置失败")
|
||||
// ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_detouring_speed_fail)
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值设置", "失败")
|
||||
}
|
||||
clickEventAnalytics("变道速度阈值",true)
|
||||
@@ -677,7 +681,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
|
||||
ivSpeedOverTakeReduce.setOnClickListener {
|
||||
if (FunctionBuildConfig.overTakeSpeed <= 3) {
|
||||
ToastUtils.showShort("阈值最小可为3 m/s")
|
||||
// ToastUtils.showShort("阈值最小可为3 m/s")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_detouring_speed_min_value)
|
||||
} else {
|
||||
FunctionBuildConfig.overTakeSpeed -= 0.5f
|
||||
tvOverTakeLimit.text = "${FunctionBuildConfig.overTakeSpeed} m/s"
|
||||
@@ -686,7 +691,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
ivSpeedOverTakeAdd.setOnClickListener {
|
||||
if (FunctionBuildConfig.overTakeSpeed >= 12.5) {
|
||||
ToastUtils.showShort("阈值最大可为12.5 m/s")
|
||||
// ToastUtils.showShort("阈值最大可为12.5 m/s")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_over_take_speed_max_value)
|
||||
} else {
|
||||
FunctionBuildConfig.overTakeSpeed += 0.5f
|
||||
tvOverTakeLimit.text = "${FunctionBuildConfig.overTakeSpeed} m/s"
|
||||
@@ -697,10 +703,12 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
val isSuccess =
|
||||
CallerAutoPilotControlManager.sendOvertakeMaxSpeed(FunctionBuildConfig.overTakeSpeed.toDouble())
|
||||
if (isSuccess == true) {
|
||||
ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置成功")
|
||||
// ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_sop_detouring_speed_success)
|
||||
hmiAction("SOP 超车目标障碍物速度阈值设置", "成功")
|
||||
} else {
|
||||
ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置失败")
|
||||
// ToastUtils.showShort("SOP 超车目标障碍物速度阈值设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_sop_detouring_speed_fail)
|
||||
hmiAction("SOP 超车目标障碍物速度阈值设置", "失败")
|
||||
}
|
||||
clickEventAnalytics("超车速度阈值",true)
|
||||
@@ -793,19 +801,22 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
if(!buttonView.isPressed) return@setOnCheckedChangeListener
|
||||
if (isChecked) {
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverPerformTask()) {
|
||||
ToastUtils.showLong("请先结束当前任务")
|
||||
// ToastUtils.showLong("请先结束当前任务")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_current_task)
|
||||
buttonView.isChecked = !isChecked
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverTakingOrders()) {
|
||||
ToastUtils.showLong("请先结束接单状态")
|
||||
// ToastUtils.showLong("请先结束接单状态")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_receive_order_state)
|
||||
buttonView.isChecked = !isChecked
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerHmiManager.setTaxiUnmanedDriverLineRoutingVerifyMode(true)
|
||||
} else {
|
||||
if (CallerHmiManager.isTaxiUnmanedDriverLineRoutingPerformTask()) {
|
||||
ToastUtils.showLong("请先结束当前任务")
|
||||
// ToastUtils.showLong("请先结束当前任务")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_please_stop_current_task)
|
||||
buttonView.isChecked = !isChecked
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
@@ -938,7 +949,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
if (tag == 0) {
|
||||
//断开魔方连接
|
||||
if (!mf.isConnected()) {
|
||||
Toast.makeText(context, "尚未建立连接", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(context, "尚未建立连接", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(context, R.string.module_core_mofang_disconnect, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickCallback
|
||||
}
|
||||
mfStatusLayout.showLoadingView()
|
||||
@@ -948,7 +960,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
if (tag == 1) {
|
||||
//建立魔方连接
|
||||
if (mf.isConnected()) {
|
||||
Toast.makeText(context, "已连接,不要重复连接", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(context, "已连接,不要重复连接", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(context, R.string.module_core_mofang_connected, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickCallback
|
||||
}
|
||||
mf.connect()
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.SopView.Companion.sopView
|
||||
@@ -117,7 +118,8 @@ class ToolsView private constructor() {
|
||||
toolsView?.showAdUpgradeStatus(ipcUpgradeStateInfo)
|
||||
ipcUpgradeStateInfo.status.let {
|
||||
if (AdUpgradeStateHelper.isUpgradeSuccess(it)) {
|
||||
ToastUtils.showLong("升级成功")
|
||||
// ToastUtils.showLong("升级成功")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_ipc_upgrade_success)
|
||||
AdUpgradeStateHelper.setConfirmUpgrade(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ class AdUpgradeDialog(context: Context, images: List<String>, padSn: String, rel
|
||||
//确认升级
|
||||
CallerDevaToolsManager.upgradeConfirm(images, padSn, releaseId)
|
||||
AdUpgradeStateHelper.setConfirmUpgrade(true)
|
||||
ToastUtils.showLong("最新版本下载中...")
|
||||
// ToastUtils.showLong("最新版本下载中...")
|
||||
ToastUtils.showLong(R.string.module_mogo_core_function_hmi_ipc_upgrade_dow)
|
||||
dismiss()
|
||||
}
|
||||
upgradeCancel?.setOnClickListener {
|
||||
|
||||
@@ -82,7 +82,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
when {
|
||||
speed > 60 -> {
|
||||
// 设置失败键盘不消失,让用户直接修改
|
||||
ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||
// ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_beyond_max_value)
|
||||
}
|
||||
else -> {
|
||||
keyBoardUtil?.hideKeyboard()
|
||||
@@ -93,10 +94,12 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
when {
|
||||
isSuccess -> {
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
// ToastUtils.showShort("车速设置成功,立即生效")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_success)
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
// ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_fail)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,11 +116,13 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
speedLimit = inputContent.toInt()
|
||||
if(speedLimit>60){
|
||||
speedLimit = 60
|
||||
ToastUtils.showShort("最大限速60")
|
||||
// ToastUtils.showShort("最大限速60")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_max_value)
|
||||
}
|
||||
}
|
||||
}catch (t: Exception){
|
||||
ToastUtils.showShort("最大限速60")
|
||||
// ToastUtils.showShort("最大限速60")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_max_value)
|
||||
speedLimit = 60
|
||||
|
||||
}
|
||||
@@ -200,7 +205,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
svLayout.fullScroll(View.FOCUS_DOWN)
|
||||
}
|
||||
if (!CallerAutoPilotStatusListenerManager.isConnect()) {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
// ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_fail)
|
||||
keyBoardUtil?.hideKeyboard()
|
||||
return@setOnTouchListener true
|
||||
} else {
|
||||
@@ -216,7 +222,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
speedLimit = 0
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
} else{
|
||||
ToastUtils.showShort("车速不能再减了")
|
||||
// ToastUtils.showShort("车速不能再减了")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_not_minus)
|
||||
}
|
||||
try{
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
@@ -231,7 +238,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
speedLimit = 60
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
} else{
|
||||
ToastUtils.showShort("车速不能再加了")
|
||||
// ToastUtils.showShort("车速不能再加了")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_not_add)
|
||||
}
|
||||
try{
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
@@ -242,7 +250,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
tvSureModify.setOnClickListener {
|
||||
if(speedLimit>60){
|
||||
// 设置失败键盘不消失,让用户直接修改
|
||||
ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||
// ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_speed_beyond_max_value)
|
||||
return@setOnClickListener
|
||||
}
|
||||
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speedLimit)
|
||||
@@ -250,10 +259,12 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
isSuccess -> {
|
||||
//速度显示
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
// ToastUtils.showShort("车速设置成功,立即生效")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_success)
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
// ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_set_auto_pilot_speed_fail)
|
||||
}
|
||||
}
|
||||
try {
|
||||
@@ -267,7 +278,8 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
|
||||
|| CallerAutoPilotStatusListenerManager.getState() == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
|
||||
) {
|
||||
ToastUtils.showShort("请稍后退出")
|
||||
// ToastUtils.showShort("请稍后退出")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_please_out_later)
|
||||
return@onClick
|
||||
}
|
||||
EventBus.getDefault().post(EventLogout(EventLogout.LOGOUT_TYPE))
|
||||
|
||||
@@ -76,9 +76,11 @@ class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context, TAG),
|
||||
private fun modifyBindingCar() {
|
||||
CallerDevaToolsManager.modifyCarInfo {
|
||||
if (it.code == 200) {
|
||||
TipToast.shortTip("修改绑定成功")
|
||||
// TipToast.shortTip("修改绑定成功")
|
||||
TipToast.shortTip(R.string.module_core_change_bind_success)
|
||||
} else {
|
||||
TipToast.shortTip("修改绑定失败")
|
||||
// TipToast.shortTip("修改绑定失败")
|
||||
TipToast.shortTip(R.string.module_core_change_bind_failed)
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
|
||||
@@ -45,9 +45,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
if(otaVersion == 1){
|
||||
val result = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.IMMEDIATELY)
|
||||
if(result){
|
||||
ToastUtils.showShort("立即升级命令发送成功")
|
||||
// ToastUtils.showShort("立即升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("立即升级命令发送失败")
|
||||
// ToastUtils.showShort("立即升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
}else if(otaVersion == 2){
|
||||
val query = JSONObject()
|
||||
@@ -60,9 +62,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
}else{
|
||||
val result = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.IMMEDIATELY)
|
||||
if(result){
|
||||
ToastUtils.showShort("立即升级命令发送成功")
|
||||
// ToastUtils.showShort("立即升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("立即升级命令发送失败")
|
||||
// ToastUtils.showShort("立即升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
|
||||
val query = JSONObject()
|
||||
@@ -80,9 +84,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
if(otaVersion == 1){
|
||||
val delayResult = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.DELAY)
|
||||
if(delayResult){
|
||||
ToastUtils.showShort("稍后升级命令发送成功")
|
||||
// ToastUtils.showShort("稍后升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_later_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("稍后升级命令发送失败")
|
||||
// ToastUtils.showShort("稍后升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_later_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
}else if(otaVersion == 2){
|
||||
//不允许OTA升级
|
||||
@@ -96,9 +102,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
}else{
|
||||
val delayResult = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.DELAY)
|
||||
if(delayResult){
|
||||
ToastUtils.showShort("稍后升级命令发送成功")
|
||||
// ToastUtils.showShort("稍后升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_later_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("稍后升级命令发送失败")
|
||||
// ToastUtils.showShort("稍后升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_later_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
|
||||
//不允许OTA升级
|
||||
@@ -121,9 +129,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
if(otaVersion == 1){
|
||||
val result = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.IMMEDIATELY)
|
||||
if(result){
|
||||
ToastUtils.showShort("立即升级命令发送成功")
|
||||
// ToastUtils.showShort("立即升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("立即升级命令发送失败")
|
||||
// ToastUtils.showShort("立即升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
}else if(otaVersion == 2){
|
||||
val query = JSONObject()
|
||||
@@ -136,9 +146,11 @@ class OTAUpgradeDialog(context: Context) :
|
||||
}else{
|
||||
val result = CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.IMMEDIATELY)
|
||||
if(result){
|
||||
ToastUtils.showShort("立即升级命令发送成功")
|
||||
// ToastUtils.showShort("立即升级命令发送成功")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_success)
|
||||
}else{
|
||||
ToastUtils.showShort("立即升级命令发送失败")
|
||||
// ToastUtils.showShort("立即升级命令发送失败")
|
||||
ToastUtils.showShort(R.string.module_mogo_core_function_hmi_send_ipc_upgrade_cmd_fail)
|
||||
}
|
||||
|
||||
val query = JSONObject()
|
||||
|
||||
@@ -79,9 +79,11 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context, TAG), Life
|
||||
private fun toBindingCar() {
|
||||
CallerDevaToolsManager.modifyCarInfo {
|
||||
if (it.code == 200) {
|
||||
TipToast.shortTip("绑定成功")
|
||||
// TipToast.shortTip("绑定成功")
|
||||
TipToast.shortTip(R.string.module_core_bind_success)
|
||||
} else {
|
||||
TipToast.shortTip("绑定失败")
|
||||
// TipToast.shortTip("绑定失败")
|
||||
TipToast.shortTip(R.string.module_core_bind_failed)
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user