From c96dd9f2fa66abd45a58933e874b72f4276bd33e Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Thu, 20 Jan 2022 19:34:53 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E5=9F=9F=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E6=9C=AA=E5=BC=80=E5=90=AF=E4=B8=8D=E8=AE=A9=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E8=BD=A6=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../hmi/ui/tools/AutoPilotAndCheckView.kt | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9607c94d7c..ab988cd7c8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -326,7 +326,7 @@ def getWorkingBranchHash() { proc.err.eachLine { line -> println line } proc.waitFor() println "Working branch hash: " + workingBranchHash - return workingBranchHash + return "\"${workingBranchHash}\"" } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index 0ae3ac68c7..f6eead8bb2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -82,16 +82,22 @@ class AutoPilotAndCheckView @JvmOverloads constructor( clickListener?.go2CheckPage() } etInputSpeed.setOnTouchListener { v, _ -> - if (etInputSpeed.hasFocusable()) { - if (keyBoardUtil == null) { - keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed) + if (!connectStatus) { + ToastUtils.showShort("设置车速失败,请启动域控制器") + keyBoardUtil?.hideKeyboard() + return@setOnTouchListener true + } else { + if (etInputSpeed.hasFocusable()) { + if (keyBoardUtil == null) { + keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed) + } + keyBoardUtil?.showKeyboard() } - keyBoardUtil?.showKeyboard() + if (!etInputSpeed.hasFocus()) { + etInputSpeed.requestFocus() + } + return@setOnTouchListener false } - if (!etInputSpeed.hasFocus()) { - etInputSpeed.requestFocus() - } - return@setOnTouchListener false } // // 比如需要设置默认速度 // val speed = "30"