Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0

This commit is contained in:
donghongyu
2023-06-05 14:43:04 +08:00
25 changed files with 78 additions and 294 deletions

View File

@@ -26,11 +26,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_120"

View File

@@ -36,11 +36,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -39,11 +39,6 @@
android:layout_width="@dimen/dp_148"
android:layout_height="@dimen/dp_150"/>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -44,11 +44,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -27,11 +27,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_121"

View File

@@ -36,11 +36,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -40,11 +40,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--pnc行为决策-->
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
android:layout_width="wrap_content"

View File

@@ -91,11 +91,6 @@
</RelativeLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -19,8 +19,13 @@ project.android.productFlavors {
// ②连接的工控机IP地址
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
if (isCurrentDriver("bus")) {
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false'
} else if (isCurrentPassenger("bus")) {
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
}
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'

View File

@@ -49,7 +49,7 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
* @see EventTypeEnumNew
*/
private fun updateIcon(alarmInfo: V2XRoadEventEntity) {
// 道路施工、积水、路面结冰、浓雾、事故、拥堵
// 道路施工、积水、路面结冰、事故、拥堵
val iconResId = EventTypeEnumNew.getUpdateIconRes(alarmInfo.poiType)
if (iconResId != 0) {
ivCar.setImageResource(iconResId)

View File

@@ -1,95 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.widget
import android.animation.Animator
import android.animation.Animator.AnimatorListener
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.function.api.hmi.warning.IV2XEventListener
import com.mogo.eagle.core.function.call.v2x.CallerV2XWarningListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import kotlinx.android.synthetic.main.view_v2x_warning_fog.view.*
class V2XFogEventView(context: Context, attrs: AttributeSet) :
ConstraintLayout(context, attrs), IV2XEventListener {
companion object {
private const val TAG = "V2XFogEventView"
}
private val animatorSet = AnimatorSet()
init {
LayoutInflater.from(context).inflate(R.layout.view_v2x_warning_fog, this, true)
val animator1 = ObjectAnimator.ofFloat(iv_wu1, "alpha", 0f, 1f, 0f)
val animator2 = ObjectAnimator.ofFloat(iv_wu1, "translationX", -500f, 100f, 300f)
val animator3 = ObjectAnimator.ofFloat(iv_wu1, "scaleX", 1f, 1.5f, 2f)
val animator4 = ObjectAnimator.ofFloat(iv_wu1, "scaleY", 1f, 1.5f, 2f)
val animator5 = ObjectAnimator.ofFloat(iv_wu2, "alpha", 0f, 1f, 0f)
val animator6 = ObjectAnimator.ofFloat(iv_wu2, "translationX", 500f, -100f, -300f)
val animator7 = ObjectAnimator.ofFloat(iv_wu2, "scaleX", 1f, 1.5f, 2f)
val animator8 = ObjectAnimator.ofFloat(iv_wu2, "scaleY", 1f, 1.5f, 2f)
animatorSet.playTogether(
animator1,
animator2,
animator3,
animator4,
animator5,
animator6,
animator7,
animator8
)
animatorSet.duration = 5000
animatorSet.addListener(object : AnimatorListener{
override fun onAnimationStart(animation: Animator?) {
visibility = View.VISIBLE
}
override fun onAnimationEnd(animation: Animator?) {
visibility = View.GONE
}
override fun onAnimationCancel(animation: Animator?) {
visibility = View.GONE
}
override fun onAnimationRepeat(animation: Animator?) {
}
})
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerV2XWarningListenerManager.addListener(TAG, this)
}
override fun show(v2xType: String, direction: WarningDirectionEnum, time: Long) {
ThreadUtils.runOnUiThread {
if(v2xType == EventTypeEnumNew.FOURS_FOG.poiType){
if (animatorSet.isStarted) {
return@runOnUiThread
}
animatorSet.start()
}
}
}
override fun dismiss(direction: WarningDirectionEnum) {
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerV2XWarningListenerManager.removeListener(TAG)
}
}

View File

@@ -1,55 +0,0 @@
package com.mogo.eagle.core.function.main;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.View;
import com.mogo.eagle.core.function.hmi.R;
/**
* created by wujifei on 2021/3/30 14:05
* describe:
*/
public class DisplayEffectsHelper {
private volatile static DisplayEffectsHelper instance = null;
private AnimatorSet animatorSet;
public static DisplayEffectsHelper getInstance() {
if (instance == null) {
synchronized (DisplayEffectsHelper.class) {
if (instance == null) {
instance = new DisplayEffectsHelper();
}
}
}
return instance;
}
public void init(View rootView) {
View view1 = rootView.findViewById(R.id.iv_wu1);
View view2 = rootView.findViewById(R.id.iv_wu2);
ObjectAnimator animator1 = ObjectAnimator.ofFloat(view1, "alpha", 0f, 1f, 0f);
ObjectAnimator animator2 = ObjectAnimator.ofFloat(view1, "translationX", -500, 100f, 300f);
ObjectAnimator animator3 = ObjectAnimator.ofFloat(view1, "scaleX", 1f, 1.5f, 2f);
ObjectAnimator animator4 = ObjectAnimator.ofFloat(view1, "scaleY", 1f, 1.5f, 2f);
ObjectAnimator animator5 = ObjectAnimator.ofFloat(view2, "alpha", 0f, 1f, 0f);
ObjectAnimator animator6 = ObjectAnimator.ofFloat(view2, "translationX", 500, -100f, -300f);
ObjectAnimator animator7 = ObjectAnimator.ofFloat(view2, "scaleX", 1f, 1.5f, 2f);
ObjectAnimator animator8 = ObjectAnimator.ofFloat(view2, "scaleY", 1f, 1.5f, 2f);
animatorSet = new AnimatorSet();
animatorSet.playTogether(animator1, animator2, animator3, animator4, animator5, animator6, animator7, animator8);
animatorSet.setDuration(5000);
}
public void display() {
animatorSet.start();
}
private float dp2px(float dp) {
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
return dp * metrics.density;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 KiB

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/iv_wu1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:alpha="0"
android:src="@drawable/wu1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/iv_wu2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:alpha="0"
android:src="@drawable/wu2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -121,6 +121,7 @@ object MarkerDrawerManager {
* @param realLat
* @return 返回已经到达点的index
*/
@Synchronized
private fun getCarLocationIndex(
routePoints: List<LatLng>,
newPoints: MutableList<LatLng>,

View File

@@ -689,21 +689,25 @@ class OverMapView @JvmOverloads constructor(
boundsBuilder.include(currentLatLng)
val cameraPosition = CameraPosition.Builder().tilt(mTilt).build()
//第二个参数为四周留空宽度
mAMap!!.moveCamera(
CameraUpdateFactory.newLatLngBoundsRect(
boundsBuilder.build(),
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
if (mAMap != null) {
mAMap!!.moveCamera(
CameraUpdateFactory.newLatLngBoundsRect(
boundsBuilder.build(),
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
)
)
)
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
} else {
//设置希望展示的地图缩放级别
val cameraPosition = CameraPosition.Builder()
.target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build()
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
if (mCarMarker != null && mAMap != null) {
//设置希望展示的地图缩放级别
val cameraPosition = CameraPosition.Builder()
.target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build()
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
}
}
}
@@ -869,21 +873,25 @@ class OverMapView @JvmOverloads constructor(
if (!isOnlyCarLocation) {
val cameraPosition = CameraPosition.Builder().tilt(mTilt).build()
//第二个参数为四周留空宽度
mAMap!!.moveCamera(
CameraUpdateFactory.newLatLngBoundsRect(
boundsBuilder.build(),
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
if (mAMap != null) {
mAMap!!.moveCamera(
CameraUpdateFactory.newLatLngBoundsRect(
boundsBuilder.build(),
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
)
)
)
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
} else {
//设置希望展示的地图缩放级别
val cameraPosition = CameraPosition.Builder()
.target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build()
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
if (mCarMarker != null && mAMap != null) {
val cameraPosition = CameraPosition.Builder()
.target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build()
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
}
}
}

View File

@@ -50,8 +50,6 @@ public class CloudPoiManager {
R.drawable.module_common_icon_map_marker_road_block_up2, R.drawable.module_common_icon_map_marker_road_block_up2_white, "拥堵"));
poiWrapper.put(EventTypeEnumNew.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_PONDING.getPoiType(),
R.drawable.module_common_icon_map_marker_pondingl2, R.drawable.module_common_icon_map_marker_pondingl2_white, "积水"));
poiWrapper.put(EventTypeEnumNew.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_FOG.getPoiType(),
R.drawable.module_common_ic_rc_dark_frog2, R.drawable.module_common_ic_rc_dark_frog2_white, "浓雾"));
poiWrapper.put(EventTypeEnumNew.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ICE.getPoiType(),
R.drawable.module_common_ic_rc_freeze2, R.drawable.module_common_ic_rc_freeze2_white, "结冰"));
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(),

View File

@@ -45,12 +45,6 @@ enum class EventTypeEnumNew(
"前方道路积水", "道路积水"
),
//浓雾
FOURS_FOG(
"10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
"前方出现浓雾", "出现浓雾"
),
//结冰
FOURS_ICE(
"10011", "路面结冰", "路面结冰", R.drawable.v2x_icon_jiebing_vr,
@@ -538,7 +532,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -559,7 +552,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -580,7 +572,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> "施工"
FOURS_BLOCK_UP.poiType -> "道路拥堵"
FOURS_PONDING.poiType -> "道路积水"
FOURS_FOG.poiType -> "出现浓雾"
FOURS_ICE.poiType -> "路面结冰"
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
@@ -596,7 +587,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -616,7 +606,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType-> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_PONDING.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
else -> {
@@ -632,7 +622,7 @@ enum class EventTypeEnumNew(
R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, FOURS_PONDING.poiType,
FOURS_FOG.poiType, FOURS_ICE.poiType,
FOURS_ICE.poiType,
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
@@ -649,7 +639,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType,
FOURS_PONDING.poiType,
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
@@ -670,7 +660,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
FOURS_PONDING.poiType -> FOURS_PONDING.tts
FOURS_FOG.poiType -> FOURS_FOG.tts
FOURS_ICE.poiType -> FOURS_ICE.tts
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.tts
@@ -690,7 +679,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
FOURS_PONDING.poiType -> FOURS_PONDING.content
FOURS_FOG.poiType -> FOURS_FOG.content
FOURS_ICE.poiType -> FOURS_ICE.content
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
@@ -710,7 +698,6 @@ enum class EventTypeEnumNew(
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
FOURS_ACCIDENT.poiType,FOURS_ACCIDENT_04.poiType -> R.raw.v2x_shigu
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
FOURS_FOG.poiType -> R.raw.v2x_nongwu
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
@@ -763,10 +750,6 @@ enum class EventTypeEnumNew(
FOURS_PONDING.poiType ->{
FOURS_PONDING.poiTypeStr
}
//浓雾
FOURS_FOG.poiType ->{
FOURS_FOG.poiTypeStr
}
//结冰
FOURS_ICE.poiType ->{
FOURS_ICE.poiTypeStr
@@ -1066,10 +1049,6 @@ enum class EventTypeEnumNew(
FOURS_PONDING.poiType -> {
R.drawable.v2x_icon_jishui_vr
}
//浓雾
FOURS_FOG.poiType -> {
R.drawable.v2x_icon_nongwu_vr
}
//结冰
FOURS_ICE.poiType -> {
R.drawable.v2x_icon_jiebing_vr

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -54,11 +54,14 @@ message StatusInfo {
optional DropTopic topic_drop_info=3; // topic 掉频信息, 如有掉频添加没有不添加
optional string reserved = 4; // 用于表示idle模式'idle' 表示idle模式 'work' 表示正常工作
// add by liyl 20220907
optional int32 pilot_mode = 5; // 0: manaul 1: autopilot 2: RemotePilot
optional int32 pilot_mode = 5; // 0: manaul 1: autopilot 6: RemotePilot
optional string map_version = 6; // MAP 版本信息
optional string master_version = 7; // system_master 版本信息
optional bool auto_pilot_ready = 8; // 自动驾驶状态就绪, 20221111增加
optional bool remote_pilot_ready = 9; // 平行驾驶状态就绪
optional NodeFaultList auto_pilot_unready_list = 10; //20221128 增加
optional NodeFaultList remote_pilot_unready_list = 11; //20221128 增加
optional NodeFaultList auto_pilot_unready_list = 10; //自驾未就绪节点列表, 20221128 增加
optional NodeFaultList remote_pilot_unready_list = 11; //平行驾驶未就绪列表, 20221128 增加
optional string auto_pilot_unready_reason = 12; //自动驾驶状态未就绪原因描述
optional string remote_pilot_unready_reason = 13; //平行驾驶状态未就绪原因描述
}

View File

@@ -13,7 +13,7 @@ import chassis.ChassisStatesOuterClass;
import system_master.SystemStatusInfo;
/**
* 是否可以启动自动驾驶能力检测 工控机版本>=250使用此类
* 是否可以启动自动驾驶能力检测 非清扫车MAP版本>=250使用此类 清扫车MAP版本>=250&& <330使用此类
* 目前监控了底盘的一些状态和查询节点状态应答的数据
* 没有使用监控事件报告的原因是因为,部分异常没进行正常恢复通知,例如收到了异常监控数据,但是异常恢复之后没有恢复的通知
* <p>
@@ -27,8 +27,10 @@ public class AutopilotAbility250 {
private static final String[] NODE_INFO_STATE = {"未知状态 ", "依赖未就绪 ", "启动中 ", "运行 ", "停止 ", "无法启动状态 ", "人为启动状态 ", "人为关闭状态 "};
private volatile Timer timer;
private ChassisStatesOuterClass.ChassisStates chassisStates;
private int mapVersion = -1;//工控机版本
public AutopilotAbility250() {
public AutopilotAbility250(int mapVersion) {
this.mapVersion = mapVersion;
}
@@ -55,8 +57,13 @@ public class AutopilotAbility250 {
String masterVersion = statusInfo.getMasterVersion();
version = AdasManager.getInstance().parseVersion(false, masterVersion);
}
//如果 maser version 大于1还需要判断AutoPilotReady字段是否存在以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
if (version > 1 && statusInfo.hasAutoPilotReady()) {
//SSM 3版本兼容
if (mapVersion >= 30400 && version > 2 && statusInfo.hasAutoPilotReady() && statusInfo.hasAutoPilotUnreadyReason()) {
isAutopilotAbility = statusInfo.getAutoPilotReady();
if (!isAutopilotAbility) {
unableAutopilotReason = statusInfo.getAutoPilotUnreadyReason();
}
} else if (mapVersion >= 21000 && version > 1 && statusInfo.hasAutoPilotReady()) {//如果 maser version 大于1还需要判断AutoPilotReady字段是否存在以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
isAutopilotAbility = statusInfo.getAutoPilotReady();
if (!isAutopilotAbility) {
SystemStatusInfo.NodeFaultList nodeFaultList = statusInfo.getAutoPilotUnreadyList();

View File

@@ -30,7 +30,8 @@ public class AutopilotAbilityManager {
private OnAdasListener listener;
private Handler handler;
private OnAutopilotAbilityListener onAutopilotAbilityListener;
private int dockerVersion = -1;//工控机版本
private int mapVersion = -1;//工控机版本
private boolean isFutianSweeper = false;//是否是福田清扫车
private AutopilotAbility230 autopilotAbility230;
private AutopilotAbility250 autopilotAbility250;
private Timer startTimer;
@@ -77,15 +78,12 @@ public class AutopilotAbilityManager {
}
public void setCarConfig(MessagePad.CarConfigResp carConfig) {
if (dockerVersion == -1) {
String v = carConfig.getDockVersion();
int version = AdasManager.getInstance().parseVersion(v);
if (version != -1) {
stopTimer();
dockerVersion = version;
CupidLogUtils.i(TAG, "工控机版本=" + dockerVersion);
initAutopilotAbility();
}
mapVersion = carConfig.getMapVersion();
isFutianSweeper = carConfig.getIsFutianSweeper();
if (mapVersion != -1) {
stopTimer();
CupidLogUtils.i(TAG, "工控机版本=" + mapVersion);
initAutopilotAbility();
}
}
@@ -138,13 +136,15 @@ public class AutopilotAbilityManager {
}
private void initAutopilotAbility() {
if (dockerVersion >= 20500) {
if (mapVersion >= 20500) {
CupidLogUtils.i(TAG, "是否可以启动自动驾驶能力检测使用250版本");
stop230();
if (autopilotAbility250 == null) {
autopilotAbility250 = new AutopilotAbility250();
autopilotAbility250 = new AutopilotAbility250(mapVersion);
autopilotAbility250.start();
}
} else {
CupidLogUtils.i(TAG, "是否可以启动自动驾驶能力检测使用230版本");
stop250();
if (autopilotAbility230 == null) {
autopilotAbility230 = new AutopilotAbility230();
@@ -185,8 +185,8 @@ public class AutopilotAbilityManager {
startTimer.schedule(new TimerTask() {
@Override
public void run() {
if (dockerVersion == -1 && AdasManager.getInstance().getIpcConnectionStatus() == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
dockerVersion = 20300;
if (mapVersion == -1 && AdasManager.getInstance().getIpcConnectionStatus() == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
mapVersion = 20300;
initAutopilotAbility();
}
}
@@ -200,7 +200,8 @@ public class AutopilotAbilityManager {
stop230();
stop250();
handler = null;
dockerVersion = -1;
mapVersion = -1;
isFutianSweeper = false;
}
}