Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display

# Conflicts:
#	app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt
#	foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
This commit is contained in:
donghongyu
2022-12-02 17:35:53 +08:00
26 changed files with 94 additions and 272 deletions

View File

@@ -1,9 +1,9 @@
package com.zhjt.mogo_core_function_devatools.trace
import android.content.Context
import android.util.Log
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
@@ -39,7 +39,7 @@ object SyncConfig {
AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
}
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
AppConfigInfo.isConnectSocket = MogoStatusManager.getInstance().isSocketOnLine
when {
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {// 司机端
AppConfigInfo.isDriver = true
@@ -66,8 +66,6 @@ object SyncConfig {
clientPkFileName = "sn"
)
fun logOutConfig(appConfig: AppConfigInfo) {
Log.d("$M_DEVA${"SyncConfig"}", "logOut APP Config : $appConfig")
startUpTraceModel.report(traceId, {
traceId = it
}, {

View File

@@ -268,6 +268,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if(isChecked){
viewPassengerMsgBoxList.visibility = View.VISIBLE
viewPassengerMsgBoxBubble.visibility = View.GONE
viewPassengerMsgBoxList.notifyData()
}else{
viewPassengerMsgBoxList.visibility = View.GONE
viewPassengerMsgBoxBubble.visibility = View.VISIBLE

View File

@@ -69,12 +69,16 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
override fun onDataChanged(category: MsgCategory, msgBoxBean: MsgBoxBean) {
UiThreadHandler.post {
CallerHmiManager.updateDriverMsgBoxTipView(true)
if(category == MsgCategory.NOTICE){
MsgBoxConfig.noticeList.add(msgBoxBean)
}else if(category == MsgCategory.SYS_INFO){
MsgBoxConfig.systemInfoList.add(msgBoxBean)
}else if(category == MsgCategory.RECORD_BAG){
MsgBoxConfig.recordBagList.add(msgBoxBean)
when (category) {
MsgCategory.NOTICE -> {
MsgBoxConfig.noticeList.add(msgBoxBean)
}
MsgCategory.SYS_INFO -> {
MsgBoxConfig.systemInfoList.add(msgBoxBean)
}
MsgCategory.RECORD_BAG -> {
MsgBoxConfig.recordBagList.add(msgBoxBean)
}
}
if(category == MsgCategory.RECORD_BAG){
//弹出被动录包弹窗

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -44,13 +45,11 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
private fun initView(){
val linearLayoutManager = LinearLayoutManager(context)
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
linearLayoutManager.stackFromEnd = true
linearLayoutManager.reverseLayout = true
// linearLayoutManager.stackFromEnd = true
// linearLayoutManager.reverseLayout = true
passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter(context as Activity)
rvPassengerBubbleList.adapter = passengerMsgBoxBubbleAdapter
rvPassengerBubbleList.layoutManager = linearLayoutManager
// setData()
}
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
@@ -60,22 +59,12 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|| msgBoxList.type == MsgBoxType.OBU){
dataList.add(msgBoxList)
passengerMsgBoxBubbleAdapter?.setData(dataList)
MsgBoxConfig.noticeList.add(msgBoxList)
}
}
}
}
// fun setData(){
// val list :ArrayList<MsgBoxBean> = ArrayList()
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
// val two = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
// val three = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
// list.add(one)
// list.add(two)
// list.add(three)
// passengerMsgBoxBubbleAdapter?.setData(list)
// }
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.msgbox.V2XMsg
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.PassengerMsgBoxListAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.*
@@ -28,6 +29,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
) : ConstraintLayout(context, attrs, defStyleAttr){
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
private var noticeList: ArrayList<MsgBoxBean> ?= null
init{
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_list, this, true)
@@ -44,23 +46,20 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
rvPassengerList.layoutManager = linearLayoutManager
rvPassengerList.addItemDecoration(divider)
//获取通知消息列表
val noticeList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData()
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
noticeList?.reversed()
noticeList?.let {
passengerMsgBoxListAdapter?.setData(it.reversed())
passengerMsgBoxListAdapter?.setData(it)
}
// setData()
}
fun setData(){
val list :ArrayList<MsgBoxBean> = ArrayList()
val one = MsgBoxBean(MsgBoxType.V2X, V2XMsg("","ceshiyixa"))
val two = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa1"))
val three = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa2"))
list.add(one)
list.add(two)
list.add(three)
passengerMsgBoxListAdapter?.setData(list)
fun notifyData(){
val localNoticeList = MsgBoxConfig.noticeList.reversed()
noticeList?.addAll(0,localNoticeList)
noticeList?.let {
passengerMsgBoxListAdapter?.setData(it)
}
}
}

View File

@@ -22,6 +22,7 @@ import chassis.VehicleStateOuterClass
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.*
import com.mogo.eagle.core.data.config.FunctionBuildConfig
@@ -1721,7 +1722,7 @@ class DebugSettingView @JvmOverloads constructor(
tvServerSocketStatus.text = Html.fromHtml(
"服务器Socket状态${
if (DebugConfig.isDownloadSnapshot()) {
if (MogoStatusManager.getInstance().isSocketOnLine) {
"<font color='blue'>正常"
} else {
"<font color='red'>异常"

View File

@@ -25,6 +25,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -164,6 +165,8 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
private fun initOchView() {
actvLoginout.onClick {
EventBus.getDefault().post(EventLogout(EventLogout.LOGOUT_TYPE))
//将消息盒子操作记录还原
MsgBoxConfig.setUserRecord(0)
}
actvLoginout.visibility = View.VISIBLE
CallerHmiManager.setBusOperationView(toolBusOperationView)

View File

@@ -88,7 +88,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DebugConfig.setNeedRequestUserInfo(true);
EventBus.getDefault().register(this);
CallerLogger.INSTANCE.i(M_HMI + TAG, "onCreate");
}

View File

@@ -187,9 +187,10 @@
android:id="@+id/cbMsgBoxDriver"
android:layout_width="150dp"
android:layout_height="150dp"
app:layout_constraintTop_toTopOf="@id/viewLimitingVelocity"
app:layout_constraintBottom_toBottomOf="@id/viewLimitingVelocity"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
android:layout_marginEnd="25dp"
android:layout_marginTop="15dp"
android:button="@null"
android:background="@drawable/selector_msg_box"
android:visibility="gone"
@@ -226,7 +227,8 @@
android:layout_width="864px"
android:layout_height="746px"
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="40dp"
android:visibility="gone"
/>
@@ -235,13 +237,14 @@
android:layout_width="864px"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="40dp"
android:visibility="gone"
/>
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
android:id="@+id/viewPassengerMsgBoxBubble"
android:layout_width="864px"
android:layout_width="650px"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"

View File

@@ -41,6 +41,8 @@
android:ellipsize="end"
android:textColor="#FFFFFFFF"
android:textSize="36px"
android:layout_marginStart="25px"
android:layout_marginEnd="25px"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -20,7 +20,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#FFFFFFFF"
android:textColor="#99FFFFFF"
android:textSize="26px"
/>
@@ -37,6 +37,8 @@
android:ellipsize="end"
android:textColor="#FFFFFFFF"
android:textSize="36px"
android:layout_marginStart="25px"
android:layout_marginEnd="25px"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -13,8 +13,8 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginStart="20px"
android:layout_marginEnd="20px"
android:layout_marginStart="30px"
android:layout_marginEnd="30px"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -155,7 +155,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
location.altitude,
location.bearing,
location.speed,
location.provider == "GPS_RTK")
isGps)
}

View File

@@ -567,6 +567,8 @@ class MogoPrivateObuNewManager private constructor() {
?.updateITrafficThreatLevelInfo(it)
}
//删除弱势交通元素
CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
}
}
}