This commit is contained in:
zhongchao
2022-09-20 15:21:42 +08:00
parent 5303103646
commit 10c309d5e3
6 changed files with 99 additions and 35 deletions

View File

@@ -62,6 +62,7 @@ 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
@@ -439,15 +440,27 @@ 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)
}
}
@@ -666,12 +679,8 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化 tracker感知数据源 数据
trackerProvider.check(
when (FunctionBuildConfig.debugTrackerProvider) {
0 -> {
R.id.trackerProviderOrigin
}
1 -> {
R.id.trackerProviderObu
}
0 -> R.id.trackerProviderOrigin
1 -> R.id.trackerProviderObu
else -> R.id.trackerProviderOrigin
}
)
@@ -680,14 +689,38 @@ class DebugSettingView @JvmOverloads constructor(
R.id.trackerProviderOrigin -> {
FunctionBuildConfig.debugTrackerProvider = 0
// update tracker provider view
trackerIPCProvider.visibility = View.VISIBLE
}
R.id.trackerProviderObu -> {
FunctionBuildConfig.debugTrackerProvider = 1
// update tracker provider view
trackerIPCProvider.visibility = View.GONE
}
}
}
// 初始化 trackerIPC 感知数据源 数据
trackerIPCProvider.check(
when (FunctionBuildConfig.trackerIPCProvider) {
0 -> R.id.trackerIPCUnion
1 -> R.id.trackerIPCObu
2 -> R.id.trackerIPCV2N
else -> R.id.trackerIPCUnion
}
)
trackerProvider.setOnCheckedChangeListener{ _, checkedId ->
when(checkedId){
R.id.trackerIPCUnion -> {
FunctionBuildConfig.trackerIPCProvider = 0
}
R.id.trackerIPCObu -> {
FunctionBuildConfig.trackerIPCProvider = 1
}
R.id.trackerIPCV2N -> {
FunctionBuildConfig.trackerIPCProvider = 2
}
}
}
// 初始化 ADAS感知数据是否绘制 选择情况
tbIsDrawIdentifyData.isChecked = FunctionBuildConfig.isDrawIdentifyData
@@ -1855,13 +1888,13 @@ class DebugSettingView @JvmOverloads constructor(
override fun updateBizData(type: String, state: Boolean, lock: Boolean, data: String?) {
when (type) {
BIZ_BEAUTY_MODE -> tbIsDemoMode.isClickable = !lock
BIZ_RAIN_MODE -> tbIsRainMode.isClickable = !lock
BIZ_BEAUTY_MODE -> tbIsDemoMode.isClickable = !lock
BIZ_RAIN_MODE -> tbIsRainMode.isClickable = !lock
BIZ_WARNING_UPLOAD -> tbReportWarning.isClickable = !lock
BIZ_BAG_RECORD -> {
if(lock){
BIZ_BAG_RECORD -> {
if (lock) {
btnRecordBag.isClickable = false
}else{
} else {
btnRecordBag.isClickable = true
btnRecordBag.requestFocus()
}

View File

@@ -1783,6 +1783,44 @@
</RadioGroup>
<RadioGroup
android:id="@+id/trackerIPCProvider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/trackerProvider">
<RadioButton
android:id="@+id/trackerIPCUnion"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="@dimen/dp_10"
android:text="融合感知数据"
android:textColor="#000"
android:textSize="@dimen/dp_24" />
<RadioButton
android:id="@+id/trackerIPCObu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="@dimen/dp_10"
android:text="融合OBU感知数据"
android:textColor="#000"
android:textSize="@dimen/dp_24" />
<RadioButton
android:id="@+id/trackerIPCV2N"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="@dimen/dp_10"
android:text="融合V2N感知数据"
android:textColor="#000"
android:textSize="@dimen/dp_24" />
</RadioGroup>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -120,7 +120,7 @@ class TrafficLightNetWorkModel {
}
loader {
apiCall {
getNetWorkApi().changeLight(map)
getNetWorkApi("http://dzt-test.zhidaozhixing.com").changeLight(map)
}
}
onSuccess {

View File

@@ -192,15 +192,17 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
}
}
private fun turnLight(controlTime: Int) {
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 -- bearing : $bearing")
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()
CallerLogger.d("$M_V2X$TAG", "-- turnLight -- ")
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
result!!.lightId, result!!.crossId, bearing, controlTime,
// result!!.lightId, result!!.crossId, bearing, controlTime,
100530, "10008", 6.403929233551025, controlTime,
{
if (it.sn == MoGoAiCloudClientConfig.getInstance().sn && it.code == 0) {
CallerLogger.d("$M_V2X$TAG", "变灯请求成功")
@@ -211,7 +213,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType
)
} else {
val time = if (it.countDown / 60 > 1) {
val time = if (it.countDown / 60 >= 1) {
"${it.countDown / 60}${it.countDown % 60}秒后重试"
} else {
"${it.countDown}秒后重试"
@@ -228,7 +230,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
CallerLogger.e("$M_V2X$TAG", "变灯请求失败 msg : $errorMsg")
ToastUtils.showLong("服务异常,请稍后重试")
})
}
// }
}
private fun showWarning(