Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
This commit is contained in:
@@ -769,4 +769,8 @@ class MoGoAutopilotControlProvider :
|
||||
override fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd)
|
||||
}
|
||||
|
||||
override fun sendPlanningCmd(cmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendPlanningCmd(cmd)
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
|
||||
@@ -83,9 +84,13 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
if(isShowData){
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}else{
|
||||
if(!FunctionBuildConfig.isDemoMode){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}
|
||||
} else if(category == MsgCategory.SYS_INFO){
|
||||
//todo 过滤MAP系统异常报警
|
||||
} else{
|
||||
clMsgBubbleLayout.visibility = View.VISIBLE
|
||||
dataList.add(msgBoxBean)
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
||||
@@ -17,6 +18,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
@@ -244,6 +246,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
notifyData()
|
||||
ipcReportList?.let {
|
||||
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
|
||||
driverMsgBoxListAdapter?.setReportShowData(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean>? = null
|
||||
private var reportBean: MsgBoxBean ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
@@ -50,6 +51,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun setReportShowData(reportClickBean: MsgBoxBean){
|
||||
reportBean = reportClickBean
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
when (viewType) {
|
||||
record -> {
|
||||
@@ -103,6 +108,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
}
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
val reportMsgBox = it[position]
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
@@ -138,6 +144,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
holder.tvReportSrcOpen.text = "消息来源:${reportEntity.src}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList) {
|
||||
actionStr =
|
||||
@@ -152,6 +159,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvStatusSelect.text = "折叠"
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
@@ -162,6 +170,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportSrcOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
@@ -170,6 +179,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvStatusSelect.text = "展开"
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
@@ -180,9 +190,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportSrcOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
reportBean?.let {
|
||||
if(reportMsgBox.timestamp == it.timestamp){
|
||||
holder.tvStatusSelect.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxOperation -> {
|
||||
@@ -200,6 +217,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "折叠"
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
@@ -214,6 +232,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "展开"
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
@@ -329,6 +348,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
var tvReportTimeOpen: TextView = itemView.findViewById(R.id.tvReportTimeOpen)
|
||||
var tvReportTypeOpen: TextView = itemView.findViewById(R.id.tvReportTypeOpen)
|
||||
var tvReportReasonOpen: TextView = itemView.findViewById(R.id.tvReportReasonOpen)
|
||||
var tvReportSrcOpen: TextView = itemView.findViewById(R.id.tvReportSrcOpen)
|
||||
var tvReportActionOpen: TextView = itemView.findViewById(R.id.tvReportActionOpen)
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
android:id="@+id/tvStatusSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:text="展开"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -163,12 +163,26 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportActionOpen"
|
||||
android:id="@+id/tvReportSrcOpen"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportReasonOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
android:gravity="start"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportActionOpen"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportSrcOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportSrcOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
android:id="@+id/tvOperationStatusSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:text="展开"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -312,4 +312,6 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
fun sendRoboBusJinlvM1SmallLampCmd(switchCmd: Int): Boolean
|
||||
|
||||
fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean
|
||||
|
||||
fun sendPlanningCmd(cmd: Int): Boolean
|
||||
}
|
||||
@@ -450,4 +450,8 @@ object CallerAutoPilotControlManager {
|
||||
fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd) ?: false
|
||||
}
|
||||
|
||||
fun sendPlanningCmd(cmd: Int): Boolean {
|
||||
return providerApi?.sendPlanningCmd(cmd) ?: false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user