test of vip has finished and through
This commit is contained in:
@@ -62,7 +62,6 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.function.hmi.ui.upgrade.UpgradeListAdapter
|
||||
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
|
||||
import com.mogo.eagle.core.network.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -440,27 +439,15 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 日志中心
|
||||
*/
|
||||
// tbLogcatCenter.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
// if (isChecked) {
|
||||
// buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
// //展示日志中心
|
||||
// logcatCenterLayout.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
// //隐藏日志中心
|
||||
// logcatCenterLayout.visibility = View.GONE
|
||||
// }
|
||||
// }
|
||||
//todo test
|
||||
tbLogcatCenter.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (isChecked) {
|
||||
buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
//展示日志中心
|
||||
logcatCenterLayout.visibility = View.VISIBLE
|
||||
VipCarManager.INSTANCE.turnLight(30)
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏日志中心
|
||||
logcatCenterLayout.visibility = View.GONE
|
||||
VipCarManager.INSTANCE.turnLight(30)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,16 +193,14 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
}
|
||||
|
||||
fun turnLight(controlTime: Int) {
|
||||
//todo test note
|
||||
// if (result == null || mContext == null) return
|
||||
// val locationClient = CallerMapUIServiceManager.getSingletonLocationClient(mContext!!)
|
||||
// if (locationClient != null) {
|
||||
// val bearing =
|
||||
// locationClient.lastKnowLocation.bearing.toDouble()
|
||||
if (result == null || mContext == null) return
|
||||
val locationClient = CallerMapUIServiceManager.getSingletonLocationClient(mContext!!)
|
||||
if (locationClient != null) {
|
||||
val bearing =
|
||||
locationClient.lastKnowLocation.bearing.toDouble()
|
||||
CallerLogger.d("$M_V2X$TAG", "-- turnLight -- ")
|
||||
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
|
||||
// result!!.lightId, result!!.crossId, bearing, controlTime,
|
||||
100530, "10008", 6.403929233551025, controlTime,
|
||||
result!!.lightId, result!!.crossId, bearing, controlTime,
|
||||
{
|
||||
if (it.sn == MoGoAiCloudClientConfig.getInstance().sn && it.code == 0) {
|
||||
CallerLogger.d("$M_V2X$TAG", "变灯请求成功")
|
||||
@@ -216,7 +214,12 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
val time = if (it.countDown / 60 >= 1) {
|
||||
"${it.countDown / 60}分${it.countDown % 60}秒后重试"
|
||||
} else {
|
||||
"${it.countDown}秒后重试"
|
||||
val temp = if (it.countDown == 0) {
|
||||
1
|
||||
} else {
|
||||
it.countDown
|
||||
}
|
||||
"${temp}秒后重试"
|
||||
}
|
||||
showWarning(
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
@@ -230,7 +233,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
CallerLogger.e("$M_V2X$TAG", "变灯请求失败 msg : $errorMsg")
|
||||
ToastUtils.showLong("服务异常,请稍后重试")
|
||||
})
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
private fun showWarning(
|
||||
|
||||
Reference in New Issue
Block a user