diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt
index cf8faf17f3..1b5c9c9661 100644
--- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt
+++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt
@@ -53,6 +53,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.DeviceUtils
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
+import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -172,7 +173,8 @@ class MoGoAutopilotControlProvider :
msgHandler.synMsgToAllClients()
}
}, 1000, 10000)
- invokeNettyConnResult("司机端服务启动成功!")
+// invokeNettyConnResult("司机端服务启动成功!")
+ invokeNettyConnResult(StringUtils.getString(R.string.module_mogo_core_function_datacenter_driver_service_started_successfully))
CallerTelematicStatusListenerManager.invokeServerStatusChanged(true)
}
@@ -181,7 +183,8 @@ class MoGoAutopilotControlProvider :
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_driver_service_stop)
timer?.cancel()
timer = null
- invokeNettyConnResult("司机端服务停止!")
+// invokeNettyConnResult("司机端服务停止!")
+ invokeNettyConnResult(StringUtils.getString(R.string.module_mogo_core_function_datacenter_driver_service_stop))
CallerTelematicStatusListenerManager.invokeServerStatusChanged(false)
}
@@ -195,7 +198,8 @@ class MoGoAutopilotControlProvider :
override fun onReceiveClientSign(channel: Channel?, sn: String?) {
sn?.let {
- invokeNettyConnResult("连接成功的乘客屏sn为:$it")
+// invokeNettyConnResult("连接成功的乘客屏sn为:$it")
+ invokeNettyConnResult("${StringUtils.getString(R.string.module_core_connected_passenger_sn)}$it")
}
}
}, SharedPrefsMgr.getInstance().sn)
@@ -1198,7 +1202,8 @@ class MoGoAutopilotControlProvider :
carConfigResp.macAddress,
SharedPrefsMgr.getInstance().sn
)
- invokeNettyConnResult("乘客屏车牌号:${carConfigResp.plateNumber},Mac地址为:${carConfigResp.macAddress}")
+// invokeNettyConnResult("乘客屏车牌号:${carConfigResp.plateNumber},Mac地址为:${carConfigResp.macAddress}")
+ invokeNettyConnResult("${StringUtils.getString(R.string.module_core_passenger_plate)}${carConfigResp.plateNumber},${StringUtils.getString(R.string.module_core_mac_address)}${carConfigResp.macAddress}")
}
if (carConfigResp.dockVersion.isNotEmpty() && !isRainModeInit) {
diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt
index 0f9787e234..2c3dd90ee8 100644
--- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt
+++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt
@@ -30,6 +30,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_D_C
import com.mogo.eagle.core.utilcode.util.AppUtils
+import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
@@ -365,27 +366,35 @@ class MoGoAdasMsgConnectStatusListenerImpl :
AdasConstants.IpcConnectionStatus.DISCONNECTED -> {
if (isFirstDisconnected) {
- title = "连接异常"
- content = "域控未连接或主动断开连接"
+// title = "连接异常"
+ title = StringUtils.getString(R.string.module_core_msg_box_connection_error)
+// content = "域控未连接或主动断开连接"
+ content = StringUtils.getString(R.string.module_core_msg_box_connection_error_desc)
isFirstDisconnected = false
}
}
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION -> {
- title = "域控连接异常"
- content = "建议检查WiFi连接情况及域控是否开机"
+// title = "域控连接异常"
+ title = StringUtils.getString(R.string.module_core_msg_box_ipc_connection_error)
+// content = "建议检查WiFi连接情况及域控是否开机"
+ content = StringUtils.getString(R.string.module_core_msg_box_ipc_connection_error_desc)
}
AdasConstants.IpcConnectionStatus.NOT_FOUND_ADDRESS -> {
if (isFirstException) {
- title = "找不到域控可用地址"
- content = "建议检查车载路由器及域控是否开机"
+// title = "找不到域控可用地址"
+ title = StringUtils.getString(R.string.module_core_msg_box_not_find_address)
+// content = "建议检查车载路由器及域控是否开机"
+ content = StringUtils.getString(R.string.module_core_msg_box_not_find_address_desc)
isFirstException = false
}
}
AdasConstants.IpcConnectionStatus.HEARTBEAT_TIMEOUT -> {
- title = "域控心跳超时"
- content = "建议检查车载路由器连接是否正常"
+// title = "域控心跳超时"
+ title = StringUtils.getString(R.string.module_core_msg_box_ipc_heartbeat_timeout)
+// content = "建议检查车载路由器连接是否正常"
+ content = StringUtils.getString(R.string.module_core_msg_box_ipc_heartbeat_timeout_desc)
}
else -> {}
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 b172f96feb..de273cc75f 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
@@ -21,11 +21,13 @@ import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.call.obu.*
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
+import com.mogo.eagle.core.function.datacenter.R
import com.mogo.eagle.core.function.datacenter.obu.drawer.*
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
import com.mogo.eagle.core.utilcode.util.ConvertUtils
+import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.support.obu.ObuScene
import com.zhidao.support.obu.constants.MogoObuShowConstants
import kotlin.math.roundToInt
@@ -629,11 +631,14 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
if (currentSpeed > 0) {
ttsContentNew =
if ((currentSpeed * 3.6).roundToInt() in (minSpeedTemp + 1) until maxSpeedTemp) {
- "建议保持当前车速通过路口"
+// "建议保持当前车速通过路口"
+ StringUtils.getString(R.string.module_core_suggest_keep_current_speed_pass_intersection)
} else {
- "推荐保持车速10-30KM/H通过路口"
+// "推荐保持车速10-30KM/H通过路口"
+ StringUtils.getString(R.string.module_core_suggest_keep_speed_10_30kmh_pass_intersection)
}
- alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
+// alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
+ alertContentNew = "${StringUtils.getString(R.string.module_core_suggest_speed)}$minSpeedTemp - $maxSpeedTemp KM/H"
}
saveObuToDcData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
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 1291e731b1..c573180ac1 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
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.obu.*
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
+import com.mogo.eagle.core.function.datacenter.R
import com.mogo.eagle.core.function.datacenter.obu.drawer.*
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
import com.mogo.eagle.core.utilcode.download.Config
@@ -24,6 +25,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
import com.mogo.eagle.core.utilcode.util.ConvertUtils
import com.mogo.eagle.core.utilcode.util.FileUtils
+import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.support.obu.ObuBase
import com.mogo.support.obu.ObuScene
@@ -817,8 +819,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
//前向碰撞预警
MogoObuShowConstants.V2X_WARNING_TYPE.FCW.toString() -> {
if (FunctionBuildConfig.isObuWarningFusionUnion && level == 3) {
- alertContent = "前车距离过近"
- ttsContent = "前车距离过近"
+// alertContent = "前车距离过近"
+ alertContent = StringUtils.getString(R.string.module_core_warning_vehicle_ahead_distance_too_close)
+// ttsContent = "前车距离过近"
+ ttsContent = alertContent
} else {
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
@@ -858,18 +862,24 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
) { //左后
- ttsContent = String.format(ttsContent, "左")
- alertContent = String.format(alertContent, "左")
+// ttsContent = String.format(ttsContent, "左")
+ ttsContent = String.format(ttsContent, StringUtils.getString(R.string.module_core_left))
+// alertContent = String.format(alertContent, "左")
+ alertContent = String.format(alertContent, StringUtils.getString(R.string.module_core_left))
} else if (
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
) { //右后
- ttsContent = String.format(ttsContent, "右")
- alertContent = String.format(alertContent, "右")
+// ttsContent = String.format(ttsContent, "右")
+ ttsContent = String.format(ttsContent, StringUtils.getString(R.string.module_core_right))
+// alertContent = String.format(alertContent, "右")
+ alertContent = String.format(alertContent, StringUtils.getString(R.string.module_core_right))
} else{
- ttsContent = "注意周围车辆"
- alertContent = "盲区预警"
+// ttsContent = "注意周围车辆"
+ ttsContent = StringUtils.getString(R.string.module_core_warning_pay_attention_to_surrounding_vehicles)
+// alertContent = "盲区预警"
+ alertContent = StringUtils.getString(R.string.module_core_warning_blind_spot)
}
}
@@ -885,15 +895,19 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
) {
- ttsContent = String.format(ttsContent, "左")
- alertContent = String.format(alertContent, "左")
+// ttsContent = String.format(ttsContent, "左")
+ ttsContent = String.format(ttsContent, StringUtils.getString(R.string.module_core_left))
+// alertContent = String.format(alertContent, "左")
+ alertContent = String.format(alertContent, StringUtils.getString(R.string.module_core_left))
} else if (
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
) {
- ttsContent = String.format(ttsContent, "右")
- alertContent = String.format(alertContent, "右")
+// ttsContent = String.format(ttsContent, "右")
+ ttsContent = String.format(ttsContent, StringUtils.getString(R.string.module_core_right))
+// alertContent = String.format(alertContent, "右")
+ alertContent = String.format(alertContent, StringUtils.getString(R.string.module_core_right))
}
}
@@ -1111,11 +1125,14 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
if (currentSpeed > 0) {
ttsContentNew =
if ((currentSpeed * 3.6).roundToInt() in (minSpeedTemp + 1) until maxSpeedTemp) {
- "建议保持当前车速通过路口"
+// "建议保持当前车速通过路口"
+ StringUtils.getString(R.string.module_core_suggest_keep_current_speed_pass_intersection)
} else {
- "推荐保持车速10-30KM/H通过路口"
+// "推荐保持车速10-30KM/H通过路口"
+ StringUtils.getString(R.string.module_core_suggest_keep_speed_10_30kmh_pass_intersection)
}
- alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
+// alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
+ alertContentNew = "${StringUtils.getString(R.string.module_core_suggest_speed)}$minSpeedTemp - $maxSpeedTemp KM/H"
}
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt
index df48ff67a7..32892cfcaf 100644
--- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt
+++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt
@@ -36,6 +36,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.GsonUtils
+import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.skin.utils.SkinResources
import com.zhjt.mogo.adas.common.cloud.AstFuncTlmPhaseStateLightState
@@ -246,7 +247,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
if((light.state == FusionTrafficLightOuterClass.FusionLightState.STATE_YELLOW_FUSION || light.state ==FusionTrafficLightOuterClass.FusionLightState.STATE_RED_FUSION)
&& light.duration < 5 && light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_GREEN_FUSION){
//语音播放:红灯即将变绿
- AIAssist.getInstance(mContext).speakTTSVoiceWithLevel("红灯即将变绿", NEW_LEVEL_2)
+// AIAssist.getInstance(mContext).speakTTSVoiceWithLevel("红灯即将变绿", NEW_LEVEL_2)
+ AIAssist.getInstance(mContext).speakTTSVoiceWithLevel(StringUtils.getString(R.string.module_core_hint_red_light_about_to_turn_green), NEW_LEVEL_2)
isTurnGreen = true
}
}
diff --git a/core/mogo-core-res/src/main/res/values/string.xml b/core/mogo-core-res/src/main/res/values/string.xml
index 635c63dff3..1bc9d6f6c3 100644
--- a/core/mogo-core-res/src/main/res/values/string.xml
+++ b/core/mogo-core-res/src/main/res/values/string.xml
@@ -335,7 +335,6 @@
暂无班次
-
PadTTS 模块初始化异常
域控已连接
@@ -384,5 +383,55 @@
驶入左%d车道
驶入右%d车道
驶入中间车道
+ 连接成功的乘客屏SN为:
+ 乘客屏车牌号:
+ Mac地址为:
+
+
+
+
+
+
+ 连接异常
+ 域控未连接或主动断开连接
+ 域控连接异常
+ 建议检查WiFi连接情况及域控是否开机
+ 找不到域控可用地址
+ 建议检查车载路由器及域控是否开机
+ 域控心跳超时
+ 建议检查车载路由器连接是否正常
+ 建议保持当前车速通过路口
+ 推荐保持车速10–30KM/H通过路口
+ 推荐车速
+ 前车距离过近
+ 左
+ 右
+ 注意周围车辆
+ 盲区预警
+ 红灯即将变绿
+ 识别故障即将停车,请注意观察,小心接管
+ 请接管恢复车辆状态
+ bag录制成功
+ bag录制失败
+ 正常
+ 异常
+ 寻迹算路
+ 云Socket连接
+ 时间:
+
+
+
+ 自定义
+ 已选%d个包,共
+ %s月%s日
+ 共计%d个包 (%sG) 已上传%d个包 (%sG) 剩余%d个包 (%sG)
+ 自定义A
+ 上报中…
+ 上报
+ 人工
+ 采集
+ 自动
+ 录包失败
+ 已上报
\ No newline at end of file