[2.13.0] 修改魔方单击的时间
This commit is contained in:
@@ -219,7 +219,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressADownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressAUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
isCombinationKey = 1;
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
@@ -259,7 +259,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressBDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressBUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
}
|
||||
@@ -301,7 +301,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressCDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime));
|
||||
if ((pressCDownTime - startPressTime) > 1320) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 ");
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按C 无操作 ");
|
||||
}
|
||||
@@ -310,8 +309,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressCUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
|
||||
if ((pressCUpTime - startPressTime) < 300) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 ");
|
||||
if ((pressCUpTime - startPressTime) < 350) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
}
|
||||
@@ -324,7 +322,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressDDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime));
|
||||
if ((pressDDownTime - startPressTime) > 1320) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 ");
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按D 无操作 ");
|
||||
}
|
||||
@@ -333,11 +330,10 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressDUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
|
||||
if ((pressDUpTime - startPressTime) < 300) {
|
||||
if ((pressDUpTime - startPressTime) < 350) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
|
||||
}
|
||||
}
|
||||
@@ -350,7 +346,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按E 鸣笛 ");
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
|
||||
if (timerHorn == null) {
|
||||
timerHorn = new Timer();
|
||||
@@ -367,11 +362,10 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressEUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
|
||||
if ((pressEUpTime - startPressTime) < 300) {
|
||||
if ((pressEUpTime - startPressTime) < 350) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击E 开启自动驾驶 = " + CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user