From 0dda0336087b395180820d417827069dcab3b134 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Mon, 28 Nov 2022 11:20:56 +0800 Subject: [PATCH] =?UTF-8?q?2.13.0=20=E4=BC=98=E5=8C=96=E9=AD=94=E6=96=B9?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/main/MainLauncherActivity.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java index e0cba95c86..792050b5f6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java @@ -240,26 +240,26 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressADownTime = System.currentTimeMillis(); Log.d(TAG, "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime); - if ((pressADownTime - startPressTime) > 350 && (pressADownTime - startPressTime) < 1800 && pressBDownTime > 0) { + if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1600 && pressBDownTime > 0) { ToastUtils.showShort("方块 A 按AB组合 -2 "); sendAcc(true, -2); isCombinationKey = true; } if (!isCombinationKey) { - if ((pressADownTime - startPressTime) > 1900) { + if ((pressADownTime - startPressTime) > 1700) { ToastUtils.showShort("方块 长按A 无 操作 "); } } } else if (event.getAction() == KeyEvent.ACTION_UP) { pressAUpTime = System.currentTimeMillis(); - isPressEnd = false; - isCombinationKey = false; Log.e(TAG, "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime); - if ((pressAUpTime - startPressTime) < 300) { + if ((pressAUpTime - startPressTime) < 300 && !isCombinationKey) { ToastUtils.showShort("方块 单击A -1 "); sendAcc(true, -1); } - pressAUpTime = 0; + pressADownTime = 0; + isPressEnd = false; + isCombinationKey = false; } return true; @@ -267,27 +267,27 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressBDownTime = System.currentTimeMillis(); Log.d(TAG, "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime); - if ((pressBDownTime - startPressTime) > 350 && (pressBDownTime - startPressTime) < 1800 && pressADownTime > 0) { + if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1600 && pressADownTime > 0) { ToastUtils.showShort("方块 B 按AB组合 "); sendAcc(true, -2); isCombinationKey = true; } if (!isCombinationKey) { - if ((pressBDownTime - startPressTime) > 1900) { + if ((pressBDownTime - startPressTime) > 1700) { ToastUtils.showShort("方块 长按B =1 "); sendAcc(true, +1); } } } else if (event.getAction() == KeyEvent.ACTION_UP) { pressBUpTime = System.currentTimeMillis(); - isPressEnd = false; - isCombinationKey = false; Log.e(TAG, "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime); - if ((pressBUpTime - startPressTime) < 300) { + if ((pressBUpTime - startPressTime) < 300 && !isCombinationKey) { ToastUtils.showShort("方块 单击B 0 "); sendAcc(false, 0.0); } pressBDownTime = 0; + isPressEnd = false; + isCombinationKey = false; } return true; @@ -295,7 +295,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressCDownTime = System.currentTimeMillis(); if (!isCombinationKey) { - if ((pressCDownTime - startPressTime) > 1900) { + if ((pressCDownTime - startPressTime) > 1700) { ToastUtils.showShort("方块 长按C 无操作 "); } } @@ -313,7 +313,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressDDownTime = System.currentTimeMillis(); if (!isCombinationKey) { - if ((pressDDownTime - startPressTime) > 1900) { + if ((pressDDownTime - startPressTime) > 1700) { ToastUtils.showShort("方块 长按D 无操作 "); } } @@ -332,7 +332,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressEDownTime = System.currentTimeMillis(); if (!isCombinationKey) { - if ((pressEDownTime - startPressTime) > 1900) { + if ((pressEDownTime - startPressTime) > 1700) { ToastUtils.showShort("方块 长按E 鸣笛 "); CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1); if (timerHorn == null) {