fix bug tts of callchat and trafficlight code
This commit is contained in:
zhongchao
2021-11-15 20:14:41 +08:00
parent 9deee6d58c
commit 0da4b20852
7 changed files with 61 additions and 25 deletions

View File

@@ -16,15 +16,16 @@ import com.mogo.eagle.core.function.call.base.CallerBase
* HMI 调用者管理这里对外及其他模块提供功能的调用用啥写啥不要过度设计不允许直接将Provider暴露出去
*/
object CallerHmiManager : CallerBase() {
private val waringProviderApi: IMoGoWaringProvider?
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_HMI).navigation() as IMoGoWaringProvider
private val waringProviderApi: IMoGoWaringProvider
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_HMI)
.navigation() as IMoGoWaringProvider;
/**
* 隐藏 脉速表
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setSpeedChartViewVisibility(visibility: Int) {
waringProviderApi?.setSpeedChartViewVisibility(visibility)
waringProviderApi.setSpeedChartViewVisibility(visibility)
}
/**
@@ -32,7 +33,7 @@ object CallerHmiManager : CallerBase() {
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setAutopilotStatusViewVisibility(visibility: Int) {
waringProviderApi?.setAutopilotStatusViewVisibility(visibility)
waringProviderApi.setAutopilotStatusViewVisibility(visibility)
}
/**
@@ -40,7 +41,7 @@ object CallerHmiManager : CallerBase() {
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setPerspectiveSwitchViewVisibility(visibility: Int) {
waringProviderApi?.setPerspectiveSwitchViewVisibility(visibility)
waringProviderApi.setPerspectiveSwitchViewVisibility(visibility)
}
/**
@@ -48,7 +49,7 @@ object CallerHmiManager : CallerBase() {
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setCheckStatusViewVisibility(visibility: Int) {
waringProviderApi?.setCheckStatusViewVisibility(visibility)
waringProviderApi.setCheckStatusViewVisibility(visibility)
}
/**
@@ -66,7 +67,7 @@ object CallerHmiManager : CallerBase() {
tag: String?,
listenerIMoGo: IMoGoWarningStatusListener?
) {
waringProviderApi?.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo)
waringProviderApi.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo)
}
/**
@@ -74,7 +75,7 @@ object CallerHmiManager : CallerBase() {
* @param tag 弹窗标识
*/
fun disableWarningV2X(tag: String?) {
waringProviderApi?.disableWarningV2X(tag)
waringProviderApi.disableWarningV2X(tag)
}
/**
@@ -83,35 +84,42 @@ object CallerHmiManager : CallerBase() {
* @param checkLightId 0-都是默认1-红2-黄3-绿
*/
fun showWarningTrafficLight(checkLightId: Int) {
waringProviderApi?.showWarningTrafficLight(checkLightId)
waringProviderApi.showWarningTrafficLight(checkLightId)
}
/**
* 关闭红绿灯预警
*/
fun disableWarningTrafficLight() {
waringProviderApi?.disableWarningTrafficLight()
waringProviderApi.disableWarningTrafficLight()
}
/**
* 红绿灯是否展示
*/
fun isWarningTrafficLightShow(): Boolean {
return waringProviderApi.isWarningTrafficLightShow()
}
/**
* 修改红灯倒计时
*/
fun changeCountdownRed(redNum: Int) {
waringProviderApi?.changeCountdownRed(redNum)
waringProviderApi.changeCountdownRed(redNum)
}
/**
* 修改黄灯倒计时
*/
fun changeCountdownYellow(yellowNum: Int) {
waringProviderApi?.changeCountdownYellow(yellowNum)
waringProviderApi.changeCountdownYellow(yellowNum)
}
/**
* 修改绿灯倒计时
*/
fun changeCountdownGreen(greenNum: Int) {
waringProviderApi?.changeCountdownGreen(greenNum)
waringProviderApi.changeCountdownGreen(greenNum)
}
/**
@@ -120,7 +128,7 @@ object CallerHmiManager : CallerBase() {
* @param greenNum 绿灯倒计时
*/
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
waringProviderApi?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
waringProviderApi.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
}
/**
@@ -129,14 +137,14 @@ object CallerHmiManager : CallerBase() {
* @param limitingSpeed 限速速度
*/
fun showLimitingVelocity(limitingSpeed: Int) {
waringProviderApi?.showLimitingVelocity(limitingSpeed)
waringProviderApi.showLimitingVelocity(limitingSpeed)
}
/**
* 关闭限速预警
*/
fun disableLimitingVelocity() {
waringProviderApi?.disableLimitingVelocity()
waringProviderApi.disableLimitingVelocity()
}
/**
@@ -145,7 +153,7 @@ object CallerHmiManager : CallerBase() {
* @see WarningDirectionEnum
*/
fun showWarning(direction: WarningDirectionEnum) {
waringProviderApi?.showWarning(direction)
waringProviderApi.showWarning(direction)
}
/**
@@ -155,7 +163,7 @@ object CallerHmiManager : CallerBase() {
* @param closeTime 倒计时
*/
fun showWarning(direction: WarningDirectionEnum, closeTime: Long) {
waringProviderApi?.showWarning(direction, closeTime)
waringProviderApi.showWarning(direction, closeTime)
}
/**
@@ -164,7 +172,7 @@ object CallerHmiManager : CallerBase() {
* @param trafficStylePushData
*/
fun showTrafficBanner(trafficStylePushData: NoticeTrafficStylePushData?) {
waringProviderApi?.showNoticeForTrafficWithData(trafficStylePushData)
waringProviderApi.showNoticeForTrafficWithData(trafficStylePushData)
}
/**
@@ -172,21 +180,21 @@ object CallerHmiManager : CallerBase() {
*
*/
fun showNoticeNormalData(noticeNormal: NoticeNormalData) {
waringProviderApi?.showNoticeNormalData(noticeNormal)
waringProviderApi.showNoticeNormalData(noticeNormal)
}
/**
* 展示VIP标识
*/
fun vipIdentification(visible: Boolean) {
waringProviderApi?.vipIdentification(visible)
waringProviderApi.vipIdentification(visible)
}
fun startRoadCameraLive(flvUrl: String) {
waringProviderApi?.startRoadCameraLive(flvUrl)
waringProviderApi.startRoadCameraLive(flvUrl)
}
fun showNoSignalView() {
waringProviderApi?.showNoSignView()
waringProviderApi.showNoSignView()
}
}