Merge branch 'dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_MogoAP_eagle-220_211207_8.0.17_merge

# Conflicts:
#	core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt
This commit is contained in:
donghongyu
2022-02-21 20:21:55 +08:00
11 changed files with 117 additions and 15 deletions

View File

@@ -88,6 +88,9 @@ public class MogoApplication extends MainMoGoApplication {
HmiBuildConfig.isShowPerspectiveSwitchView = false;
HmiBuildConfig.isShowToolsView = false;
HmiBuildConfig.isShowBadCaseView = false;
//业务端可以根据需要控制是否展示刹车和转向灯的ui
// HmiBuildConfig.isShowBrakeLightView = false;
// HmiBuildConfig.isShowTurnLightView = false;
}
if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxi")
@@ -96,6 +99,8 @@ public class MogoApplication extends MainMoGoApplication {
} else if (DebugConfig.getProductFlavor().equals("fPadLenovoOchBus")
|| DebugConfig.getProductFlavor().equals("fPadLenovoOchBusPassenger")) {
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache;
HmiBuildConfig.isShowBrakeLightView = false;
HmiBuildConfig.isShowTurnLightView = false;
}
}

View File

@@ -505,6 +505,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
.setSidePattern(SidePattern.LEFT)
.setGravity(Gravity.LEFT, offsetY = 72)
.setImmersionStatusBar(true)
.setWindowHeight(WindowManager.LayoutParams.MATCH_PARENT)
.setAnimator(object : DefaultAnimator() {
override fun enterAnim(
view: View,
@@ -1030,13 +1031,11 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
}
}
private var isOpenTurnlight :Boolean = true
/**
* 显示转向灯效果
* 显示转向灯效果 if (HmiBuildConfig.isShowBadCaseView) {
*/
override fun showTurnLight(light: Int) {
if (isOpenTurnlight) {
if (HmiBuildConfig.isShowTurnLightView) {
//Log.d("liyz", "showTurnLight light = $light")
turnLightView.setTurnLight(light)
}
@@ -1046,15 +1045,18 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
* 显示刹车效果
*/
override fun showBrakeLight(light: Int) {
if (isOpenTurnlight) {
if (HmiBuildConfig.isShowBrakeLightView) {
// Log.d("liyz", "showBrakeLight light = $light")
brakeView.setBrakeLight(light)
}
}
override fun setTurnLightFunction(isOpen: Boolean) {
isOpenTurnlight = isOpen
HmiBuildConfig.isShowTurnLightView = isOpen
}
override fun setBrakeLightFunction(isOpen: Boolean) {
HmiBuildConfig.isShowBrakeLightView = isOpen
}
/**

View File

@@ -196,6 +196,14 @@ class DebugSettingView @JvmOverloads constructor(
}
}
tbOpenBrakeLight.setOnCheckedChangeListener { buttonView, isChecked ->
if (!isChecked) {
CallerHmiManager.setBrakeLightFunction(true)
} else {
CallerHmiManager.setBrakeLightFunction(false)
}
}
changesight_top_btn.setOnClickListener {
CallerHDMapManager.setMapDAngle(0);
}
@@ -298,6 +306,8 @@ class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.setOnCheckedChangeListener { buttonView, isChecked ->
CallerAutoPilotManager.setDemoMode(isChecked)
FunctionBuildConfig.isDemoMode = isChecked
cbIsDrawAutopilotTrajectoryData.isEnabled = !isChecked
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked
if (!FunctionBuildConfig.isDemoMode) {
cbIsDrawAutopilotTrajectoryData.isChecked = false
}

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="960px"
android:layout_height="2000px"
android:layout_height="match_parent"
android:background="@color/notice_check_dialog_bg_color">
<ScrollView

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/dp_800"
android:layout_height="match_parent"
android:layout_height="@dimen/dp_999"
android:background="#FFFFFF">
<ScrollView
@@ -171,6 +171,16 @@
android:textOn="打开「转向灯控制」"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbOpenBrakeLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="关闭「刹车控制」"
android:textOn="打开「刹车控制」"
android:textSize="@dimen/dp_24" />
<Button
android:id="@+id/changesight_top_btn"
android:layout_width="wrap_content"
@@ -435,7 +445,7 @@
android:gravity="center"
android:minHeight="48dp"
android:padding="@dimen/dp_5"
android:text="192.168.1.102"
android:text="192.168.8.102"
android:textSize="@dimen/dp_24" />
<Button

View File

@@ -20,8 +20,12 @@ object FunctionBuildConfig {
/**
* 当前APP的身份模式
* 0x00 = 司机模式(默认)
* 0x01 = 乘客模式(部分功能受到影响
*
* 0x00 = 出租车-司机模式(默认
* 0x01 = 出租车-乘客模式(部分功能受到限制)
*
* 0xA0 = 小巴车-司机模式(默认)
* 0xA1 = 小巴车-乘客模式(部分功能受到限制)
*/
@Volatile
@JvmField

View File

@@ -35,4 +35,16 @@ object HmiBuildConfig {
*/
@JvmField
var isShowBadCaseView = true
/**
* 是否展示转向灯ui
*/
@JvmField
var isShowTurnLightView = true
/**
* 是否展示刹车ui
*/
@JvmField
var isShowBrakeLightView = true
}

View File

@@ -36,10 +36,15 @@ interface IMoGoWaringProvider {
fun setToolsViewVisibility(visibility: Int)
/**
* 控制转向灯和刹车功能
* 控制转向灯
*/
fun setTurnLightFunction(isOpen: Boolean)
/**
* 控制刹车功能
*/
fun setBrakeLightFunction(isOpen: Boolean)
/**
* 开关DebugView
*/

View File

@@ -54,12 +54,19 @@ object CallerHmiManager : CallerBase() {
}
/**
* 控制转向灯和刹车功能
* 控制转向灯功能
*/
fun setTurnLightFunction(isOpen: Boolean) {
waringProviderApi?.setTurnLightFunction(isOpen)
}
/**
* 控制刹车功能
*/
fun setBrakeLightFunction (isOpen: Boolean) {
waringProviderApi?.setBrakeLightFunction(isOpen)
}
/**
* 开关DebugView
*/

View File

@@ -0,0 +1,48 @@
package com.mogo.eagle.core.utilcode.mogo;
/**
* 根据
*
* @see com.mogo.eagle.core.data.config.FunctionBuildConfig#appIdentityMode 判断身份
*/
public class AppIdentityModeUtils {
/**
* 是否是 司机端(这里不细分具体是:小巴、出租车等类型)
*
* @param appIdentityMode productFlavors 配置的类型
* @return true - 是司机端 false - 不是司机端
*/
public static boolean isDriver(int appIdentityMode) {
return (appIdentityMode & 0x01) != 0x01;
}
/**
* 是否是 乘客端(这里不细分具体是:小巴、出租车等类型)
*
* @param appIdentityMode productFlavors 配置的类型
* @return true - 是乘客端 false - 不是乘客端
*/
public static boolean isPassenger(int appIdentityMode) {
return (appIdentityMode & 0x01) == 0x01;
}
/**
* 是否是 小巴车端(这里不细分具体是:司机、乘客等类型)
*
* @param appIdentityMode productFlavors 配置的类型
* @return true - 是小巴车端 false - 不是小巴车端
*/
public static boolean isBus(int appIdentityMode) {
return (appIdentityMode & 0xA0) == 0xA0;
}
/**
* 是否是 出租车端(这里不细分具体是:司机、乘客等类型)
*
* @param appIdentityMode productFlavors 配置的类型
* @return true - 是出租车端 false - 不是出租车端
*/
public static boolean isTaxi(int appIdentityMode) {
return (appIdentityMode & 0xA0) != 0xA0;
}
}

View File

@@ -124,7 +124,6 @@ public class MogoRouteOverlayManager implements
// }else {
//
// }我
if ( STATUS_AUTOPILOT != 1){
RouteOverlayDrawer.getInstance(mContext).clearEndingMarker();
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();