Merge branch 'dev_robotaxi-d_240912_6.7.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240912_6.7.0

This commit is contained in:
aibingbing
2024-09-25 17:33:55 +08:00
94 changed files with 2106 additions and 363 deletions

View File

@@ -118,7 +118,7 @@ class FuncBizProvider : IMoGoFuncBizProvider {
}
override fun queryV2XEvents() {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
v2xPoiLoader.queryWholeRoadEvents()
}
}

View File

@@ -107,7 +107,7 @@ object OverViewDataManager {
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it?.apply {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
CallerFuncBizListenerManager.invokeV2XEvents(this)
}
}

View File

@@ -196,8 +196,8 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
}
is V2XEvent.RoadEventX -> {
val flag = verifyCarType()
Log.d("$M_V2X$TAG", "---- 收到ai云V2N事件 ---:${flag}, ${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}")
if (flag && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
Log.d("$M_V2X$TAG", "---- 收到ai云V2N事件 ---:${flag}, ${FunctionBuildConfig.v2nTotalSwitch}, ${FunctionBuildConfig.v2nNewLinked}")
if (flag && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
// try {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
Log.d("$M_V2X$TAG", "onAck -> 司机端: 将收到云端事件给到乘客端...")
@@ -210,7 +210,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
// }
handleRoadMarkerEvent(event.data.toRoadMarker())
} else{
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData), true)
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nTotalSwitch,"isNewV2NData" to FunctionBuildConfig.v2nNewLinked), true)
}
}
else -> {

View File

@@ -45,7 +45,6 @@ import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissBean
import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissManager
import com.mogo.eagle.function.biz.v2x.v2n.utils.IEventDismissListener
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager
import com.mogo.map.entities.Lane
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.delay
@@ -484,42 +483,42 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
private fun drawShiGong(events: List<TrackedObject>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGONE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events))
}
}
private fun drawShiGu(events: List<TrackedObject>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events))
}
}
private fun drawYongDu(events: List<MogoV2X.RTEData_PB>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_YONGDU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events))
}
}
private fun drawOtherRetrogradeVehicle(event: MessagePad.Event) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE, event))
}
}
private fun drawGreenWave(crossSpeed: V2nCrossSpeed) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_GREEN_WAVE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_GREEN_WAVE, crossSpeed))
}
}
private fun drawPeopleCross(event: MessagePad.Event) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_PEOPLE_CROSS)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_PEOPLE_CROSS, event))
}

View File

@@ -68,7 +68,6 @@ import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.CupidLogUtils
import com.zhjt.mogo.adas.common.MessageType
import com.zhjt.mogo.adas.common.power.PowerUnitChannel
import com.zhjt.mogo.adas.data.Adas
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.MogoReport
import com.zhjt.mogo.adas.data.bean.NodeStateInfo
@@ -1166,8 +1165,8 @@ class MoGoAutopilotControlProvider :
CallerLogger.d("$M_D_C$TAG", status)
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}

View File

