[Change]
[1、增加清扫车判断方法]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-03 20:01:00 +08:00
parent b15f4f6944
commit 0e1041db59
3 changed files with 15 additions and 2 deletions

View File

@@ -28,8 +28,8 @@ project.android.productFlavors {
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
// 构建的应用身份类型出租车0|小巴A-司机|乘客
buildConfigField 'int', 'APP_IDENTITY_MODE', "0xA0"
// 构建的应用身份类型出租车0|小巴A清扫车B-司机|乘客
buildConfigField 'int', 'APP_IDENTITY_MODE', "0xB0"
// 连接的工控机IP地址
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
// 构建的是否是演示(美化)模式

View File

@@ -72,6 +72,8 @@ object FunctionBuildConfig {
*
* 0xA0 = 小巴车-司机模式(默认)
* 0xA1 = 小巴车-乘客模式(部分功能受到限制)
*
* 0xB0 = 清扫车-司机模式(默认)
*/
@Volatile
@JvmField

View File

@@ -50,6 +50,17 @@ object AppIdentityModeUtils {
return appIdentityMode and 0xA0 == 0xA0
}
/**
* 是否是 清扫车(这里不细分具体是:司机、乘客等类型)
*
* @param appIdentityMode productFlavors 配置的类型
* @return true - 是清扫车端 false - 不是清扫车端
*/
@JvmStatic
fun isSweeper(appIdentityMode: Int): Boolean {
return appIdentityMode and 0xB0 == 0xB0
}
/**
* 是否是 出租车端(这里不细分具体是:司机、乘客等类型)
*