[6.5.0]行程总结
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
|
||||
|
||||
@@ -5,6 +5,13 @@ package com.mogo.eagle.core.data.autopilot
|
||||
*/
|
||||
object AutopilotSummaryInfo {
|
||||
|
||||
/**
|
||||
* 旅途全长
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var totalLength = 0
|
||||
|
||||
/**
|
||||
* 车辆服务次数
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user