调试窗
控制中心添加普通模式,展示常用信息,查看更多的信息选择开发者模式
This commit is contained in:
@@ -265,13 +265,31 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
if (isChecked) {
|
||||
buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
//展示控制中心
|
||||
controlCenterLayout.visibility = View.VISIBLE
|
||||
// controlCenterLayout.visibility = View.VISIBLE
|
||||
commonLayout.visibility = View.VISIBLE
|
||||
swDevelopMode.visibility = View.VISIBLE
|
||||
swDevelopMode.isChecked = false
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏控制中心
|
||||
controlCenterLayout.visibility = View.GONE
|
||||
commonLayout.visibility = View.GONE
|
||||
swDevelopMode.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 开发者模式
|
||||
*/
|
||||
swDevelopMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
controlCenterLayout.visibility = View.VISIBLE
|
||||
commonLayout.visibility = View.GONE
|
||||
}else{
|
||||
controlCenterLayout.visibility = View.GONE
|
||||
commonLayout.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 鹰眼参数配置
|
||||
@@ -311,14 +329,16 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
//展示OBU控制中心
|
||||
obuControllerLayout.visibility = View.VISIBLE
|
||||
|
||||
tbVehicleStateController.isChecked = true
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏OBU控制中心
|
||||
obuControllerLayout.visibility = View.GONE
|
||||
tbVehicleStateController.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 车辆状态控制中心
|
||||
*/
|
||||
@@ -476,6 +496,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
//工控机配置信息
|
||||
tvAutopilotInfo.text =
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
tvIpcInfo.text = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
|
||||
// 绘制应用基本信息
|
||||
drawAppInfo()
|
||||
@@ -682,6 +703,23 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutoPilotManager.recordPackage()
|
||||
}
|
||||
}
|
||||
btnRecordBag.onClick {
|
||||
val recordTimeStr = etInputRecordBagTime.text?.toString()
|
||||
try {
|
||||
if (recordTimeStr.isNullOrEmpty()) {
|
||||
CallerAutoPilotManager.recordPackage()
|
||||
}
|
||||
val recordTime = recordTimeStr?.toInt()
|
||||
if (recordTime != null && recordTime > 0) {
|
||||
CallerAutoPilotManager.recordPackage(recordTime)
|
||||
} else {
|
||||
CallerAutoPilotManager.recordPackage()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
CallerAutoPilotManager.recordPackage()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1350,6 +1388,22 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
tvIpcConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常 原因:${
|
||||
if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) {
|
||||
"主动断开连接"
|
||||
} else {
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
|
||||
tvObuConnectStatus.text = Html.fromHtml(
|
||||
"OBU连接状态:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
@@ -1396,18 +1450,31 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvIpcInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
"自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n"
|
||||
tvCarInfoCopy.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
"自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n"
|
||||
|
||||
tvIdentifyInfo.text =
|
||||
"「有效类型」感知数据个数:${mIdentifyDataSize}\n" +
|
||||
"「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n"
|
||||
tvIdentifyInfoCopy.text =
|
||||
"「有效类型」感知数据个数:${mIdentifyDataSize}\n" +
|
||||
"「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n"
|
||||
|
||||
tvTrajectoryInfoSize.text =
|
||||
"引导线点个数:${mTrajectoryInfoSize}"
|
||||
tvTrajectoryInfoSizeCopy.text =
|
||||
"引导线点个数:${mTrajectoryInfoSize}"
|
||||
|
||||
tvRouteInfoSize.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
tvRouteInfoSizeCopy.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
|
||||
|
||||
// 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况
|
||||
|
||||
@@ -166,6 +166,29 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIpcConnectStatus"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="3"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIsDemoMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启美化模式"
|
||||
android:textOn="关闭美化模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDeviceBind"
|
||||
android:layout_width="match_parent"
|
||||
@@ -448,6 +471,124 @@
|
||||
android:textOff="控制中心"
|
||||
android:textOn="控制中心" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swDevelopMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="开发者模式"
|
||||
style="@style/DebugSettingText"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/commonLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIpcInfo"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="7"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tvIpcInfoDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfo"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRecordBag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="录制Bag包"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfoDivider"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="@drawable/debug_setting_edit_bg"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnRecordBag"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnRecordBag"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnRecordBag">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etInputRecordBagTime"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="90px"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<TextView
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="93px"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="秒" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:id="@+id/recordBagDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnRecordBag" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarInfoCopy"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/recordBagDivider" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentifyInfoCopy"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCarInfoCopy" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTrajectoryInfoSizeCopy"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIdentifyInfoCopy" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRouteInfoSizeCopy"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTrajectoryInfoSizeCopy" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/controlCenterLayout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -1237,20 +1378,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnOpenObuFusion" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIsDemoMode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启美化模式"
|
||||
android:textOn="关闭美化模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIsDrawAutopilotTrajectoryData"
|
||||
android:layout_width="0dp"
|
||||
@@ -1261,9 +1388,9 @@
|
||||
android:textOff="强制绘制引导线"
|
||||
android:textOn="强制绘制引导线"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbIsDemoMode"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tbIsDemoMode" />
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData" />
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
@@ -1274,9 +1401,9 @@
|
||||
android:textOff="强制绘制路径规划"
|
||||
android:textOn="强制绘制路径规划"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tbIsDemoMode"
|
||||
app:layout_constraintRight_toRightOf="@id/tbIsDemoMode"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDemoMode" />
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbChangeAutoPilotStatus"
|
||||
@@ -1287,9 +1414,9 @@
|
||||
android:textOff="开启模拟自动驾驶中"
|
||||
android:textOn="关闭模拟自动驾驶中"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbIsDemoMode"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDemoMode" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintRight_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgGpsProvider"
|
||||
|
||||
Reference in New Issue
Block a user