diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index be38932875..738c6b0ce0 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -352,93 +352,94 @@ internal object V2NIdentifyDrawer : IEventDismissListener { ) }.receive() } else if (msg.what == MSG_WHAT_DRAW_GREEN_WAVE) { - val data = msg.obj as? V2nCrossSpeed ?: return@Callback true - val destX = data.lng - val destY = data.lat - val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() - if (DrivingDirectionUtils.getDegreeOfCar2Poi( - location.longitude, - location.latitude, - destX, - destY, - location.heading.toInt() - ) >= 90 - ) { - V2XBizTrace.onAck(data, "green-wave-event" to "事件在车的后面,不触发", true) - return@Callback true - } - val id = "${destX}_${destY}" - AiRoadMarker.aiMakers.getOrPut(id) { - AiRoadMarker().apply { - try { - val current = abs(location.gnssSpeed).toInt() - val min = abs(data.speedStraightMin).toInt() - val max = abs(data.speedStraightMax).toInt() - marker( - Marker( - id, - EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, - destX, - destY, - 0.0, - null, - null, - null - ), drawMarker = false, false - ) - var alertTts = "" - var alertContent = "" - if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - AppStateManager.currentActivity()?.let { - val speakText = StringBuilder("保持当前车速即可通过路口,好丝滑!") - if (current < min) { - speakText.setLength(0) - speakText.append( - "${ - SkinResources.getInstance() - .getString(R.string.operation_platform_name) - }推荐您提升车速至${min}千米每小时, 当前车速${current}千米每小时" - ) - } - if (current > max) { - speakText.setLength(0) - speakText.append( - "${ - SkinResources.getInstance() - .getString(R.string.operation_platform_name) - }推荐您降低车速至${max}千米每小时, 当前车速${current}千米每小时" - ) - } - val tts = speakText.toString() - alertTts = tts - alertContent = tts - AIAssist.getInstance(it).speakTTSVoice(tts) - } - } - //消息埋点 - V2XEventAnalyticsManager.triggerV2XEvent( - EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, - alertContent, - alertTts, - DataSourceType.AICLOUD, - CommunicationType.V2N - ) - CallerHmiManager.showGreenWave( - min, - max, - computeCrossCountBetween( - Triple( - location.longitude, - location.latitude, - location.heading - ), kotlin.Pair(destX, destY) - ) - ) - } finally { - receive() - } - } - } + //下架V2N绿波通行 +// val data = msg.obj as? V2nCrossSpeed ?: return@Callback true +// val destX = data.lng +// val destY = data.lat +// val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() +// if (DrivingDirectionUtils.getDegreeOfCar2Poi( +// location.longitude, +// location.latitude, +// destX, +// destY, +// location.heading.toInt() +// ) >= 90 +// ) { +// V2XBizTrace.onAck(data, "green-wave-event" to "事件在车的后面,不触发", true) +// return@Callback true +// } +// val id = "${destX}_${destY}" +// AiRoadMarker.aiMakers.getOrPut(id) { +// AiRoadMarker().apply { +// try { +// val current = abs(location.gnssSpeed).toInt() +// val min = abs(data.speedStraightMin).toInt() +// val max = abs(data.speedStraightMax).toInt() +// marker( +// Marker( +// id, +// EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, +// destX, +// destY, +// 0.0, +// null, +// null, +// null +// ), drawMarker = false, false +// ) +// var alertTts = "" +// var alertContent = "" +// if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { +// AppStateManager.currentActivity()?.let { +// val speakText = StringBuilder("保持当前车速即可通过路口,好丝滑!") +// if (current < min) { +// speakText.setLength(0) +// speakText.append( +// "${ +// SkinResources.getInstance() +// .getString(R.string.operation_platform_name) +// }推荐您提升车速至${min}千米每小时, 当前车速${current}千米每小时" +// ) +// } +// if (current > max) { +// speakText.setLength(0) +// speakText.append( +// "${ +// SkinResources.getInstance() +// .getString(R.string.operation_platform_name) +// }推荐您降低车速至${max}千米每小时, 当前车速${current}千米每小时" +// ) +// } +// val tts = speakText.toString() +// alertTts = tts +// alertContent = tts +// AIAssist.getInstance(it).speakTTSVoice(tts) +// } +// } +// //消息埋点 +// V2XEventAnalyticsManager.triggerV2XEvent( +// EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, +// alertContent, +// alertTts, +// DataSourceType.AICLOUD, +// CommunicationType.V2N +// ) +// CallerHmiManager.showGreenWave( +// min, +// max, +// computeCrossCountBetween( +// Triple( +// location.longitude, +// location.latitude, +// location.heading +// ), kotlin.Pair(destX, destY) +// ) +// ) +// } finally { +// receive() +// } +// } +// } } else if (msg.what == MSG_WHAT_DRAW_PEOPLE_CROSS) { Logger.i(TAG, "people cross -- 1 --") val data = msg.obj as? MessagePad.Event ?: return@Callback true @@ -689,7 +690,7 @@ internal object V2NIdentifyDrawer : IEventDismissListener { } private fun drawGreenWave(crossSpeed: V2nCrossSpeed) { - if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nGreenWave) { + if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch) { handler.removeMessages(MSG_WHAT_DRAW_GREEN_WAVE) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_GREEN_WAVE, crossSpeed)) } @@ -818,7 +819,7 @@ internal object V2NIdentifyDrawer : IEventDismissListener { if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { ThreadUtils.runOnUiThread { AIAssist.getInstance(Utils.getApp()) - .speakTTSVoiceWithLevel("蘑菇发现前方路口有车龙", AIAssist.NEW_LEVEL_2) + .speakTTSVoiceWithLevel("前方路口有车龙", AIAssist.NEW_LEVEL_2) } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt index 0522e443c3..e63f893d62 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt @@ -14,7 +14,6 @@ import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.mogo.commons.voice.AIAssist -import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType @@ -27,7 +26,6 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.skin.utils.SkinResources /** @@ -162,8 +160,7 @@ open class AutomaticExplorationView @JvmOverloads constructor( rotationAnim?.cancel() //语音播放,只在司机端播放 if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ - AIAssist.getInstance(context).speakTTSVoice("道路畅通一切正常${SkinResources.getInstance().getString( - R.string.operation_platform_name)}型车助手将持续守候您的出行") + AIAssist.getInstance(context).speakTTSVoice("正为您探查道路情况") } //5秒后关闭弹窗 val hideViewTimer =object: CountDownTimer(EXPLORATION_HIDE_TIME,EXPLORATION_HIDE_TIME){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt index 1a4326f280..6e0e3cfb1f 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt @@ -327,7 +327,6 @@ class OperatePanelLayout : LinearLayout { private const val KEY_V2X_TOTAL_SWITCH = "v2x_total_switch" private const val KEY_V2N_TOTAL_SWITCH = "v2n_total_switch" private const val KEY_V2N_NEW_LINKED_TO_PNC = "v2n_new_linked_to_pnc" - private const val KEY_V2N_NEW_LINKED_GREEN_WAVE = "v2n_new_linked_green_wave" private const val KEY_V2I_TOTAL_SWITCH = "v2i_total_switch" private const val KEY_V2I_TO_PNC = "v2i_to_pnc" private const val KEY_V2I_RED_LIGHT_WARNING = "v2i_red_light_warning" @@ -351,9 +350,6 @@ class OperatePanelLayout : LinearLayout { KEY_V2N_NEW_LINKED_TO_PNC -> { return FunctionBuildConfig.v2nNewLinkedToPNC } - KEY_V2N_NEW_LINKED_GREEN_WAVE -> { - return FunctionBuildConfig.v2nGreenWave - } KEY_V2I_TOTAL_SWITCH -> { return HmiBuildConfig.v2iTotalSwitch } @@ -404,7 +400,6 @@ class OperatePanelLayout : LinearLayout { clickEventAnalytics("V2N总开关", isChecked) if (!isChecked) { // preferenceScreen.findPreferenceReal(KEY_V2N_NEW_LINKED)?.also { changeValue(it, false) } preferenceScreen.findPreferenceReal(KEY_V2N_NEW_LINKED_TO_PNC)?.also { changeValue(it, false) } - preferenceScreen.findPreferenceReal(KEY_V2N_NEW_LINKED_GREEN_WAVE)?.also { changeValue(it, false) } } val map = HashMap().also { it["f1"] = isChecked @@ -420,14 +415,6 @@ class OperatePanelLayout : LinearLayout { CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked) return true } - KEY_V2N_NEW_LINKED_GREEN_WAVE -> { - val isChecked = newValue as? Boolean ?: false - FunctionBuildConfig.v2nGreenWave = isChecked - hmiAction("绿波通行", isChecked) - clickEventAnalytics("绿波通行", isChecked) - CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, (if (isChecked) "1" else "0").toByteArray()) - return true - } KEY_V2I_TOTAL_SWITCH -> { val isChecked = newValue as? Boolean ?: false HmiBuildConfig.v2iTotalSwitch = isChecked diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/xml/operate_panel_preference_details_v2x.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/xml/operate_panel_preference_details_v2x.xml index 8f365bb6fe..db426edc48 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/xml/operate_panel_preference_details_v2x.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/xml/operate_panel_preference_details_v2x.xml @@ -34,14 +34,6 @@ android:defaultValue="@bool/v2n_new_linked_to_pnc" android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee" android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/> - = 80) { - disStr = "前方${dis}米将通过路口,${ - SkinResources.getInstance().getString(R.string.operation_platform_name) - }为您提供路口全息影像,助力出行" - } +// var disStr = "前方即将通过路口,${ +// SkinResources.getInstance().getString(R.string.operation_platform_name) +// }为您提供路口全息影像,助力出行" +// if (dis >= 80) { +// disStr = "前方${dis}米将通过路口,${ +// SkinResources.getInstance().getString(R.string.operation_platform_name) +// }为您提供路口全息影像,助力出行" +// } + val disStr = "为您提供路口全息影像,助力出行" AIAssist.getInstance(context).speakTTSVoiceWithLevel(disStr, AIAssist.NEW_LEVEL_2) } CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index 716d84c249..8bbe712d63 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -297,19 +297,12 @@ object FunctionBuildConfig { var v2xTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2x_total_switch) /** - * V2N总开关,其子开关包括V2N新链路、V2N场景进PNC、绿波通行 + * V2N总开关,其子开关包括V2N新链路、V2N场景进PNC */ @Volatile @JvmField var v2nTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2n_total_switch) - /** - * V2N事件-绿波通行开关 - */ - @Volatile - @JvmField - var v2nGreenWave = Utils.getApp().resources.getBoolean(R.bool.v2n_green_wave) - /** * 是否开启PNC障碍物颜色提醒 */ diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index 469e1ad5e2..2f99019fa9 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -518,7 +518,7 @@ enum class EventTypeEnumNew( "他车倒车/逆行", poiTypeSrcVr = R.drawable.icon_v2x_other_retrograde_vehicle_driver, content = "前方%s米有他车倒车或逆行", - tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有异常车辆,提醒您注意观察 小心通过" + tts = "前方有异常车辆" ), TYPE_SOCKET_ROAD_GREE_WAVE( "100063", @@ -532,7 +532,7 @@ enum class EventTypeEnumNew( "行人横穿", poiTypeSrcVr = View.NO_ID, content = "前方%s米有行人/非机动车横穿", - tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有行人或非机动车横穿,提醒您注意观察,小心通过" + tts = "前方有行人或非机动车横穿" ), TYPE_ERROR( 0.toString(),