[Change]
修改默认的司机端连接IP 增加应用身份判断,暂未启用 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -51,7 +51,7 @@ class MoGoAutopilotProvider :
|
||||
0x00 -> // 司机
|
||||
{
|
||||
CallerMapDataCollectorManager.registerOnMapCollectTaskListener(this)
|
||||
AdasManager.getInstance().create(context, "192.168.1.141")
|
||||
AdasManager.getInstance().create(context, "192.168.1.102")
|
||||
}
|
||||
0x01 -> // 乘客
|
||||
{
|
||||
|
||||
@@ -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
|
||||
@@ -180,6 +180,7 @@
|
||||
android:textOff="关闭「刹车控制」"
|
||||
android:textOn="打开「刹车控制」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/changesight_top_btn"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -444,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
|
||||
|
||||
@@ -20,8 +20,12 @@ object FunctionBuildConfig {
|
||||
|
||||
/**
|
||||
* 当前APP的身份模式
|
||||
* 0x00 = 司机模式(默认)
|
||||
* 0x01 = 乘客模式(部分功能受到影响)
|
||||
*
|
||||
* 0x00 = 出租车-司机模式(默认)
|
||||
* 0x01 = 出租车-乘客模式(部分功能受到限制)
|
||||
*
|
||||
* 0xA0 = 小巴车-司机模式(默认)
|
||||
* 0xA1 = 小巴车-乘客模式(部分功能受到限制)
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user