@@ -149,8 +149,8 @@ class TeleMsgHandler : IMsgHandler {
val f1 = data["f1"] as Boolean
val f2 = data["f2"] as Boolean
Log.d(TAG, "乘客屏收到司机屏转发的新链路开关 --- 3 ---:$data, f1: $f1, f2:$f2")
FunctionBuildConfig.v2nMainSwitch = f1
FunctionBuildConfig.isNewV2NData = f2
FunctionBuildConfig.v2nTotalSwitch = f1
FunctionBuildConfig.v2nNewLinked = f2
} catch (t: Throwable) {
t.printStackTrace()
Log.e(TAG, "乘客屏收到司机屏转发的新链路开关异常", t)
@@ -270,11 +270,11 @@ class TeleMsgHandler : IMsgHandler {
TelematicConstant.OBU_RUNREDLIGHT_WARNING -> {
when (String(it.body)) {
"0" -> {
HmiBuildConfig.isShowRunRedLightView = false
HmiBuildConfig.v2iRedLightWarning = false
}
"1" -> {
HmiBuildConfig.isShowRunRedLightView = true
HmiBuildConfig.v2iRedLightWarning = true
}
}
}

View File

@@ -64,25 +64,25 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
override fun onMoGoObuRsiWarning(rsiWarningData: ObuScene.RsiWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcRsiWarning(rsiWarningData)
}
}
override fun onMoGoObuRsmWarning(rsmWarningData: ObuScene.RsmWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcRsmWarning(rsmWarningData)
}
}
override fun onMoGoObuSpatWarning(spatWarningData: ObuScene.SpatWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcSpatWarning(spatWarningData)
}
}
override fun onMoGoObuMapMath(mapMatchData: ObuScene.MapMatchData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuMapMath(mapMatchData)
}
}
@@ -339,7 +339,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
* RSM预警信息 CvxPtcThreatIndInfo CvxPtcInfoIndInfo主车与弱势交通参与者之间的预警弱势交通参与者碰撞预警
*/
fun onMogoObuDcRsmWarning(rsmWarningData: ObuScene.RsmWarningData?) {
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
if (HmiBuildConfig.v2iWeaknessTraffic) {
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager onMogoObuRsmWarning ------> ${rsmWarningData.toString()}"
@@ -576,8 +576,8 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
1 -> { //闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if(FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView){
if (HmiBuildConfig.isShowRunRedLightView) {
if(FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch){
if (HmiBuildConfig.v2iRedLightWarning) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
@@ -609,7 +609,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次
if (FunctionBuildConfig.v2xMainSwitch && FunctionBuildConfig.v2nMainSwitch && HmiBuildConfig.isShowGreenWaveView) {
if (FunctionBuildConfig.v2xTotalSwitch && FunctionBuildConfig.v2nTotalSwitch && HmiBuildConfig.isShowGreenWaveView) {
if (!isShowGreenWave) {
isShowGreenWave = true
CallerLogger.d(

View File

@@ -296,7 +296,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* v2v预警信息 CvxRvInfoIndInfo CvxV2vThreatIndInfo 他车
*/
override fun onObuRvWarning(data: ObuScene.RvWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2vView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2vTotalSwitch) {
if (data.warningMsg != null) {
// 更新数据远车数据之前要匹配uuid
data.vehBasicsMsg?.let {
@@ -343,7 +343,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 红绿灯预警信息 CvxIvpThreatIndInfo
*/
override fun onObuSpatWarning(data: ObuScene.SpatWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
handlerTrafficLight(
data.warningType,
data.status,
@@ -356,7 +356,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* RSI预警信息 onMogoObuRsiWarning交通标志预警前方限速、前方学校等等交通事件预警前方拥堵、前方积水等等
*/
override fun onObuRsiWarning(data: ObuScene.RsiWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (data.warningMsgList != null && data.warningMsgList.size > 0) {
var alertContent = ""
var ttsContent = ""
@@ -643,8 +643,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"onMogoObuRsmWarning ------> ${data?.toString()}"
)
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (HmiBuildConfig.v2iWeaknessTraffic) {
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
if (data != null && data.participant != null) {
val v2xType = when (data.participant.ptcType) {
@@ -736,7 +736,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 地图匹配 是OBU算法输出地图匹配结果主车匹配道路哪条路或者哪条车道
*/
override fun onObuMapMath(data: ObuScene.MapMatchData?) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (data != null) {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
@@ -1056,8 +1056,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
}
1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if(FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView){
if (HmiBuildConfig.isShowRunRedLightView) {
if(FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch){
if (HmiBuildConfig.v2iRedLightWarning) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =

View File

@@ -34,7 +34,6 @@ import com.mogo.eagle.core.function.api.devatools.strict.IStrictModeProvider
import com.mogo.eagle.core.function.api.lookaround.IMoGoLookAroundProvider
import com.mogo.eagle.core.function.api.map.route.IMapRouteProvider
import com.mogo.eagle.core.function.api.upgrade.IMoGoUpgradeProvider
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -84,10 +83,8 @@ import com.zhjt.mogo_core_function_devatools.weaknetwork.DetectResultImpl
import com.zhjt.mogo_core_function_devatools.weaknetwork.WeakNetworkStrategy
import com.zhjt.mogo_core_function_devatools.workorder.WorkOrderManager
import com.zhjt.service.chain.ChainLog
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.io.File
import java.lang.ref.WeakReference
import java.util.concurrent.ConcurrentHashMap
@@ -410,8 +407,8 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
/**
* 展示考试车辆控制窗口
*/
override fun showExamControlWindow(view: View,isShow: Boolean) {
ExamControlManager.showExamControlWindow(view,isShow)
override fun showExamControlWindow(isShow: Boolean) {
ExamControlManager.showExamControlWindow(isShow)
}
override fun onReceiveBadCaseRecord(

View File

@@ -1,14 +1,10 @@
package com.zhjt.mogo_core_function_devatools.exam
import android.annotation.SuppressLint
import android.view.View
import androidx.fragment.app.FragmentActivity
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import com.mogo.eagle.core.utilcode.util.AppStateManager
/**
* 考试控制管理
@@ -21,9 +17,8 @@ internal object ExamControlManager {
/**
* 开启考试车辆控制窗口
*/
fun showExamControlWindow(view: View,isShow: Boolean){
val activity = view.context as? FragmentActivity
?: throw IllegalStateException("please ensure context is FragmentActivity.")
fun showExamControlWindow(isShow: Boolean){
val activity = AppStateManager.currentActivity() ?: return
if(examControlWindow == null){
examControlWindow = ExamControlWindow(activity)
}

View File

@@ -147,7 +147,7 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
builder.crashConfig(
CrashConfig.Builder()
.enabled(true)
.uploader(CrashLogUploader())
// .uploader(CrashLogUploader())
.crashDir(File(context.getExternalFilesDir(null), "crash"))
.expireDuration(TimeUnit.DAYS.toMillis(3))
.javaCrash(true)

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.api.och.toolkit.IToolKitItemClickListener
import com.mogo.eagle.core.function.api.och.toolkit.ToolKitCustomItemAddParam
import com.mogo.eagle.core.function.api.och.toolkit.ToolKitDefaultItemAddParam
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.bone.toolkit.custom.ToolDriverRomaView
import com.mogo.eagle.core.function.hmi.bone.toolkit.custom.ToolRestartSystemView
@@ -161,7 +162,8 @@ object ToolKitDataManager : IToolKitItemClickListener {
ToolTypeEnum.OPERATION_PANEL.name -> {
ctx?.also {
SopView.sopView.toggle(it)
// SopView.sopView.toggle(it)
CallerHmiManager.toggleOperatePanel(true)
}
}

View File

@@ -11,6 +11,8 @@ import android.view.animation.AccelerateDecelerateInterpolator
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.api.order.IOrderListener
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.util.ConstraintUtil
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener
@@ -25,8 +27,9 @@ class MapContainerLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoMapListener {
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoMapListener, IOrderListener {
@Volatile
private var isScaled = false
private var isPlayingAnim = false
private var constraintUtil: ConstraintUtil? = null
@@ -71,6 +74,7 @@ class MapContainerLayout @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener("${TAG}${this.hashCode()}",this)
CallerOrderListenerManager.addListener("${TAG}${this.hashCode()}", this)
}
override fun onDetachedFromWindow() {
@@ -90,6 +94,15 @@ class MapContainerLayout @JvmOverloads constructor(
super.onMapClick(latLng)
}
override fun onUpdateOrderStatus(inOrder: Boolean) {
super.onUpdateOrderStatus(inOrder)
if (!inOrder) {// 订单结束
if (isScaled) {// 行程总览地图
overMapView.clearAllMarkersAndPolyline()
}
}
}
private fun swapViewsWithAnim() {
if (isPlayingAnim) return
if (constraintUtil == null) {

View File

@@ -2,14 +2,15 @@ package com.mogo.eagle.core.function.hmi.ui
import android.content.Context
import android.text.TextUtils
import android.transition.Slide
import android.util.Log
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.view.ViewStub
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.lifecycle.lifecycleScope
import androidx.transition.Slide
import androidx.transition.TransitionManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.voice.AIAssist
@@ -36,6 +37,7 @@ import com.mogo.eagle.core.function.api.och.toolkit.ToolKitDefaultItemAddParam
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.bone.status.fsm.FSMStatusDetailWindowManager
import com.mogo.eagle.core.function.hmi.bone.toolkit.ToolKitDataManager
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
@@ -66,8 +68,6 @@ import com.zhjt.service_biz.BizConfig
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import me.jessyan.autosize.utils.AutoSizeUtils
import java.lang.ref.WeakReference
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicReference
@@ -95,8 +95,6 @@ class MoGoHmiProvider : IMoGoHmiProvider {
private val xiaozhi by lazy { XiaoZhiStateManager() }
private val operatePanel by lazy { AtomicReference<WeakReference<MoGoPopWindow>>(null) }
override fun init(context: Context?) {
this.context = context
}
@@ -451,26 +449,22 @@ class MoGoHmiProvider : IMoGoHmiProvider {
return
}
if (show) {
if (operatePanel.get()?.get()?.isShowing() == true) {
return
var target = activity.findViewById<View>(R.id.id_operate_panel)
if (target == null) {
val vs = activity.findViewById<ViewStub>(R.id.vs_operate_panel) ?: throw AssertionError()
target = vs.inflate()
}
if (target != null && target.visibility != View.VISIBLE) {
TransitionManager.beginDelayedTransition(target.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(target) })
target.visibility = View.VISIBLE
target.post { target.bringToFront() }
}
MoGoPopWindow.Builder()
.attachToActivity(activity)
.gravityInActivity(Gravity.START or Gravity.TOP)
.contentView(OperatePanelLayout(activity))
.width(AutoSizeUtils.dp2px(activity, 1000.0f))
.height(WindowManager.LayoutParams.MATCH_PARENT)
.transition(Slide(Gravity.START), Slide(Gravity.START))
.onDismissed {
operatePanel.set(null)
}
.build()
.also {
operatePanel.set(WeakReference(it))
}
.show()
} else {
operatePanel.get()?.get()?.hide()
val operatePanelView = activity.findViewById<View>(R.id.id_operate_panel)
if (operatePanelView != null && operatePanelView.visibility == View.VISIBLE) {
TransitionManager.beginDelayedTransition(operatePanelView.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(operatePanelView) })
operatePanelView.visibility = View.GONE
}
}
}

View File

@@ -0,0 +1,69 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import androidx.core.content.ContextCompat
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
class PreferenceWithMoFang: Preference {
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
companion object {
const val KEY_CURRENT_CONNECT_STATUS = "key_mofang_connect_status"
}
enum class MoFangConnectStatus {
CONNECT_START,
CONNECTED,
CONNECTING
}
private var status: MoFangConnectStatus? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
status = MoFangConnectStatus.values().find { it.ordinal == defaultValue }
notifyChanged()
}
fun updateStatus(status: MoFangConnectStatus) {
this.status = status
notifyChanged()
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val stats = this.status ?: return
val btConnect = holder.findViewById(R.id.bt_mofang)
btConnect.setOnClickListener(null)
when(stats) {
MoFangConnectStatus.CONNECT_START -> {
btConnect.isEnabled = true
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_connect_start)
btConnect.onClick {
extras.putInt(KEY_CURRENT_CONNECT_STATUS, stats.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
MoFangConnectStatus.CONNECTED -> {
btConnect.isEnabled = true
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_disconnect)
btConnect.onClick {
extras.putInt(KEY_CURRENT_CONNECT_STATUS, stats.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
MoFangConnectStatus.CONNECTING -> {
btConnect.isEnabled = false
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_connect_doing)
}
}
}
}

View File

@@ -0,0 +1,95 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import android.widget.TextView
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ToastUtils
import kotlin.math.max
class PreferenceWithSpeedSetting : Preference {
companion object {
const val KEY_BUNDLE_CURRENT_VALUE = "key_bundle_current_val"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
private var mDefaultValueSet: Any? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
mDefaultValueSet = defaultValue
notifyChanged()
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val defaultSet = mDefaultValueSet ?: return
if (defaultSet !is Set<*> || defaultSet.size != 4) {
throw AssertionError()
}
val min = (defaultSet.elementAt(0) as String).toFloat()
val max = (defaultSet.elementAt(1) as String).toFloat()
var cur = (defaultSet.elementAt(2) as String).toFloat()
val step = (defaultSet.elementAt(3) as String).toFloat()
if (min > max) {
throw AssertionError()
}
if (min > cur) {
throw AssertionError()
}
if (cur > max) {
throw AssertionError()
}
val ll = holder.findViewById(R.id.ll_speed)
val btnOk = holder.findViewById(R.id.bt_ok)
val speedLimit = holder.findViewById(R.id.tv_speed_limit) as? TextView
if (speedLimit?.tag != null && speedLimit.tag is Float) {
cur = max(cur, speedLimit.tag as Float)
}
speedLimit?.text = cur.toString()
val minus = holder.findViewById(R.id.iv_speed_minus)
minus.setOnClickListener(null)
minus.onClick {
val minusAfter = cur - step
if (minusAfter < min) {
ToastUtils.showShort("阈值最小可为${min}m/s")
return@onClick
}
cur = minusAfter
btnOk.isEnabled = true
ll.isSelected = true
speedLimit?.tag = minusAfter
speedLimit?.text = minusAfter.toString()
}
val add = holder.findViewById(R.id.iv_speed_add)
add.setOnClickListener(null)
add.onClick {
val addAfter = cur + step
if (addAfter > max) {
ToastUtils.showShort("阈值最大可为${max}m/s")
return@onClick
}
cur = addAfter
ll.isSelected = true
btnOk.isEnabled = true
speedLimit?.tag = addAfter
speedLimit?.text = addAfter.toString()
}
btnOk.isEnabled = false
btnOk.setOnClickListener(null)
btnOk.onClick {
onPreferenceClickListener?.also {
extras.putFloat(KEY_BUNDLE_CURRENT_VALUE, cur)
it.onPreferenceClick(this)
}
}
}
}

View File

@@ -0,0 +1,103 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.widget.CompoundButton
import android.widget.RadioButton
import android.widget.RadioGroup
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
class PreferenceWithUnmanInterval: Preference, RadioGroup.OnCheckedChangeListener {
companion object {
const val KEY_BUNDLE_CURRENT_INTERVAL = "key_bundle_unman_interval"
private const val TAG = "PreferenceWithUnmanInterval"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
enum class Interval {
FIVE_SECOND,
FIFTEEN_SECOND,
THIRTY_SECOND,
FORTY_FIVE_SECOND,
NEVER
}
private var interval: Interval? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
Log.d(TAG, "--- setDefaultValue 1 ---:defaultValue -> $defaultValue")
if (defaultValue is Int) {
interval = when(defaultValue) {
5 -> Interval.FIVE_SECOND
15 -> Interval.FIFTEEN_SECOND
30 -> Interval.THIRTY_SECOND
45 -> Interval.FORTY_FIVE_SECOND
else -> Interval.NEVER
}
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
Log.d(TAG, "--- onBindViewHolder 1 ---:interval -> $interval")
val temp = interval?: return
Log.d(TAG, "--- onBindViewHolder 2 --- ")
val five = holder.findViewById(R.id.rb_5s) as? RadioButton
val fifteen = holder.findViewById(R.id.rb_15s) as? RadioButton
val thirty = holder.findViewById(R.id.rb_30s) as? RadioButton
val forty_five = holder.findViewById(R.id.rb_45s) as? RadioButton
val never = holder.findViewById(R.id.rb_never) as? RadioButton
when(temp) {
Interval.FIVE_SECOND -> five?.isChecked = true
Interval.FIFTEEN_SECOND -> fifteen?.isChecked = true
Interval.THIRTY_SECOND -> thirty?.isChecked = true
Interval.FORTY_FIVE_SECOND -> forty_five?.isChecked = true
Interval.NEVER -> never?.isChecked = true
}
(holder.findViewById(R.id.rg_root) as? RadioGroup)?.also {
it.setOnCheckedChangeListener(this)
}
}
override fun onCheckedChanged(group: RadioGroup?, checkedId: Int) {
Log.d(TAG, "--- onCheckedChanged --- ")
when(checkedId) {
R.id.rb_5s -> {
Log.d(TAG, "--- onCheckedChanged 5s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FIVE_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_15s -> {
Log.d(TAG, "--- onCheckedChanged 15s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FIFTEEN_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_30s -> {
Log.d(TAG, "--- onCheckedChanged 30s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.THIRTY_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_45s -> {
Log.d(TAG, "--- onCheckedChanged 45s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FORTY_FIVE_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_never -> {
Log.d(TAG, "--- onCheckedChanged never--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.NEVER.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
}
}

View File

@@ -0,0 +1,56 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.text.TextUtils
import android.util.AttributeSet
import android.widget.EditText
import androidx.core.widget.doOnTextChanged
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
class PreferenceWithWelcomeWords: Preference {
companion object {
const val KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE = "key_bundle_current_edit_text"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
private var mCurrentWelcomeWords: String? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
if (defaultValue is String) {
mCurrentWelcomeWords = defaultValue
notifyChanged()
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val currentWelcomeWords = mCurrentWelcomeWords
val et = holder.findViewById(R.id.et_welcome_words) as? EditText
val btn_ok = holder.findViewById(R.id.bt_ok)
btn_ok.isEnabled = false
et?.doOnTextChanged { text, _, _, _ ->
if (!TextUtils.isEmpty(text)) {
btn_ok?.isEnabled = true
} else {
btn_ok?.isEnabled = false
}
}
if (!TextUtils.isEmpty(currentWelcomeWords)) {
et?.setText(currentWelcomeWords)
}
btn_ok.onClick {
extras.putString(KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE, et?.text.toString())
onPreferenceClickListener?.onPreferenceClick(this)
}
}
}

View File

@@ -143,21 +143,21 @@ internal class SOPSettingView @JvmOverloads constructor(
*/
private fun v2xSetting() {
//V2X总开关
scV2XSwitch.isChecked = FunctionBuildConfig.v2xMainSwitch
scV2XSwitch.isChecked = FunctionBuildConfig.v2xTotalSwitch
scV2XSwitch.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.v2xMainSwitch = isChecked
FunctionBuildConfig.v2xTotalSwitch = isChecked
hmiAction("SOP V2X总开关, ", isChecked)
clickEventAnalytics("V2X总开关",isChecked)
if (isChecked) {
//V2N总开关
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
hmiAction("SOP V2N总开关, ", FunctionBuildConfig.v2nMainSwitch)
scV2NSwitch.isChecked = FunctionBuildConfig.v2nTotalSwitch
hmiAction("SOP V2N总开关, ", FunctionBuildConfig.v2nTotalSwitch)
//V2I总开关
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView
hmiAction("SOP V2I总开关, ", HmiBuildConfig.isShowObuV2iView)
scV2ISwitch.isChecked = HmiBuildConfig.v2iTotalSwitch
hmiAction("SOP V2I总开关, ", HmiBuildConfig.v2iTotalSwitch)
//V2V总开关
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
hmiAction("SOP V2V总开关, ", HmiBuildConfig.isShowObuV2vView)
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
hmiAction("SOP V2V总开关, ", HmiBuildConfig.v2vTotalSwitch)
//obu总开关
scObu.isChecked = obuConnectStatus
hmiAction("SOP obu总开关, ", obuConnectStatus)
@@ -187,24 +187,24 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//V2N总开关
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
scV2NSwitch.isChecked = FunctionBuildConfig.v2nTotalSwitch
//根据V2N状态设置子开关是否可以点击
//V2N新链路
scNewV2NData.isEnabled = FunctionBuildConfig.v2nMainSwitch
scNewV2NData.isEnabled = FunctionBuildConfig.v2nTotalSwitch
//V2N场景进PNC
scV2nPnc.isEnabled = FunctionBuildConfig.v2nMainSwitch
scV2nPnc.isEnabled = FunctionBuildConfig.v2nTotalSwitch
//绿波通行(默认关闭)
scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nMainSwitch
scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nTotalSwitch
scV2NSwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
clickEventAnalytics("V2N总开关",isChecked)
if (isChecked) {
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", FunctionBuildConfig.isNewV2NData)
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", FunctionBuildConfig.v2nNewLinked)
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
hmiAction("SOP V2N场景进PNC, ", FunctionBuildConfig.isV2NPnc)
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.isV2NPnc)
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC
hmiAction("SOP V2N场景进PNC, ", FunctionBuildConfig.v2nNewLinkedToPNC)
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.v2nNewLinkedToPNC)
//绿波通行
scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
hmiAction("SOP obu绿波通行, ", HmiBuildConfig.isShowGreenWaveView)
@@ -234,37 +234,37 @@ internal class SOPSettingView @JvmOverloads constructor(
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
FunctionBuildConfig.v2nMainSwitch = isChecked
FunctionBuildConfig.v2nTotalSwitch = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = isChecked
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
//V2I总开关
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView //是否展示obu的v2i
scV2ISwitch.isChecked = HmiBuildConfig.v2iTotalSwitch //是否展示obu的v2i
//根据V2I状态设置子开关是否可以点击
scV2iPnc.isEnabled = HmiBuildConfig.isShowObuV2iView
scRunRedLightSop.isEnabled = HmiBuildConfig.isShowObuV2iView
scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.isShowObuV2iView
scV2iPnc.isEnabled = HmiBuildConfig.v2iTotalSwitch
scRunRedLightSop.isEnabled = HmiBuildConfig.v2iTotalSwitch
scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.v2iTotalSwitch
scV2ISwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
clickEventAnalytics("V2I总开关",isChecked)
if (isChecked) {
//V2I场景进PNC
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
hmiAction("SOP V2I场景进PNC, ", FunctionBuildConfig.isV2IPnc)
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.isV2IPnc)
scV2iPnc.isChecked = FunctionBuildConfig.v2iToPNC
hmiAction("SOP V2I场景进PNC, ", FunctionBuildConfig.v2iToPNC)
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.v2iToPNC)
//闯红灯预警
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
hmiAction("SOP obu闯红灯预警, ", HmiBuildConfig.isShowRunRedLightView)
scRunRedLightSop.isChecked = HmiBuildConfig.v2iRedLightWarning
hmiAction("SOP obu闯红灯预警, ", HmiBuildConfig.v2iRedLightWarning)
CallerTelematicManager.sendMsgToAllClients(
TelematicConstant.OBU_RUNREDLIGHT_WARNING,
"1".toByteArray()
)
//路侧弱势交通参与者
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
hmiAction("SOP obu弱势交通控制, ", HmiBuildConfig.isShowObuWeaknessTrafficView)
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
hmiAction("SOP obu弱势交通控制, ", HmiBuildConfig.v2iWeaknessTraffic)
} else {
//V2I场景进PNC
scV2iPnc.isChecked = false
@@ -287,28 +287,28 @@ internal class SOPSettingView @JvmOverloads constructor(
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
HmiBuildConfig.isShowObuV2iView = isChecked
HmiBuildConfig.v2iTotalSwitch = isChecked
}
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("V2N新链路",isChecked)
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", isChecked)
FunctionBuildConfig.isNewV2NData = isChecked
FunctionBuildConfig.v2nNewLinked = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = isChecked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC
scV2nPnc.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
@@ -316,7 +316,7 @@ internal class SOPSettingView @JvmOverloads constructor(
clickEventAnalytics("V2N场景进PNC",isChecked)
hmiAction("SOP V2N场景进PNC, ", isChecked)
CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked)
FunctionBuildConfig.isV2NPnc = isChecked
FunctionBuildConfig.v2nNewLinkedToPNC = isChecked
}
//绿波通行(默认关闭)
@@ -342,7 +342,7 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//V2I场景进PNC
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
scV2iPnc.isChecked = FunctionBuildConfig.v2iToPNC
scV2iPnc.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
@@ -350,19 +350,19 @@ internal class SOPSettingView @JvmOverloads constructor(
clickEventAnalytics("V2I场景进PNC",isChecked)
hmiAction("SOP V2I场景进PNC, ", isChecked)
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
FunctionBuildConfig.isV2IPnc = isChecked
FunctionBuildConfig.v2iToPNC = isChecked
}
//闯红灯预警(默认关闭)
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
scRunRedLightSop.isChecked = HmiBuildConfig.v2iRedLightWarning
scRunRedLightSop.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("闯红灯预警",isChecked)
hmiAction("SOP obu闯红灯预警, ", isChecked)
HmiBuildConfig.isShowRunRedLightView = isChecked
if (HmiBuildConfig.isShowRunRedLightView) {
HmiBuildConfig.v2iRedLightWarning = isChecked
if (HmiBuildConfig.v2iRedLightWarning) {
CallerTelematicManager.sendMsgToAllClients(
TelematicConstant.OBU_RUNREDLIGHT_WARNING,
"1".toByteArray()
@@ -376,25 +376,25 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//路侧弱势交通参与者(默认开启)
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
scObuWeaknessTrafficSop.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("路侧弱势交通参与者",isChecked)
hmiAction("SOP obu弱势交通控制, ", isChecked)
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
HmiBuildConfig.v2iWeaknessTraffic = isChecked
}
//V2V总开关(默认关闭)
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
scObuV2vView.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("V2V总开关",isChecked)
hmiAction("SOP obuV2V开关, ", isChecked)
HmiBuildConfig.isShowObuV2vView = isChecked
HmiBuildConfig.v2vTotalSwitch = isChecked
}
//obu总开关
@@ -599,7 +599,7 @@ internal class SOPSettingView @JvmOverloads constructor(
scExamControl.isChecked = FunctionBuildConfig.isShowExamWindow
scExamControl.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isShowExamWindow = isChecked
CallerDevaToolsManager.showExamControlWindow(this,isChecked)
CallerDevaToolsManager.showExamControlWindow(isChecked)
hmiAction("SOP 考试功能面板, ", isChecked)
clickEventAnalytics("考试功能面板",isChecked)
}

View File

@@ -15,7 +15,6 @@ import com.mogo.eagle.core.function.angle.scenes.Default
import com.mogo.eagle.core.function.angle.scenes.LongSight
import com.mogo.eagle.core.function.api.map.angle.IMoGoVisualAngleChangeProvider
import com.mogo.eagle.core.function.api.map.angle.Scene
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.scope
@@ -85,8 +84,6 @@ class VisualAngleToggleView : FrameLayout, IMoGoVisualAngleChangeProvider.OnMoGo
override fun onAnimationEnd(animation: Animator, isReverse: Boolean) {
super.onAnimationEnd(animation, isReverse)
iv_toggle_block?.isEnabled = true
//TODO renwj
CallerHmiManager.toggleOperatePanel(false)
}
})
animator.interpolator = AccelerateDecelerateInterpolator()
@@ -114,8 +111,6 @@ class VisualAngleToggleView : FrameLayout, IMoGoVisualAngleChangeProvider.OnMoGo
override fun onAnimationEnd(animation: Animator, isReverse: Boolean) {
iv_toggle_block?.isEnabled = true
//TODO renwj
CallerHmiManager.toggleOperatePanel(true)
}
})
animator.interpolator = AccelerateDecelerateInterpolator()

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/icon_operate_panel_checkbox_checked" />
<item android:state_enabled="true" android:state_checked="false" android:drawable="@drawable/icon_operate_panel_checkbox_unchecked" />
<item android:state_enabled="false" android:drawable="@drawable/icon_operate_panel_checkbox_disabled" />
</selector>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<stroke android:width="@dimen/dp_2" android:color="#2EACFF" />
<solid android:color="#4D4D4D" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<solid android:color="#4D4D4D" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="false" android:drawable="@drawable/icon_operate_panel_ok_enabled" />
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@drawable/icon_operate_panel_ok_pressed" />
<item android:drawable="@drawable/icon_operate_panel_ok_disabled" android:state_enabled="false"/>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#1AFFFFFF" />
<corners android:radius="@dimen/dp_30" />
</shape>

View File

@@ -6,5 +6,5 @@
<corners android:radius="@dimen/dp_30" />
</shape>
</item>
<item android:drawable="@android:color/transparent" />
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/icon_operate_panel_switch_compat_checked" />
<item android:state_enabled="true" android:state_checked="false" android:drawable="@drawable/icon_operate_panel_switch_compat_unchecked" />
<item android:state_enabled="false" android:drawable="@drawable/icon_operate_panel_switch_compat_disabled" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<solid android:color="#4d4d4d" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/icon_operate_panel_unman_interval_checked"/>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="#4d4d4d" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler_view"
android:paddingTop="0dip"
android:paddingBottom="@dimen/dp_20" />

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>

View File

@@ -9,5 +9,7 @@
android:textSize="@dimen/dp_30"
android:paddingTop="@dimen/dp_30"
android:paddingStart="@dimen/dp_30"
android:background="@android:color/transparent"
tools:text="地图效果"
android:gravity="start" />
android:gravity="start"
tools:ignore="RtlSymmetry,SpUsage" />

View File

@@ -6,6 +6,7 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="horizontal"
tools:background="#83000000">

View File

@@ -10,5 +10,8 @@
android:paddingTop="@dimen/dp_25"
android:paddingBottom="@dimen/dp_25"
android:paddingStart="@dimen/dp_30"
android:layout_marginEnd="@dimen/dp_30"
android:background="@drawable/bg_operate_panel_preference_header"
tools:text="地图效果"
android:gravity="start" />
android:gravity="start"
tools:ignore="RtlSymmetry,SpUsage" />

View File

@@ -7,6 +7,7 @@
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:orientation="horizontal"
android:background="@android:color/transparent"
tools:background="#83000000">
<TextView
@@ -17,7 +18,8 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"

View File

@@ -7,6 +7,7 @@
android:paddingStart="@dimen/dp_60"
android:paddingEnd="@dimen/dp_30"
android:orientation="horizontal"
android:background="@android:color/transparent"
tools:background="#83000000">
<TextView
@@ -17,7 +18,8 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"

View File

@@ -5,4 +5,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:clickable="false"
android:button="@null"
android:background="@drawable/bg_operate_panel_checkbox"/>

View File

@@ -1,6 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:orientation="horizontal"
android:layout_marginTop="@dimen/dp_20"
tools:background="#83000000">
<LinearLayout
android:id="@+id/ll_speed"
android:layout_width="@dimen/dp_214"
android:layout_height="@dimen/dp_60"
android:background="@drawable/bg_operate_panel_edit"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_speed_minus"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingStart="@dimen/dp_15"
android:src="@drawable/icon_operate_panel_minus"
tools:ignore="ContentDescription,RtlSymmetry" />
<TextView
android:id="@+id/tv_speed_limit"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center"
android:textColor="#ffffff"
android:textSize="@dimen/dp_32"
tools:ignore="SpUsage"
tools:text="65" />
<ImageView
android:id="@+id/iv_speed_add"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingEnd="@dimen/dp_15"
android:src="@drawable/icon_operate_panel_add"
tools:ignore="ContentDescription,RtlSymmetry" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_10"
android:text="km/h"
android:textColor="#ffffff"
android:textSize="@dimen/dp_30"
tools:ignore="HardcodedText,SpUsage" />
<Space
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
<Button
android:id="@+id/bt_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/bg_operate_panel_edit_button"
android:enabled="false" />
</LinearLayout>

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bt_mofang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:enabled="false"
android:clickable="false" />

View File

@@ -1,6 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rg_root"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_20"
android:orientation="horizontal"
android:background="@drawable/bg_radio_group_operate_panel_unman_interval">
<RadioButton
android:id="@+id/rb_5s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="5s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_15s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="15s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_30s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="30s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_45s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="45s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_never"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="从不"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
</RadioGroup>

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:clickable="false"
android:button="@null"
android:thumb="@null"
android:background="@drawable/bg_operate_panel_switch_compat"/>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="horizontal"
tools:background="#83000000">
<EditText
android:id="@+id/et_welcome_words"
android:layout_width="0dip"
android:layout_height="@dimen/dp_60"
android:paddingStart="@dimen/dp_20"
android:paddingEnd="@dimen/dp_20"
android:background="@drawable/bg_operate_panel_welcome_words_edit"
android:textColor="#ffffff"
android:layout_weight="1"
tools:ignore="Autofill,LabelFor,TextFields" />
<Button
android:id="@+id/bt_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_20"
android:enabled="false"
android:background="@drawable/bg_operate_panel_edit_button"/>
</LinearLayout>

View File

@@ -6,9 +6,9 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="vertical"
tools:background="#83000000">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
@@ -16,13 +16,11 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:visibility="gone"
android:orientation="vertical"/>
</LinearLayout>

View File

@@ -43,5 +43,12 @@
android:layout_gravity="top"
android:visibility="gone" />
<ViewStub
android:id="@id/vs_operate_panel"
android:layout_width="@dimen/dp_1046"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_72"
android:inflatedId="@id/id_operate_panel"
android:layout_gravity="start|top"
android:layout="@layout/layout_operate_panel_holder" />
</FrameLayout>

View File

@@ -26,6 +26,7 @@
app:bottomPadding="160"
app:carDrawable="@drawable/taxt_u_p_map_car"
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
app:startPointDrawable="@drawable/taxi_overmap_startpoint"
app:endPointDrawable="@drawable/taxi_overmap_endpoint"
app:globalPathColor="#39BA90"
app:layout_constraintBottom_toBottomOf="parent"
@@ -39,6 +40,21 @@
app:roadTrajectoryDrawable="@drawable/taxi_orvermap_road_trajectory"
app:topPadding="70" />
<com.mogo.eagle.core.function.hmi.ui.viewport.VisualAngleToggleView
android:id="@+id/visualAngleToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginBottom="@dimen/dp_30"
app:layout_constraintBottom_toTopOf="@+id/shadowView"
app:layout_constraintEnd_toEndOf="parent" />
<com.mogo.eagle.core.function.hmi.ui.mofang.MoFangStatusView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle"
app:layout_constraintTop_toTopOf="@+id/visualAngleToggle" />
<View
android:id="@+id/shadowView"
android:layout_width="270dp"

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<dimen name="preferences_header_width" tools:override='true'>@dimen/dp_290</dimen>
</resources>

View File

@@ -7,46 +7,55 @@
android:key="red_or_green_light_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="red_or_green_light_merge_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯融合标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="fault_report_tip"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="异常上报提示"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="limit_speed_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="限速标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="self_routing_verify_mode"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="自主算路验证模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="look_around_360"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="360环视"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="weather_effect_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="天气效果开关"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="system_boot_status_show"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="系统启动状态展示"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithUnmanInterval
android:key="unmanned_demo_pull_interval"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:title="无人化演练任务拉取时间间隔"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_radio_group_custom" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -4,16 +4,19 @@
<SwitchPreferenceCompat
android:key="demo_switch"
android:title="美化模式"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="record_bag_dialog"
android:title="录包弹窗"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="take_over_wake"
android:title="接管提醒"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -4,21 +4,28 @@
<SwitchPreferenceCompat
android:key="danger_obstacles_color_mark"
android:title="危险障碍物颜色标记"
android:defaultValue="@bool/hd_is_pnc_warning"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="route_guide_line_dynamic_effect"
android:title="引导线动态效果"
android:defaultValue="@bool/hd_route_dynamic_effect"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="point_cloud_effect"
android:title="点云效果"
android:defaultValue="@bool/hd_is_point_cloud_effect"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="self_car_aperture"
android:title="自车光圈"
android:defaultValue="@bool/hd_is_self_car_anim"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -3,15 +3,17 @@
<PreferenceCategory
android:layout="@layout/layout_operate_panel_preference_category_title"
android:title="蘑方">
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithMoFang
android:key="mofang_connect"
android:title="连接蘑方"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_mofang_connect"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_mofang_connect"/>
<SwitchPreferenceCompat
android:key="mofang_command_test"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="蘑方指令测试"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -4,62 +4,92 @@
<SwitchPreferenceCompat
android:key="v2x_total_switch"
android:title="V2X总开关"
android:persistent="false"
android:disableDependentsState="false"
android:defaultValue="@bool/v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_total_switch"
android:title="V2N总开关"
android:persistent="false"
android:disableDependentsState="false"
android:dependency="v2x_total_switch"
android:defaultValue="@bool/v2n_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked"
android:title="V2N新链路"
android:persistent="false"
android:dependency="v2n_total_switch"
android:defaultValue="@bool/v2n_new_linked"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked_from_pnc"
android:key="v2n_new_linked_to_pnc"
android:title="V2N场景进PNC"
android:persistent="false"
android:dependency="v2n_total_switch"
android:defaultValue="@bool/v2n_new_linked_to_pnc"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked_green_wave"
android:title="绿波通行"
android:persistent="false"
android:defaultValue="@bool/v2n_green_wave"
android:dependency="v2n_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_total_switch"
android:title="V2I总开关"
android:persistent="false"
android:dependency="v2x_total_switch"
android:disableDependentsState="false"
android:defaultValue="@bool/v2i_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_from_pnc"
android:key="v2i_to_pnc"
android:title="V2I场景进PNC"
android:persistent="false"
android:defaultValue="@bool/v2i_from_pnc"
android:dependency="v2i_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_run_on_red_light"
android:key="v2i_red_light_warning"
android:title="闯红灯预警"
android:persistent="false"
android:dependency="v2i_total_switch"
android:defaultValue="@bool/v2i_red_green_warning"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_weakness_participant"
android:key="v2i_weakness_traffic"
android:title="路侧弱势交通参与者"
android:persistent="false"
android:dependency="v2i_total_switch"
android:defaultValue="@bool/v2i_weakness_traffic"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2v_total_switch"
android:title="V2V总开关"
android:persistent="false"
android:defaultValue="@bool/v2v_total_switch"
android:disableDependentsState="false"
android:dependency="v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="obu_total_switch"
android:title="OBU总开关"
android:persistent="false"
android:defaultValue="@bool/obu_total_switch"
android:dependency="v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -7,75 +7,90 @@
android:key="pnc_park_intersection_car"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="PNC-Park-会车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="pnc_park_overtake_car"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="PNC-Park-超车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="detour_retard_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="绕障减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="rain_day"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="雨天模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="fault_deceleration_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="故障减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="weak_net_deceleration_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="弱网减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="exam_function_panel"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="考试功能面板"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<CheckBoxPreference
android:key="all_merge_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="全融合模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="blind_area_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="盲区模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="beyond_visual_range_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="超视距模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="transparent_transfer_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="超视距模式"
android:title="透传模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="pure_obu_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="纯路侧模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="auto_pilot_speed_thresholds"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:title="自动驾驶速度阈值"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="change_lane_speed_thresholds"
android:title="变道速度阈值"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="overtake_speed_thresholds"
android:title="超车速度阈值"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
</PreferenceCategory>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:layout="@layout/layout_operate_panel_preference_category_title"
android:title="外屏欢迎语(1-9个字符避免生僻字符)">
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithWelcomeWords
android:key="welcome_words"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_edit_button"/>
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$V2XPreferenceFragmentCompat"
android:key="v2x"
android:selectable="true"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="V2X" />
<Preference
@@ -31,4 +31,10 @@
android:key="mofang"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="蘑方" />
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"
android:key="welcome_words"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="欢迎语"/>
</androidx.preference.PreferenceScreen>

View File

@@ -226,7 +226,7 @@ class TravelRealityView @JvmOverloads constructor(
*/
@Volatile
private var isSmallMap: Boolean = true
private var iconRes = R.drawable.map_car_icon
private var iconRes = R.drawable.small_map_car
private var globalPathResp: MessagePad.GlobalPathResp? = null
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mSmallCarMarker: Marker? = null
@@ -394,13 +394,6 @@ class TravelRealityView @JvmOverloads constructor(
mAMap?.isTrafficEnabled = false
// 设置 锚点 图标
if (isInit) {
iconRes = if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) {
R.drawable.map_bus_icon
} else if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode) || AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)) {
R.drawable.map_m2_icon
} else {
R.drawable.map_car_icon
}
mSmallCarMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(iconRes))
@@ -408,11 +401,11 @@ class TravelRealityView @JvmOverloads constructor(
)
mSmallStartMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_start))
.icon(BitmapDescriptorFactory.fromResource(R.drawable.small_map_start))
)
mSmallEndMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_end))
.icon(BitmapDescriptorFactory.fromResource(R.drawable.small_map_end))
)
// 加载自定义样式
val customMapStyleOptions = CustomMapStyleOptions()
@@ -671,7 +664,16 @@ class TravelRealityView @JvmOverloads constructor(
// roadWidth = maxRoadWidth
// globalWidth = maxGlobalWidth
// }
val optionList = ArrayList<MarkerOptions>()
optionList.add(
MarkerOptions().apply {
icon(BitmapDescriptorFactory.fromResource(startPointDrawable))
position(coordinateConverterWgsToGcj(
globalData[0].lat,
globalData[0].lon
))
}
)
val endOption = MarkerOptions()
endOption.icon(BitmapDescriptorFactory.fromResource(endPointDrawable))
endOption.position(
@@ -680,8 +682,9 @@ class TravelRealityView @JvmOverloads constructor(
globalData[globalData.size - 1].lon
)
)
// 绘制终点
drawEndMarker(endOption)
optionList.add(endOption)
// 绘制起终点
drawStartEndMarker(optionList)
// 绘制全局轨迹
drawPolyline(DRAW_POLY_LINE, globalOptions)
}
@@ -1315,7 +1318,7 @@ class TravelRealityView @JvmOverloads constructor(
}
}
private fun drawEndMarker(options: MarkerOptions) {
private fun drawStartEndMarker(options: List<MarkerOptions>) {
Message.obtain().apply {
what = DRAW_END_MARKER
obj = options
@@ -1493,6 +1496,11 @@ class TravelRealityView @JvmOverloads constructor(
30
)
)
mPolyline = mAMap!!.addPolyline(
PolylineOptions()
.color(Color.argb(255, 77, 212, 100))// 255, 31, 127, 255
.width(12f)
)
// 绘制线
mPolyline?.points = mCoordinatesLatLng
CallerLogger.d(
@@ -1766,7 +1774,7 @@ class TravelRealityView @JvmOverloads constructor(
DRAW_END_MARKER -> {
removeMessages(DRAW_END_MARKER)
if (isMapDestroyed) return
realDrawEndMarker(msg.obj as MarkerOptions)
realDrawEndMarker(msg.obj as ArrayList<MarkerOptions>)
}
UPDATE_VIDEO_MARKER -> {
@@ -1975,13 +1983,22 @@ class TravelRealityView @JvmOverloads constructor(
}
}
private fun realDrawEndMarker(options: MarkerOptions) {
private fun realDrawEndMarker(options: List<MarkerOptions>) {
Log.d(TAG, "realDrawEndMarker")
mStartMarker?.destroy()
mStartMarker = null
mEndMarker?.destroy()
mEndMarker = null
if (options.size < 2) return
if (startPointDrawable != -1) {
mStartMarker = mAMap?.addMarker(
options[0]
)
mStartMarker?.isClickable = false
}
if (endPointDrawable != -1) {
mEndMarker = mAMap?.addMarker(
options
options[1]
)
mEndMarker?.isClickable = false
}
@@ -1994,6 +2011,8 @@ class TravelRealityView @JvmOverloads constructor(
private fun realClearAllMarkersAndPolyline() {
Log.d(TAG, "realClearAllMarkersAndPolyline")
// 清除终点
mStartMarker?.destroy()
mStartMarker = null
mEndMarker?.destroy()
mEndMarker = null
// 清除道路事件icon

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB