diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 62b6e5d953..f22ffd93a5 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -127,13 +127,13 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener ttsContent = EventTypeEnumNew.getWarningTts(appId) alertContent = String.format( //事件才有影响范围 alertContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(), - Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString(), + Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() ) ttsContent = String.format( ttsContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(), - Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString(), + Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() ) } @@ -210,11 +210,11 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener ttsContent = EventTypeEnumNew.getWarningTts(appId) alertContent = String.format( //标牌是没有影响范围的 alertContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString() ) ttsContent = String.format( ttsContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString() ) } @@ -225,13 +225,13 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener ttsContent = EventTypeEnumNew.getWarningTts(appId) alertContent = String.format( //事件才有影响范围 alertContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(), - Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString(), + Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() ) ttsContent = String.format( ttsContent, - Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(), - Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString() + Math.round(rsiWarningData.warningMsgList[0].distance).toString(), + Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() ) } @@ -252,8 +252,11 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener if (alertContent.isEmpty() || ttsContent.isEmpty()) { return } - saveObuToDcData(appId, alertContent, ttsContent) - showWarning(appId, alertContent, ttsContent, direction) + //大于10m,才提示rsi + if (Math.round(rsiWarningData.warningMsgList[0].distance) > 10) { + saveObuToDcData(appId, alertContent, ttsContent) + showWarning(appId, alertContent, ttsContent, direction) + } } MogoObuConstants.STATUS.UPDATE -> { // 更新 @@ -392,14 +395,14 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener "${M_OBU}${TAG}", "MogoObuDcCombineManager onMogoObuMapMath = ${data.status} --speedMaxLimit = ${ Math.round( - (data.speedMaxLimit * 0.02 * 3.6) + (data.speedMaxLimit * 3.6) ) } --- data.speedMaxLimit = ${data.speedMaxLimit}" ) when (data.status) { MogoObuConstants.STATUS.ADD -> { // 添加 CallerLimitingVelocityListenerManager.invokeUnion( - (data.speedMaxLimit * 0.02 * 3.6).roundToInt().toInt(), + (data.speedMaxLimit * 3.6).roundToInt(), DataSourceType.OBU ) } @@ -526,15 +529,15 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener "MogoObuDcCombineManager 绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}" ) val adviceSpeed = - "${Math.round(currentLight.suggestMinSpeed * 3.6 * 0.02)} - ${ + "${Math.round(currentLight.suggestMinSpeed * 3.6)} - ${ Math.round( - currentLight.suggestMaxSpeed * 3.6 * 0.02 + currentLight.suggestMaxSpeed * 3.6 ) }" val adviceSpeedTts = - "${Math.round(currentLight.suggestMinSpeed * 3.6 * 0.02)} - ${ + "${Math.round(currentLight.suggestMinSpeed * 3.6)} - ${ Math.round( - currentLight.suggestMaxSpeed * 3.6 * 0.02 + currentLight.suggestMaxSpeed * 3.6 ) }" @@ -571,7 +574,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } // 红灯 2, 3 -> { - val red = (currentLight.countDown / 10).toInt() + val red = currentLight.countDown.toInt() CallerTrafficLightListenerManager.invokeTrafficLightPlusSource( TrafficLightEnum.RED, red, @@ -580,7 +583,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } // 绿灯 4, 5, 6 -> { - val green = (currentLight.countDown / 10).toInt() + val green = currentLight.countDown.toInt() CallerTrafficLightListenerManager.invokeTrafficLightPlusSource( TrafficLightEnum.GREEN, green, @@ -589,7 +592,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } // 黄灯 7, 8 -> { - val yellow = (currentLight.countDown / 10).toInt() + val yellow = currentLight.countDown.toInt() CallerTrafficLightListenerManager.invokeTrafficLightPlusSource( TrafficLightEnum.YELLOW, yellow, diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index 97b4eb3975..5f182177b6 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -456,8 +456,11 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { if (alertContent.isEmpty() || ttsContent.isEmpty()) { return } - saveObuData(appId, alertContent, ttsContent) - showWarning(appId, alertContent, ttsContent, direction) + //大于10m,才提示rsi + if (Math.round(data.warningMsgList[0].distance) > 10) { + saveObuData(appId, alertContent, ttsContent) + showWarning(appId, alertContent, ttsContent, direction) + } // 更新数据 TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index c08ac6fc9c..a59e5d2ef7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -314,7 +314,6 @@ internal class DebugSettingView @JvmOverloads constructor( */ tbOpenMfView.isChecked = HmiBuildConfig.isShowMfToastView tbOpenMfView.setOnCheckedChangeListener { _, isChecked -> - Log.d("liyz", "isChecked = $isChecked") HmiBuildConfig.isShowMfToastView = isChecked }