Merge branch 'dev_robotaxi-d_251110_8.2.8_i18n' into dev_robotaxi-d_251204_8.3.0_xfk_temp

# Conflicts:
#	OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/taskrunning/TaskRunningView.kt
This commit is contained in:
xinfengkun
2025-12-17 11:29:10 +08:00
471 changed files with 10137 additions and 2778 deletions

View File

@@ -22,6 +22,7 @@ import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.AppStateManager
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhjt.mogo.adas.common.power.PowerUnitChannel
import com.zhjt.mogo.adas.data.Adas
@@ -109,24 +110,31 @@ object CallerAutoPilotControlManager {
var isPlayTTS = true
if (exceptionValue != 0) {
if (isShowTip) {
val sb = StringBuilder("请检查车辆")
// val sb = StringBuilder("请检查车辆")
val sb = StringBuilder(StringUtils.getString(R.string.module_core_check_vehicle))
if ((exceptionValue and 1) != 0) {
sb.append("FSM$")
// sb.append("FSM$")
sb.append(StringUtils.getString(R.string.module_core_fsm)).append("$")
}
if ((exceptionValue and (1 shl 1)) != 0) {
sb.append("方向盘$")
// sb.append("方向盘$")
sb.append(StringUtils.getString(R.string.module_core_chassis_steering)).append("$")
}
if (((exceptionValue and (1 shl 2)) != 0)) {
sb.append("油门$")
// sb.append("油门$")
sb.append(StringUtils.getString(R.string.module_core_chassis_throttle)).append("$")
}
if ((exceptionValue and (1 shl 3)) != 0) {
sb.append("刹车$")
// sb.append("刹车$")
sb.append(StringUtils.getString(R.string.module_core_chassis_brake)).append("$")
}
if ((exceptionValue and (1 shl 4)) != 0) {
sb.append("双闪$")
// sb.append("双闪$")
sb.append(StringUtils.getString(R.string.module_core_chassis_hazard_lights)).append("$")
}
if ((exceptionValue and (1 shl 5)) != 0) {
sb.append("档位$")
// sb.append("档位$")
sb.append(StringUtils.getString(R.string.module_core_chassis_gear)).append("$")
}
if ((exceptionValue and (1 shl 6)) != 0) {
if (!sb.contains("$")) {
@@ -141,7 +149,8 @@ object CallerAutoPilotControlManager {
if ((exceptionValue and (1 shl 7)) != 0 || ((exceptionValue and (1 shl 8)) != 0)) {
if (!sb.contains("$")) {
sb.setLength(0)
sb.append("轨迹未就绪,请稍后重试")
// sb.append("轨迹未就绪,请稍后重试")
sb.append(StringUtils.getString(R.string.module_core_trajectory_not_ready))
}
}

View File

@@ -3,10 +3,13 @@ package com.mogo.eagle.core.function.call.autopilot
import chassis.ChassisStatesOuterClass
import chassis.VehicleStateOuterClass
import com.google.protobuf.TextFormat
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
import com.mogo.eagle.core.function.call.R
import com.mogo.eagle.core.function.call.base.CallerBase
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.StringUtils
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
import org.json.JSONException
@@ -57,7 +60,8 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
UnableLaunchReason.UnableType.DISCONNECTED,
object : ArrayList<String>() {
init {
add("未连接自动驾驶系统")
// add("未连接自动驾驶系统")
add(StringUtils.getString(R.string.module_core_ununited_ipc))
}
}
)
@@ -74,7 +78,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
//获取域控发的原始数据目前包括新老SSM和FM数据
fun getLaunchConditionOriginalData(): String {
return launchConditionData?.json ?: ""
return launchConditionData?.getJson(AbsMogoApplication.getApp()) ?: ""
}
fun getLaunchConditionData(): LaunchConditionData? {
@@ -96,28 +100,32 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
)
}
//制动踏板
var temp = "未知"
// var temp = "未知"
var temp = StringUtils.getString(R.string.module_core_unknown)
if (chassisStates!!.hasBrakeSystemStates()) {
val brake = chassisStates!!.brakeSystemStates.brakePedalResponsePosition
temp = brake.toString()
}
chassisStatesObject.put("brake", temp)
//油门踏板
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (chassisStates!!.hasDrivingSystemStates()) {
val throttle = chassisStates!!.drivingSystemStates.throttleResponsePosition
temp = throttle.toString()
}
chassisStatesObject.put("throttle", temp)
//档位
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (chassisStates!!.hasGearSystemStates()) {
val gear = chassisStates!!.gearSystemStates.gearPosition
temp = gear.name
}
chassisStatesObject.put("gear", temp)
//方向盘
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (chassisStates!!.hasSteerSystemStates()) {
val steerSystemStates = chassisStates!!.steerSystemStates
if (steerSystemStates.hasSteeringWheelAngle()) {
@@ -127,7 +135,8 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
}
chassisStatesObject.put("steering", temp)
//车灯
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (chassisStates!!.hasBcmSystemStates()) {
val bcm = chassisStates!!.bcmSystemStates
temp = bcm.turnLightState.name
@@ -149,35 +158,40 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
}
try {
//制动踏板
var temp = "未知"
// var temp = "未知"
var temp = StringUtils.getString(R.string.module_core_unknown)
if (vehicleState!!.hasBrake()) {
val brake = vehicleState!!.brake
temp = brake.toString()
}
vehicleStateObject.put("brake", temp)
//油门踏板
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (vehicleState!!.hasThrottle()) {
val throttle = vehicleState!!.throttle
temp = throttle.toString()
}
vehicleStateObject.put("throttle", temp)
//档位
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (vehicleState!!.hasGear()) {
val gear = vehicleState!!.gear
temp = gear.name
}
vehicleStateObject.put("gear", temp)
//方向盘
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (vehicleState!!.hasSteering()) {
val steering = vehicleState!!.steering
temp = steering.toString()
}
vehicleStateObject.put("steering", temp)
//车灯
temp = "未知"
// temp = "未知"
temp = StringUtils.getString(R.string.module_core_unknown)
if (vehicleState!!.hasLight()) {
val light = vehicleState!!.light
temp = light.name
@@ -198,7 +212,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
e.printStackTrace()
}
try {
jsonObject.put("launch_condition_data", launchConditionData?.json ?: "")
jsonObject.put("launch_condition_data", launchConditionData?.getJson(AbsMogoApplication.getApp()) ?: "")
} catch (e: JSONException) {
e.printStackTrace()
}
@@ -254,7 +268,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
private fun notification() {
CallerLogger.d(
"$M_D_C CallerAutopilotActionsListenerManager",
"是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + (unableAutopilotReasons?.toString()) + " 原始数据=" + launchConditionData?.json
"是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + (unableAutopilotReasons?.toString()) + " 原始数据=" + launchConditionData?.getJson(AbsMogoApplication.getApp())
)
M_LISTENERS.forEach {
val listener = it.value

View File

@@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.call.autopilot
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
import com.mogo.eagle.core.function.call.R
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.StringUtils
import mogo.telematics.pad.MessagePad
/**
@@ -13,7 +15,11 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
private var mCarConfigResp: MessagePad.CarConfigResp? = null
@Volatile
private var certFileMsg = "未开启认证"
private var certFileMsg = ""
init {
certFileMsg = StringUtils.getString(R.string.module_core_authentication_not_enabled)
}
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotCarConfigListener) {
mCarConfigResp?.let {

View File

@@ -5,9 +5,11 @@ import com.mogo.eagle.core.data.msgbox.FSMMsg
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener
import com.mogo.eagle.core.function.call.R
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trace.CallerTrace
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
import kotlin.properties.Delegates
@@ -22,7 +24,8 @@ object CallerAutopilotStatisticsListenerManager : CallerBase<IMoGoAutopilotStati
MsgBoxType.FSM,
FSMMsg(
0,
"自动驾驶启动失败",
// "自动驾驶启动失败",
StringUtils.getString(R.string.module_core_autonomous_driving_startup_failed),
(it.failedMessage?.msg?:""),
System.currentTimeMillis()
)