Files
MoGoEagleEye/modules/mogo-module-hmi/README.md
2021-08-06 18:02:58 +08:00

80 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#### 说明
这里承载 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()
```