[6.10.0][Feat]新增云端规划Tts
This commit is contained in:
@@ -7,11 +7,13 @@ import android.util.TypedValue.COMPLEX_UNIT_PX
|
||||
import android.view.LayoutInflater
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.isRed
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.time
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
@@ -22,11 +24,14 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SoundPoolUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.view_pnc_actions.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.DrivingState.USING_RSI_LINK_VALUE
|
||||
|
||||
class PncActionsView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@@ -92,8 +97,12 @@ class PncActionsView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
var isPlanningFromServer = false
|
||||
planningActionMsg.actionMsg?.let {
|
||||
try {
|
||||
if (it.drivingState.number == USING_RSI_LINK_VALUE) {
|
||||
isPlanningFromServer = true
|
||||
}
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
@@ -116,11 +125,18 @@ class PncActionsView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
planningActionMsg.v2NActionMsgList?.forEach { v2nAction ->
|
||||
if (v2nAction.drivingState.number == USING_RSI_LINK_VALUE) {
|
||||
isPlanningFromServer = true
|
||||
}
|
||||
actions = PncActionsHelper.getAction(
|
||||
v2nAction.drivingState.number,
|
||||
v2nAction.drivingAction.number
|
||||
)
|
||||
}
|
||||
if (isPlanningFromServer && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
AIAssist.getInstance(Utils.getApp())
|
||||
.speakTTSVoiceWithLevel("正在使用云端规划通过路口", AIAssist.NEW_LEVEL_2)
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
tvHmiPncActions.background = null
|
||||
|
||||
Reference in New Issue
Block a user