[dev_arch_opt_3.0] 添加清扫车模型处理,修改调试面板obu显示

This commit is contained in:
lixiaopeng
2023-02-28 16:22:14 +08:00
parent 404150e24a
commit 31cfcbe406
4 changed files with 68 additions and 75 deletions

View File

@@ -172,8 +172,10 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
* obu的升级,只需要司机屏连接
*/
fun queryObuUpgrade(obuVersionName: String) {
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
if (screenType == 1) {
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
}
}
}

View File

@@ -163,18 +163,26 @@ class BindingCarNetWorkManager private constructor() {
}
d(SceneConstant.M_BINDING + TAG, "updateCarVrIconRes : $brandId")
when (brandId) {
"1" -> {
"1" -> { //东风
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
}
"2" -> {
"2" -> { //红旗
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.hq_h9)
HdMapBuildConfig.currentCarVrIconRes = R.raw.hq_h9
}
"3" -> {
"3" -> { //金旅
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
}
"4" -> { //开沃
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
}
"5" -> { //福田
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.huanwei)
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
}
else -> {
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
@@ -186,6 +194,8 @@ class BindingCarNetWorkManager private constructor() {
return when (HdMapBuildConfig.currentCarVrIconRes) {
R.raw.chuzuche -> "1"
R.raw.xiaobache -> "3"
R.raw.xiaobache -> "4"
R.raw.huanwei -> "5"
else -> "1"
}
}

View File

@@ -400,14 +400,13 @@ internal class DebugSettingView @JvmOverloads constructor(
//展示OBU控制中心
obuControllerLayout.visibility = View.VISIBLE
tbVehicleStateController.isChecked = true
//展示HMI控制中心
hmiObuLayout.visibility = View.VISIBLE
} else {
buttonView.setCompoundDrawables(null, null, iconRight, null)
//隐藏OBU控制中心
obuControllerLayout.visibility = View.GONE
tbVehicleStateController.isChecked = false
hmiObuLayout.visibility = View.GONE
}
}
@@ -1049,29 +1048,6 @@ internal class DebugSettingView @JvmOverloads constructor(
HmiBuildConfig.isShowSnBindingView = !isChecked
}
/**
* obu弱势交通控制
*/
tbObuWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
// 默认开启
HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
}
/**
* 云端弱势交通控制
*/
tbCloudWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
// 默认关闭
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
}
/**
* 限速数据优先使用obu默认打开
*/
tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
}
/**
* 实时加速度面板控制
*/
@@ -1647,6 +1623,28 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.text = "开启美化模式"
}
//obu TODO 后面会添加很多os那边需要显示的内容
obuVersionNameTv.text = Html.fromHtml(
"OBU版本号${
if (AppConfigInfo.isConnectObu) {
"<font color='blue'> 1.0"
} else {
"<font color='red'>异常"
}
}"
)
obuConnectStatusTv.text = Html.fromHtml(
"OBU连接状态${
if (AppConfigInfo.isConnectObu) {
"<font color='blue'>正常"
} else {
"<font color='red'>异常"
}
}"
)
}
/**

View File

@@ -1077,64 +1077,47 @@
android:id="@+id/tvObuInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_margin="@dimen/dp_5"
android:minLines="4"
android:text="OBU配置信息"
android:textColor="#000"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/obuDivider" />
<View
android:id="@+id/obuDivider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0"
app:layout_constraintTop_toBottomOf="@id/tvObuInfo" />
<GridLayout
android:id="@+id/hmiObuLayout"
<LinearLayout
android:id="@+id/obuStatusCenterLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="2"
android:visibility="gone"
android:orientation="vertical"
android:visibility="visible"
tools:visibility="visible"
app:layout_constraintTop_toBottomOf="@id/obuDivider2"
app:layout_constraintTop_toBottomOf="@id/tvObuInfo"
tools:ignore="MissingConstraints">
<ToggleButton
android:id="@+id/tbObuWeaknessTraffic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="关闭路侧弱势群体预警"
android:textOn="打开路侧弱势群体预警"
android:textSize="@dimen/dp_24" />
<TextView
android:id="@+id/obuVersionNameTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ToggleButton
android:id="@+id/tbCloudWeaknessTraffic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="开启云端弱势群体预警"
android:textOn="关闭云端弱势群体预警"
android:textSize="@dimen/dp_24" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<ToggleButton
android:id="@+id/tbRoadLimitSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="获取路侧限速提醒"
android:textOn="关闭路侧限速提醒"
android:textSize="@dimen/dp_24" />
<TextView
android:id="@+id/obuConnectStatusTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
</LinearLayout>
</GridLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- OBU 配置 end -->