调试窗更改
1、增加日志过滤标签,对标签选中状态进行初始化 2、修改控制中心二级菜单边框颜色
This commit is contained in:
@@ -45,7 +45,7 @@ class SceneManager {
|
||||
private var sceneModuleTAG: SceneModuleTAG = SceneModuleTAG(mutableMapOf())
|
||||
private var sceneLogTAG: SceneLogTAG = SceneLogTAG(mutableMapOf())
|
||||
|
||||
fun init() {
|
||||
init {
|
||||
//过滤所需条件
|
||||
sceneModuleTAG.map[ADAS] = SceneModule(true, M_ADAS_IMPL)
|
||||
sceneModuleTAG.map[DEVA] = SceneModule(true, M_DEVA)
|
||||
|
||||
@@ -794,6 +794,39 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置日志点击监听
|
||||
*/
|
||||
private fun setLogCheckedChangeListener(){
|
||||
//初始化标签选中状态
|
||||
val tagMap=CallerDevaToolsManager.getModuleTAG()
|
||||
tagMap?.let {
|
||||
it.iterator().forEach {map ->
|
||||
val name = map.value.name
|
||||
val log = map.value.log
|
||||
when(name){
|
||||
////ADAS日志标签
|
||||
SceneConstant.M_ADAS_IMPL-> cbAdasLog.isChecked = log
|
||||
//OBU日志标签
|
||||
SceneConstant.M_OBU-> cbObuLog.isChecked = log
|
||||
//HMI日志标签
|
||||
SceneConstant.M_HMI-> cbHmiLog.isChecked = log
|
||||
//V2X日志标签
|
||||
SceneConstant.M_V2X-> cbV2xLog.isChecked = log
|
||||
//地图日志标签
|
||||
SceneConstant.M_MAP-> cbMapLog.isChecked = log
|
||||
//DEVA日志标签
|
||||
SceneConstant.M_DEVA-> cbDevaLog.isChecked = log
|
||||
//网络模块日志标签
|
||||
SceneConstant.M_NETWORK-> cbNetworkLog.isChecked = log
|
||||
//ROUTE日志标签
|
||||
SceneConstant.M_OLD_ROUTE-> cbOldRouteLog.isChecked = log
|
||||
//BUS日志标签
|
||||
SceneConstant.M_BUS-> cbBusLog.isChecked = log
|
||||
//TAXI日志标签
|
||||
SceneConstant.M_TAXI-> cbTaxiLog.isChecked = log
|
||||
//TAXI_P日志标签
|
||||
SceneConstant.M_TAXI_P-> cbTaxiPLog.isChecked = log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开、关闭鹰眼Log
|
||||
*/
|
||||
@@ -852,9 +885,42 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
sceneMap[SceneConstant.M_MAP] = mapModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//DEVA日志标签
|
||||
cbDevaLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val devaModule = SceneModule(isChecked,SceneConstant.M_DEVA)
|
||||
sceneMap[SceneConstant.M_DEVA] = devaModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//网络模块日志标签
|
||||
cbNetworkLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val networkModule = SceneModule(isChecked,SceneConstant.M_NETWORK)
|
||||
sceneMap[SceneConstant.M_NETWORK] = networkModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//ROUTE日志标签
|
||||
cbOldRouteLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val oldRouteModule = SceneModule(isChecked,SceneConstant.M_OLD_ROUTE)
|
||||
sceneMap[SceneConstant.M_OLD_ROUTE] = oldRouteModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//BUS日志标签
|
||||
cbBusLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val busModule = SceneModule(isChecked,SceneConstant.M_BUS)
|
||||
sceneMap[SceneConstant.M_BUS] = busModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//TAXI日志标签
|
||||
cbTaxiLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val taxiModule = SceneModule(isChecked,SceneConstant.M_TAXI)
|
||||
sceneMap[SceneConstant.M_TAXI] = taxiModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//TAXI_P日志标签
|
||||
cbTaxiPLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val taxiPModule = SceneModule(isChecked,SceneConstant.M_TAXI_P)
|
||||
sceneMap[SceneConstant.M_TAXI_P] = taxiPModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
|
||||
//开始停止抓取全量日志
|
||||
tbLogCatch.isChecked =
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
android:width="2px"
|
||||
android:color="#0000FF" />
|
||||
<padding
|
||||
android:bottom="1px"
|
||||
android:left="1px"
|
||||
android:right="1px"
|
||||
android:top="1px" />
|
||||
|
||||
<corners android:topRightRadius="4dp" android:bottomRightRadius="4dp" />
|
||||
</shape>
|
||||
@@ -538,7 +538,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textOff="域控制器"
|
||||
android:textOn="域控制器"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:background="@drawable/setting_toggle_button_background"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
@@ -783,7 +783,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textOff="OBU"
|
||||
android:textOn="OBU"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:background="@drawable/setting_toggle_button_background"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
@@ -867,7 +867,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textOff="HMI控制"
|
||||
android:textOn="HMI控制"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:background="@drawable/setting_toggle_button_background"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
@@ -973,7 +973,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textOff="HD地图控制"
|
||||
android:textOn="HD地图控制"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:background="@drawable/setting_toggle_button_background"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
@@ -1427,6 +1427,59 @@
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbDevaLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="DEVA日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbNetworkLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="网络模块日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbOldRouteLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="ROUTE日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbBusLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="BUS日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbTaxiLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="TAXI日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbTaxiPLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="TAXI_P日志"
|
||||
style="@style/DebugSettingText"
|
||||
/>
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user