[6.6.2]行程总结报告优化-更改总结报告数据计算方法
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.datacenter.v2x
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||
import com.zhidaoauto.map.data.road.RoadCross
|
||||
|
||||
@@ -40,7 +41,7 @@ class RoadLineEventManager : IMoGoMapRoadListener, IMoGoAutopilotStatusListener
|
||||
return
|
||||
}
|
||||
if(cross){
|
||||
CallerAutoPilotStatusListenerManager.updateRoadCount()
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.ROAD)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,15 +186,6 @@ open class AutomaticExplorationView @JvmOverloads constructor(
|
||||
|
||||
})
|
||||
automaticExplorationAdapter?.setData(dataList)
|
||||
//每出现一次自动探查,增加相应的服务次数
|
||||
//道路信息提醒次数
|
||||
AutopilotSummaryInfo.infoTipNum += 9
|
||||
//车辆行为提醒次数
|
||||
AutopilotSummaryInfo.vehicleTipNum += 13
|
||||
//弱势参与者提醒次数
|
||||
AutopilotSummaryInfo.vulnerableTipNum += 4
|
||||
//消除安全风险隐患次数
|
||||
AutopilotSummaryInfo.dangerNum += 24
|
||||
//启动扫描
|
||||
ivScan?.let {
|
||||
rotationAnim = ObjectAnimator.ofFloat(it, "rotation", 0f, 360f)
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -205,7 +206,7 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
if(this@FusionTrafficLightView.visibility == View.GONE){
|
||||
this@FusionTrafficLightView.visibility = View.VISIBLE
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
|
||||
AutopilotSummaryInfo.lightServicesNum++
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.LIGHT)
|
||||
}
|
||||
|
||||
val colorList = ArrayList<TrafficLightEnum>()
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.view.TravelRealityView
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -70,26 +71,23 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
}
|
||||
//全息路口服务次数
|
||||
tvIntersectionServicesNum = findViewById(R.id.tvIntersectionServicesNum)
|
||||
tvIntersectionServicesNum?.text = CallerAutoPilotStatusListenerManager.getRoadCount().toString()
|
||||
tvIntersectionServicesNum?.text = CallerServicesEventManager.getRoadNum().toString()
|
||||
//路口灯态服务次数
|
||||
tvLightServicesNum = findViewById(R.id.tvLightServicesNum)
|
||||
tvLightServicesNum?.text = AutopilotSummaryInfo.lightServicesNum.toString()
|
||||
tvLightServicesNum?.text = CallerServicesEventManager.getLightServicesNum().toString()
|
||||
//道路信息提醒次数
|
||||
tvInfoTipNum = findViewById(R.id.tvInfoTipNum)
|
||||
AutopilotSummaryInfo.infoTipNum += random.nextInt(7) +2
|
||||
tvInfoTipNum?.text = AutopilotSummaryInfo.infoTipNum.toString()
|
||||
tvInfoTipNum?.text = CallerServicesEventManager.getInfoTipNum().toString()
|
||||
//车辆行为提醒次数
|
||||
tvVehicleTipNum = findViewById(R.id.tvVehicleTipNum)
|
||||
AutopilotSummaryInfo.vehicleTipNum += random.nextInt(7) +2
|
||||
tvVehicleTipNum?.text = AutopilotSummaryInfo.vehicleTipNum.toString()
|
||||
tvVehicleTipNum?.text = CallerServicesEventManager.getVehicleTipNum().toString()
|
||||
//弱势参与者提醒次数
|
||||
tvVulnerableTipNum = findViewById(R.id.tvVulnerableTipNum)
|
||||
AutopilotSummaryInfo.vulnerableTipNum += random.nextInt(7)+2
|
||||
tvVulnerableTipNum?.text = AutopilotSummaryInfo.vulnerableTipNum.toString()
|
||||
tvVulnerableTipNum?.text = CallerServicesEventManager.getVulnerableTipNum().toString()
|
||||
//消除安全风险隐患次数
|
||||
tvDangerNum = findViewById(R.id.tvDangerNum)
|
||||
AutopilotSummaryInfo.dangerNum += random.nextInt(7)+2
|
||||
tvDangerNum?.text = AutopilotSummaryInfo.dangerNum.toString()
|
||||
val dangerNum = CallerServicesEventManager.getInfoTipNum()+ CallerServicesEventManager.getVehicleTipNum() + CallerServicesEventManager.getVulnerableTipNum()
|
||||
tvDangerNum?.text = dangerNum.toString()
|
||||
//通行效率提升:本期为假数据,数据为百分数,值为7-14%之间的随机数,保留小数点后1位
|
||||
tvEfficiencyNum = findViewById(R.id.tvEfficiencyNum)
|
||||
val next: Float= random.nextInt(70).toFloat()/10
|
||||
@@ -113,7 +111,12 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
|
||||
private fun showSummaryTipContent(){
|
||||
ThreadUtils.runOnUiThread {
|
||||
val vehicleServiceNum = AutopilotSummaryInfo.infoTipNum+ AutopilotSummaryInfo.vehicleTipNum + AutopilotSummaryInfo.vulnerableTipNum + AutopilotSummaryInfo.lightServicesNum + CallerAutoPilotStatusListenerManager.getRoadCount()
|
||||
val vehicleServiceNum =
|
||||
CallerServicesEventManager.getInfoTipNum()+
|
||||
CallerServicesEventManager.getVehicleTipNum() +
|
||||
CallerServicesEventManager.getVulnerableTipNum() +
|
||||
CallerServicesEventManager.getLightServicesNum() +
|
||||
CallerServicesEventManager.getRoadNum()
|
||||
var smartRoadLen = 1000f
|
||||
try {
|
||||
smartRoadLen =random.nextFloat()*mileage
|
||||
@@ -138,12 +141,7 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
travelRealityView?.onPause()
|
||||
travelRealityView?.onDestroy()
|
||||
//对本次服务记录清零
|
||||
AutopilotSummaryInfo.lightServicesNum = 0
|
||||
AutopilotSummaryInfo.infoTipNum = 0
|
||||
AutopilotSummaryInfo.vehicleTipNum = 0
|
||||
AutopilotSummaryInfo.vulnerableTipNum = 0
|
||||
AutopilotSummaryInfo.dangerNum = 0
|
||||
CallerAutoPilotStatusListenerManager.resetRoadCount()
|
||||
CallerServicesEventManager.resetServicesNum()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListen
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
@@ -132,6 +133,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
mCurrentLightId = TrafficLightEnum.BLACK
|
||||
this@SingleTrafficLightView.visibility = GONE
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.LIGHT)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user