diff --git a/OCH/bus/driver/src/main/res/layout/bus_base_fragment.xml b/OCH/bus/driver/src/main/res/layout/bus_base_fragment.xml index 2f1f084ed3..7268f93076 100644 --- a/OCH/bus/driver/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/bus/driver/src/main/res/layout/bus_base_fragment.xml @@ -102,6 +102,16 @@ app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" tools:visibility="visible" /> + + + + + + + + + + state: $state, last: $last") + if (last != state) { + if (last == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { + // 由自驾状态改为非自驾,发送复原指令 + handleSingleClick(KeyEvent.KEYCODE_B) + } + autoPilotState.set(state) + } + } + + override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { + super.onAutopilotIpcConnectStatusChanged(status, reason) + Log.d(TAG, "收到工控机连接状态回调 -> status: $status, reason: $reason") + val prev = ipcConnectState.get() + val current = CallerAutoPilotStatusListenerManager.isConnect() + if (!current && prev) { + Log.d(TAG, "工控机连接断开了: -> status: $status, reason: $reason") + CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.V2X, V2XMsg( + EventTypeEnumNew.TYPE_IPC_DISCONNECT_FOR_MO_FANG.poiType, + EventTypeEnumNew.TYPE_IPC_DISCONNECT_FOR_MO_FANG.content, + EventTypeEnumNew.TYPE_VERIFICATION_SUCCESSFUL.tts, + "" + ))) + } + ipcConnectState.set(current) + } } private val handlerCallback = Handler.Callback { msg -> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/mofang/MoFangStatusView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/mofang/MoFangStatusView.kt new file mode 100644 index 0000000000..2cd44ef86b --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/mofang/MoFangStatusView.kt @@ -0,0 +1,255 @@ +package com.mogo.eagle.core.function.hmi.ui.mofang + +import android.content.Context +import android.util.AttributeSet +import android.util.Log +import android.view.KeyEvent +import android.view.View +import android.widget.LinearLayout +import androidx.core.content.ContextCompat +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener +import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangProvider.OnMoFangStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager +import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import kotlinx.android.synthetic.main.layout_mofang_status.view.tv_icon_1 +import kotlinx.android.synthetic.main.layout_mofang_status.view.tv_icon_2 +import kotlinx.android.synthetic.main.layout_mofang_status.view.tv_icon_3 +import kotlinx.android.synthetic.main.layout_mofang_status.view.tv_icon_4 +import kotlinx.android.synthetic.main.layout_mofang_status.view.tv_icon_5 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_lp_1 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_lp_2 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_lp_3 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_lp_4 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_lp_5 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_sp_1 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_sp_2 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_sp_3 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_sp_4 +import kotlinx.android.synthetic.main.layout_mofang_status.view.v_sp_5 +import me.jessyan.autosize.utils.AutoSizeUtils +import java.util.concurrent.atomic.AtomicInteger + +/** + * 蘑方输入/执行状态反馈控件 + */ +class MoFangStatusView : LinearLayout, OnMoFangStatusListener, IMoGoAutopilotStatusListener { + + companion object { + private const val TAG = "MoFangStatusView" + } + + private val autoPilotState by lazy { AtomicInteger(CallerAutoPilotStatusListenerManager.getState()) } + + constructor(context: Context) : super(context) + constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) + constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + + init { + View.inflate(context, R.layout.layout_mofang_status, this) + orientation = VERTICAL + background = ContextCompat.getDrawable(context, R.drawable.bg_mf_status) + val lr = AutoSizeUtils.dp2px(context, 30f) + val tb = AutoSizeUtils.dp2px(context, 33f) + setPadding(lr, tb, lr, tb) + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + CallerAutoPilotStatusListenerManager.addListener(TAG, this) + visibility = if (CallerDevaToolsManager.mofang()?.isConnected() == true) { + View.VISIBLE + } else { + View.INVISIBLE + } + CallerDevaToolsManager.mofang()?.registerMoFangStatusListener(TAG, this) + } + + override fun onMoFangConnected() { + visibility = View.VISIBLE + } + + override fun onMoFangDisconnected() { + visibility = View.INVISIBLE + } + + override fun onAutopilotStatusResponse(state: Int) { + super.onAutopilotStatusResponse(state) + val last = autoPilotState.get() + Log.d(TAG, "收到工控机自驾状态回调 -> state: $state, last: $last") + if (last != state) { + if (last == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { + reset() + } + autoPilotState.set(state) + } + } + + override fun onMoFangBatteryChanged(battery: Int) {} + + override fun onMoFangClicked(keyCode: Int) { + if (keyCode == KeyEvent.KEYCODE_A) { + if (tv_icon_2?.tag != 2 && tv_icon_2?.isSelected == true) { + tv_icon_2?.isSelected = false + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = false + v_sp_2?.visibility = View.INVISIBLE + } + tv_icon_1?.isSelected = true + v_lp_1?.visibility = View.INVISIBLE + v_sp_1?.visibility = View.VISIBLE + } + + if (keyCode == KeyEvent.KEYCODE_B) { + if (tv_icon_1?.isSelected == true) { + tv_icon_1?.isSelected = false + v_lp_1?.visibility = View.VISIBLE + v_lp_1?.isSelected = false + v_sp_1?.visibility = View.INVISIBLE + } + tv_icon_2?.isSelected = true + tv_icon_2?.tag = 1 + v_lp_2?.visibility = View.INVISIBLE + v_sp_2?.visibility = View.VISIBLE + UiThreadHandler.postDelayed({ + tv_icon_2?.tag = null + tv_icon_2?.isSelected = false + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = false + v_sp_2?.visibility = View.INVISIBLE + }, 1000) + } + + if (keyCode == KeyEvent.KEYCODE_C) { + tv_icon_3?.isSelected = true + v_lp_3?.visibility = View.INVISIBLE + v_sp_3?.visibility = View.VISIBLE + UiThreadHandler.postDelayed({ + tv_icon_3?.isSelected = false + v_lp_3?.visibility = View.VISIBLE + v_lp_3?.isSelected = false + v_sp_3?.visibility = View.INVISIBLE + }, 1000) + } + + if (keyCode == KeyEvent.KEYCODE_D) { + tv_icon_4?.isSelected = true + v_lp_4?.visibility = View.INVISIBLE + v_sp_4?.visibility = View.VISIBLE + UiThreadHandler.postDelayed({ + tv_icon_4?.isSelected = false + v_lp_4?.visibility = View.VISIBLE + v_lp_4?.isSelected = false + v_sp_4?.visibility = View.INVISIBLE + }, 1000) + } + + if (keyCode == KeyEvent.KEYCODE_E) { + tv_icon_5?.isSelected = true + v_lp_5?.visibility = View.INVISIBLE + v_sp_5?.visibility = View.VISIBLE + UiThreadHandler.postDelayed({ + tv_icon_5?.isSelected = false + v_lp_5?.visibility = View.VISIBLE + v_lp_5?.isSelected = false + v_sp_5?.visibility = View.INVISIBLE + }, 1000) + } + } + + override fun onMoFangLongClicked(keyCode: Int) { + if (keyCode == KeyEvent.KEYCODE_A) { + if (tv_icon_2?.tag != 2 && tv_icon_2?.isSelected == true) { + tv_icon_2?.isSelected = false + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = false + v_sp_2?.visibility = View.INVISIBLE + } + tv_icon_1?.isSelected = true + v_lp_1?.visibility = View.VISIBLE + v_lp_1?.isSelected = true + v_sp_1?.visibility = View.INVISIBLE + } + + if (keyCode == KeyEvent.KEYCODE_B) { + tv_icon_2?.isSelected = true + tv_icon_2?.tag = 2 + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = true + v_sp_2?.visibility = View.INVISIBLE + UiThreadHandler.postDelayed({ + tv_icon_2?.tag = null + tv_icon_2?.isSelected = false + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = false + v_sp_2?.visibility = View.INVISIBLE + }, 1000) + } + + if (keyCode == KeyEvent.KEYCODE_E) { + tv_icon_5?.isSelected = true + v_lp_5?.visibility = View.VISIBLE + v_lp_5?.isSelected = true + v_sp_5?.visibility = View.INVISIBLE + UiThreadHandler.postDelayed({ + tv_icon_5?.isSelected = false + v_lp_5?.visibility = View.VISIBLE + v_lp_5?.isSelected = false + v_sp_5?.visibility = View.INVISIBLE + }, 1000) + } + } + + override fun onMoFangCombineClicked(vararg keyCodes: Int) { + if (keyCodes.size != 2) { + return + } + val key1 = keyCodes[0] + val key2 = keyCodes[1] + if (key1 == KeyEvent.KEYCODE_A && key2 == KeyEvent.KEYCODE_B || (key1 == KeyEvent.KEYCODE_B && key2 == KeyEvent.KEYCODE_A)) { + tv_icon_1?.isSelected = true + v_lp_1?.visibility = View.INVISIBLE + v_sp_1?.visibility = View.VISIBLE + tv_icon_2?.isSelected = true + v_lp_2.visibility = View.INVISIBLE + v_sp_2.visibility = View.VISIBLE + } + } + + override fun onMoFangStatusError(msg: String) {} + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + CallerDevaToolsManager.mofang()?.unRegisterMoFangStatusListener(this) + CallerAutoPilotStatusListenerManager.removeListener(TAG) + } + + private fun reset() { + tv_icon_1?.isSelected = false + v_lp_1?.visibility = View.VISIBLE + v_lp_1?.isSelected = false + v_sp_1?.visibility = View.INVISIBLE + + tv_icon_2?.isSelected = false + v_lp_2?.visibility = View.VISIBLE + v_lp_2?.isSelected = false + v_sp_2?.visibility = View.INVISIBLE + + + tv_icon_3?.isSelected = false + v_lp_3?.visibility = View.VISIBLE + v_lp_3?.isSelected = false + v_sp_3?.visibility = View.INVISIBLE + + tv_icon_4?.isSelected = false + v_lp_4?.visibility = View.VISIBLE + v_lp_4?.isSelected = false + v_sp_4?.visibility = View.INVISIBLE + + tv_icon_5?.isSelected = false + v_lp_5?.visibility = View.VISIBLE + v_lp_5?.isSelected = false + v_sp_5?.visibility = View.INVISIBLE + } +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/BlueToothView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/BlueToothView.kt index b5a9855c83..c8cc88b6ce 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/BlueToothView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/BlueToothView.kt @@ -2,22 +2,28 @@ package com.mogo.eagle.core.function.hmi.ui.widget import android.annotation.* import android.content.Context -import android.graphics.* -import android.graphics.drawable.* +import android.os.SystemClock import android.util.AttributeSet +import android.util.Log import android.view.* import android.widget.LinearLayout +import androidx.core.content.ContextCompat +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.devatools.mofang.* +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.devatools.* 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 kotlinx.android.synthetic.main.view_blue_tooth.view.* +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicLong /** * 魔戒蓝牙控件 * 放置于StatusBar右侧位置 */ -open class BlueToothView: LinearLayout, IMoGoMoFangProvider.OnMoFangStatusListener { +open class BlueToothView: LinearLayout, IMoGoMoFangProvider.OnMoFangStatusListener, IMoGoAutopilotStatusListener { constructor(context: Context) : this(context, null) constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0) @@ -27,25 +33,57 @@ open class BlueToothView: LinearLayout, IMoGoMoFangProvider.OnMoFangStatusListen LayoutInflater.from(context).inflate(R.layout.view_blue_tooth , this, true) visibility = View.GONE - clipChildren = false clipToPadding = false + onClick { + runCatching { + val mofang = CallerDevaToolsManager.mofang() + if (mofang != null && !mofang.isConnected()) { + Log.d(TAG, "--- 点击重连 ---") + mofang.connect() + } + } + } } companion object{ private const val TAG = "BlueToothView" } + private val prevTime by lazy { AtomicLong(0) } + override fun onAttachedToWindow() { super.onAttachedToWindow() + ivMoFangStatus?.tag = 0 val isConnected = CallerDevaToolsManager.mofang()?.isConnected() ?: false visibility = if (isConnected) View.VISIBLE else View.GONE + val isIpcConnected = CallerAutoPilotStatusListenerManager.isConnect() + if (!isIpcConnected) { + if (visibility == View.VISIBLE) { + ivMoFangStatus?.tag = 1 + ivMoFangStatus?.background = (ContextCompat.getDrawable(context, R.drawable.icon_mofang_ipc_disconnected)) + } + } CallerDevaToolsManager.mofang()?.registerMoFangStatusListener(TAG, this) + CallerAutoPilotStatusListenerManager.addListener(TAG, this) + } + + override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { + super.onAutopilotIpcConnectStatusChanged(status, reason) + if (!CallerAutoPilotStatusListenerManager.isConnect()) { + if (ivMoFangStatus?.tag == 0) { + ivMoFangStatus?.tag = 1 + ivMoFangStatus?.background = (ContextCompat.getDrawable(context, R.drawable.icon_mofang_ipc_disconnected)) + } + } else { + ivMoFangStatus?.tag = 0 + } } override fun onDetachedFromWindow() { super.onDetachedFromWindow() CallerDevaToolsManager.mofang()?.unRegisterMoFangStatusListener(this) + CallerAutoPilotStatusListenerManager.removeListener(TAG) } override fun onMoFangConnected() { @@ -56,28 +94,29 @@ open class BlueToothView: LinearLayout, IMoGoMoFangProvider.OnMoFangStatusListen visibility = View.GONE } + @SuppressLint("SetTextI18n") override fun onMoFangBatteryChanged(battery: Int) { - ivMoFangBattery?.also { - if (it.visibility != View.VISIBLE) { - it.visibility = View.VISIBLE - } - val oldTextColor = it.currentTextColor + if (CallerAutoPilotStatusListenerManager.isConnect()) { if (battery <= 30) { - if (oldTextColor != Color.RED) { - it.setTextColor(Color.RED) - ivMoFangStatus?.drawable?.setTint(Color.RED) - postDelayed({ - ToastUtils.showShort("蘑方处于低电状态, 请及时充电") - }, 5000) + post { + runCatching { + val prev = prevTime.get() + val current = SystemClock.elapsedRealtime() + if (prev == 0L || TimeUnit.MILLISECONDS.toSeconds(current - prev) >= 30) { + ToastUtils.showShort("蘑方当前处于低电状态,请及时充电") + prevTime.set(current) + } + ivMoFangStatus?.background = (ContextCompat.getDrawable(context, R.drawable.icon_mofang_low_power)) + } } } else { - if (oldTextColor != Color.WHITE) { - it.setTextColor(Color.WHITE) - ivMoFangStatus?.drawable?.setTint(Color.WHITE) + post { + runCatching { + ivMoFangStatus?.background = (ContextCompat.getDrawable(context, R.drawable.icon_mofang_normal_power)) + } } } - it.text = "${battery}%" } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_ipc_disconnected.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_ipc_disconnected.png new file mode 100644 index 0000000000..2cf8ccad2f Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_ipc_disconnected.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_low_power.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_low_power.png new file mode 100644 index 0000000000..b51fb85979 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_low_power.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_normal_power.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_normal_power.png new file mode 100644 index 0000000000..335b753ea8 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_mofang_normal_power.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key.xml new file mode 100644 index 0000000000..7ef19ffff4 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key_group.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key_group.xml new file mode 100644 index 0000000000..b4373766e7 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_key_group.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_lp_bar.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_lp_bar.xml new file mode 100644 index 0000000000..e6ed6e0ccd --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_lp_bar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_sp_bar.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_sp_bar.xml new file mode 100644 index 0000000000..db47fd1fcc --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_sp_bar.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_status.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_status.xml new file mode 100644 index 0000000000..d57d698808 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_mf_status.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/blue_tooth.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/blue_tooth.png deleted file mode 100644 index 97eaf32b50..0000000000 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/blue_tooth.png and /dev/null differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_mofang_status.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_mofang_status.xml new file mode 100644 index 0000000000..c5dcdbabb8 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_mofang_status.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_blue_tooth.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_blue_tooth.xml index 24e8679ed0..913f652817 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_blue_tooth.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_blue_tooth.xml @@ -9,23 +9,8 @@ - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_bar.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_bar.xml index 226fef29b4..c4847f676a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_bar.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_bar.xml @@ -40,7 +40,6 @@ diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index fe10837554..95488b517f 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -593,8 +593,10 @@ enum class EventTypeEnumNew( TYPE_VIP_IDENTIFICATION_PASS("20022", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行,已为您变为绿灯", "VIP车辆优先通行,已为您变为绿灯"), TYPE_VIP_IDENTIFICATION_EXTEND("20023", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行,已为您延长绿灯", "VIP车辆优先通行,已为您延长绿灯"), TYPE_VIP_ERROR_IDENTIFICATION("20024", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,稍后重试"), - TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "路线推荐", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线"); + TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "路线推荐", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线"), + //蘑方指令下发时,工控机与pad断连提示 + TYPE_IPC_DISCONNECT_FOR_MO_FANG("20025", "连接异常", "", R.drawable.icon_warning_take_over, "工控机连接异常,无法执行魔方命令", ""); companion object { @JvmStatic @@ -1114,6 +1116,10 @@ enum class EventTypeEnumNew( TYPE_USECASE_ID_LTA.poiType ->{ TYPE_USECASE_ID_LTA.poiTypeStr } + //蘑方指令下发时,工控机与pad断连提示 + TYPE_IPC_DISCONNECT_FOR_MO_FANG.poiType -> { + TYPE_IPC_DISCONNECT_FOR_MO_FANG.poiTypeStr + } else ->{ "事件通知" } @@ -1313,7 +1319,6 @@ enum class EventTypeEnumNew( TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr - else -> { R.drawable.icon_default }