[8.0.0]MogoMind需求调整PNC事件增加时间和详情展示,车龙推荐车道背景色调整
This commit is contained in:
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.unmanned.passenger.model.TaxiPassengerModel
|
||||
import com.mogo.och.unmanned.passenger.ui.aiview.bean.AIMessage
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
@@ -47,8 +48,12 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
|
||||
actions?.let {
|
||||
if(it.isNotEmpty() && it != currentAction){
|
||||
currentAction = it
|
||||
val action = AIMessage.PNCAction(it+System.currentTimeMillis(),it)
|
||||
AIMessageManager.post(action)
|
||||
val title = getActionTitle(it)
|
||||
if(title.isNotEmpty()){
|
||||
val desc = getActionDesc(title)
|
||||
val action = AIMessage.PNCAction(it+System.currentTimeMillis(),title,desc,System.currentTimeMillis())
|
||||
AIMessageManager.post(action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,4 +64,163 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getActionTitle(pncAction: String): String{
|
||||
return when(pncAction){
|
||||
"正在进站"->{
|
||||
"车辆进站"
|
||||
}
|
||||
"等待进站"->{
|
||||
"车辆等待进站"
|
||||
}
|
||||
"正在出站"->{
|
||||
"车辆出站"
|
||||
}
|
||||
"等待出站"->{
|
||||
"车辆等待出站"
|
||||
}
|
||||
"正在向左变道"->{
|
||||
"车辆向左变道"
|
||||
}
|
||||
"正在向右变道"->{
|
||||
"车辆向右变道"
|
||||
}
|
||||
"正在完成变道"->{
|
||||
"车辆完成变道"
|
||||
}
|
||||
"正在绕过障碍物"->{
|
||||
"车辆正在绕过前方障碍物"
|
||||
}
|
||||
"正在向左绕行避让前方静止障碍物"->{
|
||||
"车辆正在绕过前方障碍物"
|
||||
}
|
||||
"正在向右绕行避让前方静止障碍物"->{
|
||||
"车辆正在绕过前方障碍物"
|
||||
}
|
||||
"正在避让障碍物"->{
|
||||
"车辆正在避让前方障碍物"
|
||||
}
|
||||
"正在向左变道避让前方静止障碍物"->{
|
||||
"车辆正在避让前方障碍物"
|
||||
}
|
||||
"正在向右变道避让前方静止障碍物"->{
|
||||
"车辆正在避让前方障碍物"
|
||||
}
|
||||
"正在等红灯"->{
|
||||
"路口等红灯"
|
||||
}
|
||||
"正在向左变道避让前方道路施工"->{
|
||||
"车辆正在变道避让前方道路施工"
|
||||
}
|
||||
"正在向右变道避让前方道路施工"->{
|
||||
"车辆正在变道避让前方道路施工"
|
||||
}
|
||||
"正在向左绕行避让前方道路施工"->{
|
||||
"车辆正在绕行避让前方道路施工"
|
||||
}
|
||||
"正在向右绕行避让前方道路施工"->{
|
||||
"车辆正在绕行避让前方道路施工"
|
||||
}
|
||||
|
||||
"正在向左变道避让前方道路事故"->{
|
||||
"车辆正在变道避让前方道路事故"
|
||||
}
|
||||
"正在向右变道避让前方道路事故"->{
|
||||
"车辆正在变道避让前方道路事故"
|
||||
}
|
||||
"正在向左绕行避让前方道路事故"->{
|
||||
"车辆正在绕行避让前方道路事故"
|
||||
}
|
||||
"正在向右绕行避让前方道路事故"->{
|
||||
"车辆正在绕行避让前方道路事故"
|
||||
}
|
||||
"正在跟随车辆行驶"->{
|
||||
"车辆正在跟车通行"
|
||||
}
|
||||
"正在跟车行驶"->{
|
||||
"车辆正在跟车通行"
|
||||
}
|
||||
"正在向左变道避让前方车龙"->{
|
||||
"车辆正在绕行前方车龙"
|
||||
}
|
||||
"正在向右变道避让前方车龙"->{
|
||||
"车辆正在绕行前方车龙"
|
||||
}
|
||||
"正在使用云端规划通过路口"->{
|
||||
"车辆正在使用云端轨迹通行"
|
||||
}
|
||||
"正在避让后方来车"->{
|
||||
"车辆正在避让后方来车"
|
||||
}
|
||||
else->{
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getActionDesc(action: String): String{
|
||||
return when(action){
|
||||
"车辆进站"->{
|
||||
"前方即将到达${TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName}," +
|
||||
"车辆正在规划减速并进站停靠,请安心等待车辆停稳再下车哦~"
|
||||
}
|
||||
"车辆等待进站"->{
|
||||
"车辆待环境安全后进站,耐心等几秒,安全比赶路更重要~"
|
||||
}
|
||||
"车辆出站"->{
|
||||
"欢迎乘坐MOGO RoboTaxi~车辆正在规划出站,坐稳扶好哦,我们出发啦!小智持续守护您的行程。"
|
||||
}
|
||||
"车辆等待出站"->{
|
||||
"车辆待环境安全后出站,耐心等几秒,安全比赶路更重要~"
|
||||
}
|
||||
"车辆向左变道"->{
|
||||
"确认环境安全,车辆正在规划平稳向左/向右变道,同时持续监测周边交通参与者动向,放心交给我们吧!"
|
||||
}
|
||||
"车辆向右变道"->{
|
||||
"确认环境安全,车辆正在规划平稳向左/向右变道,同时持续监测周边交通参与者动向,放心交给我们吧!"
|
||||
}
|
||||
"车辆完成变道"->{
|
||||
"变道完成啦,继续前进!小智持续守护您的行程。"
|
||||
}
|
||||
"车辆正在绕过前方障碍物"->{
|
||||
"发现前方障碍物,车辆正在规划平稳变道,即将画出一条完美弧线~"
|
||||
}
|
||||
"车辆正在避让前方障碍物"->{
|
||||
"发现前方障碍物,车辆正在规划平稳避让,诠释优雅与丝滑~"
|
||||
}
|
||||
"车辆完成绕障"->{
|
||||
"绕障完成啦,继续前进!小智持续守护您的行程。"
|
||||
}
|
||||
"路口等红灯"->{
|
||||
"车辆正在路口等红灯,可以安心放空望望窗外~小智一直在您身边哦!"
|
||||
}
|
||||
"车辆正在变道避让前方道路施工"->{
|
||||
"车辆正在提前规划向左/右变道避让前方道路施工,稳稳的很安心~您已体验到车路云一体化协同应用场景,是当之无愧的先锋体验官!"
|
||||
}
|
||||
"车辆正在绕行避让前方道路施工"->{
|
||||
"车辆正在提前规划向左/右绕行避让前方道路施工,稳稳的很安心~您已体验到车路云一体化协同应用场景,是当之无愧的先锋体验官!"
|
||||
}
|
||||
"车辆正在变道避让前方道路事故"->{
|
||||
"车辆正在提前规划向左/右变道避让前方道路事故,放心看我表现吧!您已体验到车路云一体化协同应用场景,小智为您欢呼!"
|
||||
}
|
||||
"车辆正在绕行避让前方道路事故"->{
|
||||
"车辆正在提前规划向左/右绕行避让前方道路事故,放心看我表现吧!您已体验到车路云一体化协同应用场景,小智为您欢呼!"
|
||||
}
|
||||
"车辆正在跟车通行"->{
|
||||
"车辆正在跟随前车通行,舒适度MAX~您已体验到车路云一体化协同应用场景,超越全国99%的乘客!"
|
||||
}
|
||||
"车辆正在绕行前方车龙"->{
|
||||
"车辆正在提前规划向左/右变道避让路口车龙,舒适度MAX~。您已体验到车路云一体化协同应用场景,超越全国99%的乘客!"
|
||||
}
|
||||
"车辆正在使用云端轨迹通行"->{
|
||||
"前方智慧路口内有障碍物,车辆正在使用云端规划轨迹通行。您已体验到车路云一体化协同应用场景,超越全国99%的乘客!"
|
||||
}
|
||||
"车辆正在避让后方来车"->{
|
||||
"车辆正在避让后方来车,耐心等几秒,安全比赶路更重要~"
|
||||
}
|
||||
else->{
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -186,9 +186,15 @@ class QAViewHolder(val binding: View) : MessageViewHolder(binding) {
|
||||
class PNCActionViewHolder(binding: View) : MessageViewHolder(binding){
|
||||
|
||||
private var tvPncAction: TextView = binding.findViewById(R.id.tvPncAction)
|
||||
private var tvPncActionDesc: TextView = binding.findViewById(R.id.tvPncActionDesc)
|
||||
private var tvPncActionTime: TextView = binding.findViewById(R.id.tvPncActionTime)
|
||||
|
||||
override fun bind(item: AIMessage, onItemClickListener: OnItemClickListener?) {
|
||||
tvPncAction.text = item.title
|
||||
if(item is AIMessage.PNCAction){
|
||||
tvPncAction.text = item.title
|
||||
tvPncActionDesc.text = item.actionDesc
|
||||
tvPncActionTime.text = DateTimeUtils.getTimeText(item.timeStamp, DateTimeUtils.HH_mm_ss)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -135,7 +135,9 @@ sealed class AIMessage(
|
||||
|
||||
data class PNCAction(
|
||||
override val id: String,
|
||||
override val title: String
|
||||
override val title: String,
|
||||
var actionDesc: String,
|
||||
var timeStamp: Long = 0, //事件发生事件戳
|
||||
): AIMessage(id,title)
|
||||
|
||||
data class RoadV2NEvent(
|
||||
|
||||
@@ -9,18 +9,53 @@
|
||||
app:yOffset="0dp"
|
||||
app:blurRadius="@dimen/dp_26">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPncAction"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/dp_747"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#394047"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_30"
|
||||
android:paddingTop="@dimen/dp_28"
|
||||
android:paddingBottom="@dimen/dp_28"
|
||||
android:drawablePadding="@dimen/dp_7"
|
||||
android:drawableStart="@drawable/icon_pnc_action"
|
||||
/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPncAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#394047"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:drawablePadding="@dimen/dp_7"
|
||||
android:drawableStart="@drawable/icon_pnc_action"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPncActionTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPncAction"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPncAction"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPncActionDesc"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPncAction"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPncAction"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPncActionTime"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#394047"
|
||||
android:layout_marginStart="@dimen/dp_45"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_26"
|
||||
|
||||
android:text="古城村滇池卫城我吃完传达传达出我擦撒擦擦车是擦擦"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#4D1466FB"
|
||||
android:startColor="#BBDAFF"
|
||||
android:endColor="#001466FB"
|
||||
android:angle="270"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user