From 50fef032e9b6f5710a8818919bc2ed19378c5409 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Mon, 24 Oct 2022 16:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=BD=E5=B7=A5=E5=8D=A0?= =?UTF-8?q?=E9=81=93=E9=A2=84=E8=AD=A6=E4=B8=8B=E5=8F=91=E5=B7=A5=E6=8E=A7?= =?UTF-8?q?=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/MoGoHmiFragment.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 0cf6b4e746..a753542c17 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -88,6 +88,7 @@ import com.mogo.eagle.core.utilcode.kotlin.* import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.* import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI +import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.mogo.toast.TipToast import com.mogo.eagle.core.utilcode.reminder.* import com.mogo.eagle.core.utilcode.reminder.api.* @@ -743,6 +744,18 @@ class MoGoHmiFragment : MvpFragment(), activity?.let { val warningContent = alertContent ?: EventTypeEnum.getWarningContent(v2xType) + + //占道施工预警 + if (v2xType.equals("10006") || v2xType.equals("100061")) { + val currentTime = System.currentTimeMillis() / 1000 + val oldTime = + context?.let { it -> SharedPrefsMgr.getInstance(it).getLong("roadwork", 0) } + if (currentTime - oldTime!! > 60) { //超过一分钟,才会继续播报重复提醒 + context?.let { it -> SharedPrefsMgr.getInstance(it).putLong("roadwork", System.currentTimeMillis() / 1000) } + CallerAutoPilotManager.sendTripInfo(5, "", "", false); + } + } + if (warningContent.isEmpty()) { CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!") return