From c66a71178668851cc6c1d41a2fbf0e6cdb3201d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Fri, 6 Aug 2021 18:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20HMI=20=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mogo-module-hmi/README.md | 79 ++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/modules/mogo-module-hmi/README.md b/modules/mogo-module-hmi/README.md index b5f9e05f5a..d9875ad972 100644 --- a/modules/mogo-module-hmi/README.md +++ b/modules/mogo-module-hmi/README.md @@ -1,2 +1,79 @@ #### 说明 -这里承载 OBU、ADAS、云端下发、软件自处理,预警的展示 \ No newline at end of file +这里承载 OBU、ADAS、云端下发、软件自处理,预警的展示 + +#### HMI 模块能力接口总控 +```kotlin +// 模块能力接口总控 +private var mMogoServiceApis: IMogoServiceApis? = null +private var mIMoGoWaringProvider: IMoGoWaringProvider? = null + + +mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS) + .navigation(context) as IMogoServiceApis +// 获取预警模块的接口 +mIMoGoWaringProvider = mMogoServiceApis!!.waringProviderApi +``` + +##### 顶部弹窗预警 +```kotlin +/** + * 触发弹窗 + * + * @param v2xType V2X类型 @WarningTypeEnum + * @param alertContent 提醒文本 + * @param ttsContent tts语音播报消息 + * @param tag tag绑定弹窗的标志 + */ +mIMoGoWaringProvider!!.showWarningV2X( + v2xType, + alertContent, + ttsContent, + tag + ) + +/** + * 关闭指定tag的弹窗 + * + * @param tag tag绑定弹窗的标志 + */ +mIMoGoWaringProvider!!.disableWarningV2X( + tag + ) + +``` + + +##### 红绿灯控件 +```kotlin + +/** + * 展示交通灯 + * + * @param trafficLightCheckType 选中的交通的灯 0-都是默认,1-红,2-黄,3-绿 + */ +mIMoGoWaringProvider!!.showWarningTrafficLight(trafficLightCheckType) + +/** + * 关闭交通灯 + */ +mIMoGoWaringProvider!!.disableWarningTrafficLight() + +``` + +##### 限速控件 +```kotlin + +/** + * 展示限速标志 + * + * @param limitingVelocitySpeed 限速速度 + */ +mIMoGoWaringProvider!!.showLimitingVelocity(limitingVelocitySpeed) + + +/** + * 关闭限速标志 + */ +mIMoGoWaringProvider!!.disableLimitingVelocity() + +```