[2.13.0-arch-opt] binding car add config
This commit is contained in:
@@ -36,6 +36,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
@@ -41,6 +41,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
@@ -38,6 +38,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.104\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
@@ -41,6 +41,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
@@ -39,6 +39,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
@@ -41,6 +41,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
@@ -42,6 +42,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.102\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
@@ -41,6 +41,8 @@ project.android.productFlavors {
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'true'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
@@ -79,6 +79,7 @@ object ConfigStartUp {
|
||||
DebugConfig.setMapOptVersion(BuildConfig.MAP_SDK_OPT_VERSION)
|
||||
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME)
|
||||
DebugConfig.setMultiDisplay(BuildConfig.IS_MULTI_DISPLAY)
|
||||
DebugConfig.setCarModelChange(BuildConfig.IS_CAR_MODEL_CHANGE)
|
||||
}
|
||||
|
||||
private fun initOtherConfig(context: Context) {
|
||||
|
||||
@@ -115,7 +115,7 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
SharedPrefsMgr.getInstance(mContext!!)
|
||||
.putLong("typeDriver", System.currentTimeMillis() / (1000 * 60))
|
||||
BindingCarNetWorkManager.instance
|
||||
.getBindingcarInfo(mContext, macAddress, widevineIDWithMd5, screenType)
|
||||
.getBindingCarInfo(mContext!!, macAddress, widevineIDWithMd5, screenType)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
SharedPrefsMgr.getInstance(mContext!!)
|
||||
.putLong("typePassenger", System.currentTimeMillis() / (1000 * 60))
|
||||
BindingCarNetWorkManager.instance
|
||||
.getBindingcarInfo(mContext, macAddress, widevineIDWithMd5, screenType)
|
||||
.getBindingCarInfo(mContext!!, macAddress, widevineIDWithMd5, screenType)
|
||||
}
|
||||
}
|
||||
}//乘客屏//司机屏
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhjt.mogo_core_function_devatools.binding
|
||||
import android.content.Context
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarRequest
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
|
||||
@@ -40,16 +41,17 @@ class BindingCarNetWorkManager private constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
private val mBindingCarApiService: BindingCarApiService = MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(BindingCarApiService::class.java)
|
||||
private val mBindingCarApiService: BindingCarApiService =
|
||||
MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(BindingCarApiService::class.java)
|
||||
|
||||
/**
|
||||
* 获取绑定的车辆信息
|
||||
*
|
||||
* @param macAddress mac地址
|
||||
*/
|
||||
fun getBindingcarInfo(
|
||||
context: Context?,
|
||||
fun getBindingCarInfo(
|
||||
context: Context,
|
||||
macAddress: String?,
|
||||
widevineIDWithMd5: String?,
|
||||
screenType: Int
|
||||
@@ -72,10 +74,10 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: BindingCarInfo) {
|
||||
if (info != null && info.getData() != null) {
|
||||
d(
|
||||
SceneConstant.M_BINDING + TAG,
|
||||
"getBindingcarInfo onNext info.getData() =" + info.getData().toString()
|
||||
)
|
||||
d(SceneConstant.M_BINDING + TAG, "getBindingcarInfo data =" + info.getData().toString())
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress) && DebugConfig.isCarModelChange()) {
|
||||
updateCarVrIconRes(info.getData().brandId);
|
||||
}
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理
|
||||
updateCarVrIconRes(info.getData().brandId)
|
||||
when (info.getData().compare) {
|
||||
@@ -83,10 +85,8 @@ class BindingCarNetWorkManager private constructor() {
|
||||
"3" -> showModifyBindingCarDialog()
|
||||
"null" -> TipToast.shortTip("当前工控机没有入库")
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context!!).putString(
|
||||
SharedPrefsConstants.CAR_INFO,
|
||||
GsonUtils.toJson(info.getData())
|
||||
)
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.getData()))
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (gnssInfo != null) {
|
||||
//设置刹车信息,小于默认认为是刹车
|
||||
|
||||
@@ -190,4 +190,15 @@ public class DebugConfig {
|
||||
public static boolean isMultiDisplay() {
|
||||
return isMultiDisplay;
|
||||
}
|
||||
|
||||
// 兼容是否支持多屏幕方案
|
||||
private static boolean isCarModelChange = true;
|
||||
|
||||
public static void setCarModelChange(boolean status) {
|
||||
isCarModelChange = status;
|
||||
}
|
||||
|
||||
public static boolean isCarModelChange() {
|
||||
return isCarModelChange;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user