Merge remote-tracking branch 'origin/dev_robo_240612_6.5.0_tmp' into dev_robo_240612_6.5.0_tmp
This commit is contained in:
Binary file not shown.
@@ -57,6 +57,8 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
ivSummaryClose = findViewById(R.id.ivSummaryClose)
|
||||
ivSummaryClose?.setOnClickListener {
|
||||
//对本次服务记录清零
|
||||
AutopilotSummaryInfo.totalLength = 0
|
||||
AutopilotSummaryInfo.vehicleServiceNum = 0
|
||||
AutopilotSummaryInfo.intersectionServicesNum = 0
|
||||
AutopilotSummaryInfo.lightServicesNum = 0
|
||||
AutopilotSummaryInfo.infoTipNum = 0
|
||||
@@ -66,9 +68,7 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
//关闭弹窗
|
||||
dismiss()
|
||||
}
|
||||
//小智总结
|
||||
tvSummaryZhiContent = findViewById(R.id.tvSummaryZhiContent)
|
||||
//TODO 小智总结文案
|
||||
val random = Random()
|
||||
//全息路口服务次数
|
||||
tvIntersectionServicesNum = findViewById(R.id.tvIntersectionServicesNum)
|
||||
tvIntersectionServicesNum?.text = AutopilotSummaryInfo.intersectionServicesNum.toString()
|
||||
@@ -77,22 +77,34 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
tvLightServicesNum?.text = AutopilotSummaryInfo.lightServicesNum.toString()
|
||||
//道路信息提醒次数
|
||||
tvInfoTipNum = findViewById(R.id.tvInfoTipNum)
|
||||
AutopilotSummaryInfo.infoTipNum += random.nextInt(3)
|
||||
tvInfoTipNum?.text = AutopilotSummaryInfo.infoTipNum.toString()
|
||||
//车辆行为提醒次数
|
||||
tvVehicleTipNum = findViewById(R.id.tvVehicleTipNum)
|
||||
AutopilotSummaryInfo.vehicleTipNum += random.nextInt(3)
|
||||
tvVehicleTipNum?.text = AutopilotSummaryInfo.vehicleTipNum.toString()
|
||||
//弱势参与者提醒次数
|
||||
tvVulnerableTipNum = findViewById(R.id.tvVulnerableTipNum)
|
||||
AutopilotSummaryInfo.vulnerableTipNum += random.nextInt(3)
|
||||
tvVulnerableTipNum?.text = AutopilotSummaryInfo.vulnerableTipNum.toString()
|
||||
//消除安全风险隐患次数
|
||||
tvDangerNum = findViewById(R.id.tvDangerNum)
|
||||
AutopilotSummaryInfo.dangerNum += random.nextInt(3)
|
||||
tvDangerNum?.text = AutopilotSummaryInfo.dangerNum.toString()
|
||||
//通行效率提升:本期为假数据,数据为百分数,值为7-14%之间的随机数,保留小数点后1位
|
||||
tvEfficiencyNum = findViewById(R.id.tvEfficiencyNum)
|
||||
val random = Random()
|
||||
val next: Float= random.nextInt(70).toFloat()/10
|
||||
val num = next + 7
|
||||
tvEfficiencyNum?.text = num.toString()
|
||||
//小智总结
|
||||
tvSummaryZhiContent = findViewById(R.id.tvSummaryZhiContent)
|
||||
AutopilotSummaryInfo.vehicleServiceNum += AutopilotSummaryInfo.intersectionServicesNum+AutopilotSummaryInfo.lightServicesNum
|
||||
+AutopilotSummaryInfo.infoTipNum + AutopilotSummaryInfo.vehicleTipNum + AutopilotSummaryInfo.vulnerableTipNum
|
||||
if(isDriver){
|
||||
tvSummaryZhiContent?.text = "全程 5km,智慧道路护航 3km,全息感知覆盖率 60%,车辆服务次数${AutopilotSummaryInfo.vehicleServiceNum}次"
|
||||
}else{
|
||||
tvSummaryZhiContent?.text = "旅途全长 38 km,全感知覆盖率 90%,车辆服务次数${AutopilotSummaryInfo.vehicleServiceNum}次"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:gravity="center"
|
||||
android:text="全程 5km,智慧道路护航 3km,全息感知覆盖率 60%,车辆服务"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:gravity="center"
|
||||
android:text="“旅途全长 38 km,全感知覆盖率 90%,车辆服务次数 68次”"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,12 +4,18 @@ import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isPassenger
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.map.overlay.core.Level
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import mogo.telematics.pad.MessagePad.*
|
||||
|
||||
object TrackerSourceFilterHelper {
|
||||
|
||||
private const val TAG = "TrackerSourceColor"
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
@@ -92,10 +98,21 @@ object TrackerSourceFilterHelper {
|
||||
|
||||
//僵尸车
|
||||
if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
color = "#7A8499FF"
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
// color = "#7A8499FF"
|
||||
// if (FunctionBuildConfig.skinMode == 1) {
|
||||
// color = "#9BA8BCFF"
|
||||
// }
|
||||
val opt = Point.Options.Builder(TAG,Level.MAP_MARKER)
|
||||
.setId(data.uuid.toString())
|
||||
.latitude(data.latitude)
|
||||
.longitude(data.longitude)
|
||||
.isUseGps(true)
|
||||
.rotate(data.heading.toFloat())
|
||||
.setAnimResource(R.raw.yujingguangquan)
|
||||
.setDisplayAnim(true)
|
||||
.setAnimScale(getAnimScale(data.type))
|
||||
.build()
|
||||
CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(opt)
|
||||
//消息埋点
|
||||
CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent()
|
||||
}
|
||||
@@ -103,6 +120,20 @@ object TrackerSourceFilterHelper {
|
||||
return color
|
||||
}
|
||||
|
||||
private fun getAnimScale(type:Int):Float{
|
||||
return when (type) {
|
||||
TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.type -> {
|
||||
2.6f
|
||||
}
|
||||
TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS.type, TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK.type -> {
|
||||
4.0f
|
||||
}
|
||||
else -> {
|
||||
0f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤所有 工控感知数据 all match
|
||||
*/
|
||||
|
||||
Binary file not shown.
@@ -5,6 +5,13 @@ package com.mogo.eagle.core.data.autopilot
|
||||
*/
|
||||
object AutopilotSummaryInfo {
|
||||
|
||||
/**
|
||||
* 旅途全长
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var totalLength = 0
|
||||
|
||||
/**
|
||||
* 车辆服务次数
|
||||
*/
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -151,6 +151,21 @@ data class Point(val id: String, val owner: String, val level: Level, val option
|
||||
*/
|
||||
val moveToCenter: Boolean = builder.moveToCenter
|
||||
|
||||
/**
|
||||
* 设置动画资源
|
||||
*/
|
||||
val displayAnim:Boolean = builder.displayAnim
|
||||
|
||||
/**
|
||||
* 动画资源
|
||||
*/
|
||||
val animRes:Int = builder.animRes
|
||||
|
||||
/**
|
||||
* 动画缩放
|
||||
*/
|
||||
val animScale:Float = builder.animScale
|
||||
|
||||
/**
|
||||
* marker点击事件处理
|
||||
*/
|
||||
@@ -291,6 +306,33 @@ data class Point(val id: String, val owner: String, val level: Level, val option
|
||||
*/
|
||||
internal var onMarkerClickListener:WeakReference<((id: String) -> Unit)>? = null
|
||||
|
||||
/**
|
||||
* 是否显示动画
|
||||
*/
|
||||
internal var displayAnim:Boolean = false
|
||||
|
||||
/**
|
||||
* 设置动画资源
|
||||
*/
|
||||
internal var animRes:Int = 0
|
||||
|
||||
/**
|
||||
* 动画缩放
|
||||
*/
|
||||
internal var animScale:Float = 0f
|
||||
|
||||
fun setDisplayAnim(displayAnim:Boolean) = apply {
|
||||
this.displayAnim = displayAnim
|
||||
}
|
||||
|
||||
fun setAnimResource(animRes: Int) = apply {
|
||||
this.animRes = animRes
|
||||
}
|
||||
|
||||
fun setAnimScale(animScale: Float) = apply {
|
||||
this.animScale = animScale
|
||||
}
|
||||
|
||||
fun setId(id: String) = apply {
|
||||
this.id = id
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@ public class ObjectUtils {
|
||||
.controlAngle(opt.isControlAngle())
|
||||
.rotateAngle(opt.getRotate())
|
||||
.setFlat(opt.isFlat())
|
||||
// .setAnimResource()
|
||||
// .setDisplayAnimEnable()
|
||||
// .setAnimScale()
|
||||
.visible(opt.isVisible())
|
||||
.infoWindowEnable(opt.isInfoWindowEnable())
|
||||
.scale(opt.getScale())
|
||||
@@ -119,16 +122,13 @@ public class ObjectUtils {
|
||||
markerOptions.setTime(Double.valueOf(trafficData.getSatelliteTime() * 1000).longValue());
|
||||
if(!trafficData.getColor().isEmpty()){
|
||||
if(trafficData.getColor().contains("-drawColor")){
|
||||
// markerOptions.setColorType(3);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
} else if(trafficData.getColor().contains("-resetColor")){
|
||||
// markerOptions.setColorType(4);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
} else{
|
||||
markerOptions.setColor(trafficData.getColor());
|
||||
}
|
||||
}else{
|
||||
// markerOptions.setColorType(0);
|
||||
markerOptions.setColor("#00000000");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user