add func of configbiz and wait to finish
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.enums.isLeft
|
||||
import com.mogo.eagle.core.data.enums.isRight
|
||||
|
||||
class EventTypeHelper {
|
||||
|
||||
companion object {
|
||||
|
||||
fun getLCW(
|
||||
direction: WarningDirectionEnum,
|
||||
data: ((alertContent: String, ttsContent: String) -> Unit)
|
||||
) {
|
||||
when {
|
||||
direction.isLeft() -> {
|
||||
data.invoke(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "左"),
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "左")
|
||||
)
|
||||
}
|
||||
direction.isRight() -> {
|
||||
data.invoke(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "右"),
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "右")
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
data.invoke(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType),
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getCLW(
|
||||
direction: WarningDirectionEnum,
|
||||
data: ((alertContent: String, ttsContent: String) -> Unit)
|
||||
){
|
||||
data.invoke(EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_CLW.poiType + direction.desc)
|
||||
,EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_CLW.poiType + direction.desc))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user