[2.13.2][feat]新增全览V2X事件的日志

This commit is contained in:
chenfufeng
2023-01-11 14:05:07 +08:00
parent 3e3b64f1c8
commit 0455079b91
10 changed files with 39 additions and 10 deletions

View File

@@ -66,6 +66,7 @@ import java.util.TimerTask;
import chassis.VehicleStateOuterClass;
import mogo.telematics.pad.MessagePad;
import mogo.v2x.ObuWarningEvent;
import mogo_msg.MogoReportMsg;
import perception.TrafficLightOuterClass;
import prediction.Prediction;

View File

@@ -17,7 +17,6 @@ import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.module.MogoModule;
import com.mogo.commons.module.MogoModulePaths;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.data.constants.MogoServicePaths;

View File

@@ -38,8 +38,8 @@ data class V2XEvent(
@SerializedName("radius")
var radius: Double,
@SerializedName("type")
var type: Int
@SerializedName("poiType")
var poiType: String?
)
@Keep

View File

@@ -271,7 +271,7 @@ public class AMapCustomView
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
markerOption.position(latLng);
markerOption.anchor(0.13f, 1f);
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap()));
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap(event.getPoiType())));
markerOptionsList.add(markerOption);
}
}
@@ -284,8 +284,8 @@ public class AMapCustomView
currMarkerList = mAMap.addMarkers(markerOptionsList, false);
}
private Bitmap getV2XBitmap() {
V2XMarkerView marker = new V2XMarkerView(getContext());
private Bitmap getV2XBitmap(String poiType) {
V2XMarkerView marker = new V2XMarkerView(getContext(), null, 0, poiType);
marker.measure(View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 229), View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 96), View.MeasureSpec.EXACTLY));
marker.layout(0, 0, marker.getMeasuredWidth(), marker.getMeasuredHeight());

View File

@@ -3,14 +3,16 @@ package com.mogo.eagle.core.function.smp
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.ImageView
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.map.R
import kotlinx.android.synthetic.main.view_maker_with_count.view.*
class V2XMarkerView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
defStyleAttr: Int = 0,
private val poiType: String? = ""
) : ConstraintLayout (
context,
attrs,
@@ -19,5 +21,33 @@ class V2XMarkerView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.layout_v2x_maker, this, true)
initView()
}
private fun initView() {
val iconView = findViewById<ImageView>(R.id.ivIcon)
val contentView = findViewById<TextView>(R.id.tvContent)
when (poiType) {
"10006" -> {
iconView.setBackgroundResource(R.drawable.icon_small_v2x_road_construction)
contentView.text = "道路施工"
}
"10007" -> {
iconView.setBackgroundResource(R.drawable.icon_v2x_road_congestion)
contentView.text = "道路拥堵"
}
"10032" -> {
iconView.setBackgroundResource(R.drawable.icon_v2x_road_accidents)
contentView.text = "道路事故"
}
"10025" -> {
iconView.setBackgroundResource(R.drawable.icon_v2x_obstacle)
contentView.text = "障碍车辆"
}
// "10031" -> {
// iconView.setBackgroundResource(R.drawable.icon_small_v2x_road_construction)
// contentView.text = "弱势预警"
// }
}
}
}

View File

@@ -19,7 +19,7 @@
/>
<TextView
android:id="@+id/tv"
android:id="@+id/tvContent"
android:layout_width="119dp"
android:layout_height="35dp"
android:text="道路施工"

View File

@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.msgbox
import android.content.Context
import android.os.Looper
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB