From 07b1eaff2258b8401312d91c351030ef75ca3db5 Mon Sep 17 00:00:00 2001
From: xuxinchao <13522809046@163.com>
Date: Tue, 14 Jun 2022 18:43:32 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
增加点云颜色、大小配置功能
---
.../hmi/ui/setting/DebugSettingView.kt | 28 ++++++++
.../main/res/layout/view_debug_setting.xml | 66 ++++++++++++++++++-
2 files changed, 93 insertions(+), 1 deletion(-)
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index 761a899330..b710bcb21e 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -634,6 +634,34 @@ class DebugSettingView @JvmOverloads constructor(
CallerHDMapManager.setIsDrawPointCloud(isChecked)
}
+ //设置点云大小
+ btnPointCloudSize.setOnClickListener{
+ val cloudSize = etPointCloudSize.text.toString()
+ if(cloudSize.isEmpty()){
+ ToastUtils.showShort("请输入正确的点云大小")
+ }else{
+ try {
+ val cloudSizeFloat = cloudSize.toFloat()
+ CallerHDMapManager.setPointCloudSize(cloudSizeFloat)
+ }catch (e: Exception){
+ ToastUtils.showShort("点云大小格式输入不正确")
+ }
+ }
+ }
+ //设置点云颜色
+ btnPointCloudColor.setOnClickListener {
+ val cloudColor = etPointCloudColor.text.toString()
+ if(cloudColor.isEmpty()){
+ ToastUtils.showShort("请输入正确的点云颜色")
+ }else{
+ try {
+ CallerHDMapManager.setPointCloudColor(cloudColor)
+ }catch (e: Exception){
+ ToastUtils.showShort("点云大小颜色输入不正确")
+ }
+ }
+ }
+
// 模拟自动驾驶中
tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked)
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index 5eaf4b5011..d340b8aa39 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -1548,12 +1548,76 @@
app:layout_constraintRight_toRightOf="parent"
/>
+
+
+
+
+
+
+
+
+ app:layout_constraintTop_toBottomOf="@id/btnPointCloudColor">