Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display
# Conflicts: # core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java
This commit is contained in:
@@ -570,10 +570,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
Log.i(
|
||||
"1026-emArrow",
|
||||
"debug setting FunctionBuildConfig.isDemoMode : ${FunctionBuildConfig.isDemoMode}"
|
||||
)
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
}
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.temp.EventLogout
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -31,6 +32,14 @@ class BusOperationView @JvmOverloads constructor(
|
||||
clickPersonalRightView();
|
||||
}
|
||||
|
||||
private fun initPersonalIcon() {
|
||||
if("fPadLenovoOchTaxi" == DebugConfig.getProductFlavor()){
|
||||
ivGotoPersonalInfo.visibility = VISIBLE
|
||||
}else{
|
||||
ivGotoPersonalInfo.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun clickPersonalRightView() {
|
||||
ivGotoPersonalInfo.onClick {
|
||||
EventBus.getDefault().post(EventLogout(EventLogout.PERSONAL_TYPE))
|
||||
@@ -39,6 +48,7 @@ class BusOperationView @JvmOverloads constructor(
|
||||
|
||||
override fun showBusOperation() {
|
||||
ochBusOperationStatus.visibility = View.VISIBLE
|
||||
initPersonalIcon()
|
||||
}
|
||||
|
||||
override fun changerOperationStatus(isOut: Boolean) {
|
||||
|
||||
@@ -62,7 +62,7 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
if (directionLight == 1 || directionLight == 2) {
|
||||
if (!isVisualAngleChanged) {
|
||||
isVisualAngleChanged = true
|
||||
CallerVisualAngleManager.changeVisualAngle(Turning)
|
||||
CallerVisualAngleManager.changeVisualAngle(Turning(true))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
} else { //消失
|
||||
if (isVisualAngleChanged) {
|
||||
isVisualAngleChanged = false
|
||||
CallerVisualAngleManager.changeVisualAngle(Default())
|
||||
CallerVisualAngleManager.changeVisualAngle(Turning(false))
|
||||
}
|
||||
if (!isDisappare) {
|
||||
isDisappare = true
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.rousetime.android_startup.model.CostTimesModel;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
@@ -68,6 +69,20 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
|
||||
private BluetoothMonitorReceiver mBluetoothReceiver = null;
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
private boolean isShowToast = false; //toast 控制
|
||||
private long startPressTime = 0; //开始按减时间
|
||||
private boolean isPressEnd = false; //按键是否结束
|
||||
private volatile int isCombinationKey = 0; //是否是组合按键 1单击,2长按,3组合
|
||||
private long pressADownTime = 0;
|
||||
private long pressAUpTime = 0;
|
||||
private long pressBDownTime = 0;
|
||||
private long pressBUpTime = 0;
|
||||
private long pressCDownTime = 0;
|
||||
private long pressCUpTime = 0;
|
||||
private long pressDDownTime = 0;
|
||||
private long pressDUpTime = 0;
|
||||
private long pressEDownTime = 0;
|
||||
private long pressEUpTime = 0;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -225,24 +240,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
private long startPressTime = 0; //开始按减时间
|
||||
private boolean isPressEnd = false; //按键是否结束
|
||||
private boolean isCombinationKey = false; //是否是组合按键
|
||||
|
||||
private long pressADownTime = 0;
|
||||
private long pressAUpTime = 0;
|
||||
private long pressBDownTime = 0;
|
||||
private long pressBUpTime = 0;
|
||||
private long pressCDownTime = 0;
|
||||
private long pressCUpTime = 0;
|
||||
private long pressDDownTime = 0;
|
||||
private long pressDUpTime = 0;
|
||||
private long pressEDownTime = 0;
|
||||
private long pressEUpTime = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 魔方按键分发 提测前注释 ToastUtils TODO
|
||||
* 魔方按键分发
|
||||
*
|
||||
* @param event
|
||||
* @return
|
||||
@@ -264,26 +263,40 @@ 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) > 320 && (pressADownTime - startPressTime) < 1600 && pressBDownTime > 0) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
isCombinationKey = true;
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (!isCombinationKey) {
|
||||
if ((pressADownTime - startPressTime) > 1700) {
|
||||
ToastUtils.showShort("方块 长按A 无 操作 ");
|
||||
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressADownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按A 无 操作 ");
|
||||
}
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressAUpTime = System.currentTimeMillis();
|
||||
Log.e(TAG, "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 300 && !isCombinationKey) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
isCombinationKey = 1;
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
}
|
||||
sendAcc(true, -1);
|
||||
}
|
||||
pressADownTime = 0;
|
||||
isPressEnd = false;
|
||||
isCombinationKey = false;
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
isCombinationKey = 0;
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -291,44 +304,59 @@ 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) > 320 && (pressBDownTime - startPressTime) < 1600 && pressADownTime > 0) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
isCombinationKey = true;
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (!isCombinationKey) {
|
||||
if ((pressBDownTime - startPressTime) > 1700) {
|
||||
ToastUtils.showShort("方块 长按B =1 ");
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressBDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按B +1 ");
|
||||
}
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressBUpTime = System.currentTimeMillis();
|
||||
Log.e(TAG, "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 300 && !isCombinationKey) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
}
|
||||
sendAcc(false, 0.0);
|
||||
isCombinationKey = 1;
|
||||
}
|
||||
pressBDownTime = 0;
|
||||
isPressEnd = false;
|
||||
isCombinationKey = false;
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
isCombinationKey = 0;
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_C) { //单击左变道,长按无操作
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressCDownTime = System.currentTimeMillis();
|
||||
if (!isCombinationKey) {
|
||||
if ((pressCDownTime - startPressTime) > 1700) {
|
||||
if ((pressCDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按C 无操作 ");
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressCUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
isCombinationKey = false;
|
||||
if ((pressCUpTime - startPressTime) < 300) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneLeft();
|
||||
}
|
||||
}
|
||||
@@ -336,17 +364,18 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_D) { //单击向右变道,双击无操作
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressDDownTime = System.currentTimeMillis();
|
||||
if (!isCombinationKey) {
|
||||
if ((pressDDownTime - startPressTime) > 1700) {
|
||||
if ((pressDDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按D 无操作 ");
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressDUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
isCombinationKey = false;
|
||||
if ((pressDUpTime - startPressTime) < 300) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
|
||||
}
|
||||
}
|
||||
@@ -355,28 +384,29 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_E) { //单击启动自驾,长按鸣笛
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressEDownTime = System.currentTimeMillis();
|
||||
if (!isCombinationKey) {
|
||||
if ((pressEDownTime - startPressTime) > 1700) {
|
||||
if ((pressEDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按E 鸣笛 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
|
||||
if (timerHorn == null) {
|
||||
timerHorn = new Timer();
|
||||
}
|
||||
timerHorn.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(2);
|
||||
timerHorn = null;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
|
||||
if (timerHorn == null) {
|
||||
timerHorn = new Timer();
|
||||
}
|
||||
timerHorn.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(2);
|
||||
timerHorn = null;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressEUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
isCombinationKey = false;
|
||||
if ((pressEUpTime - startPressTime) < 300) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 417 B |
@@ -1508,6 +1508,20 @@
|
||||
app:layout_constraintRight_toLeftOf="@id/btnDrawTrolley"
|
||||
app:layout_constraintTop_toBottomOf="@id/reset_changesight" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/btnDrawFusion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="打开fusion融合颜色替换"
|
||||
android:textOn="关闭fusion融合颜色替换"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/changesight_cross_btn"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reset_changesight" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDrawTrolley"
|
||||
android:layout_width="0dp"
|
||||
@@ -1862,7 +1876,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合感知数据"
|
||||
android:text="车端感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
@@ -1882,7 +1896,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合V2I感知数据"
|
||||
android:text="V2I感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
@@ -1892,7 +1906,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合V2N-RSM感知数据"
|
||||
android:text="V2N-RSM感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
|
||||
@@ -63,9 +63,11 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ivGotoPersonalInfo"
|
||||
android:layout_width="@dimen/dp_17"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:src="@drawable/icon_right"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:src="@drawable/och_arrow_right"
|
||||
android:visibility="gone"
|
||||
android:scaleType="center"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/actvAccountPhone"
|
||||
|
||||
Reference in New Issue
Block a user