Merge branch 'dev_robobus-d_230413_3.1.0' into dev_robobus_d_3.2.0_4.14_local

This commit is contained in:
wangmingjun
2023-04-18 11:26:31 +08:00
6 changed files with 36 additions and 16 deletions

View File

@@ -232,7 +232,7 @@ class PM2DrivingInfoFragment :
val time = ceil(timeInSecond / 60f).toInt()
"$remainDis$disUnit".also { tv_distance.text = it }
"$time 分钟".also { tv_left_time.text = it }
"${time}分钟".also { tv_left_time.text = it }
}
fun noLineShow(){

View File

@@ -75,12 +75,14 @@
<!--pnc行为决策-->
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
android:id="@+id/pnc_actions_view"
android:layout_width="@dimen/dp_231"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_36"
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
android:layout_marginBottom="@dimen/dp_25"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:pnc_size="@dimen/dp_18"
app:pnc_top_margin="@dimen/dp_0"
app:background_resource="@drawable/bg_pnc" />
<!-- 图片或视频广告-->

View File

@@ -67,10 +67,16 @@
"shuttlepassengerm2": {
"ads": [
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "1"
},
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "2"
}
]
}
@@ -143,10 +149,16 @@
"shuttlepassengerm2": {
"ads": [
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "1"
},
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "2"
}
]
}
@@ -171,10 +183,16 @@
"shuttlepassengerm2": {
"ads": [
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "1"
},
{
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"type": 1,
"cacheImgPath": "",
"title": "2"
}
]
}

View File

@@ -44,8 +44,8 @@ class PncActionsView @JvmOverloads constructor(
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
private val bgResources: Int
private val topMargin: Int
private val txtSize: Int
private val topMargin: Float
private val txtSize: Float
init {
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
@@ -54,20 +54,20 @@ class PncActionsView @JvmOverloads constructor(
R.styleable.PncActionsView_background_resource,
R.drawable.pnc_actions_bg
)
topMargin = a.getResourceId(
topMargin = a.getDimension(
R.styleable.PncActionsView_pnc_top_margin,
resources.getDimension(R.dimen.dp_30).toInt()
resources.getDimension(R.dimen.dp_30)
)
txtSize = a.getResourceId(
txtSize = a.getDimension(
R.styleable.PncActionsView_pnc_size,
resources.getDimension(R.dimen.dp_34).toInt()
resources.getDimension(R.dimen.dp_34)
)
a.recycle()
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin.toInt()
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize.toFloat())
CallerAutoPilotStatusListenerManager.addListener(TAG, this)

View File

@@ -57,7 +57,7 @@ class TakeOverView @JvmOverloads constructor(
autopilotStatus = autoPilotStatusInfo.state
if(autoPilotStatusInfo.state == 7){
isParallel = true
}else if(autoPilotStatusInfo.state == 2){
}else if(autoPilotStatusInfo.state == 0 || autoPilotStatusInfo.state == 1){
isParallel = false
}
Log.i(TAG,"自动驾驶状态${autopilotStatus}")
@@ -113,7 +113,7 @@ class TakeOverView @JvmOverloads constructor(
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> {
//如果是平行驾驶状态下,提示弱网接管
Log.i(TAG,"弱网时自动驾驶状态:${autopilotStatus}")
if(autopilotStatus == 7 || isParallel){
if(isParallel){
CallerHmiManager.warningV2X(
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,

View File

@@ -76,8 +76,8 @@
<declare-styleable name="PncActionsView">
<attr name="background_resource" format="reference"/>
<attr name="pnc_top_margin" format="reference"/>
<attr name="pnc_size" format="reference"/>
<attr name="pnc_top_margin" format="dimension"/>
<attr name="pnc_size" format="dimension"/>
</declare-styleable>
</resources>