diff --git a/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGI-1.ttf b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGI-1.ttf new file mode 100644 index 0000000000..09258773c7 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGI-1.ttf differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIB-2.ttf b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIB-2.ttf new file mode 100644 index 0000000000..064ad478a5 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIB-2.ttf differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGII-3.ttf b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGII-3.ttf new file mode 100644 index 0000000000..2aae3d8a58 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGII-3.ttf differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIT-4.ttf b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIT-4.ttf new file mode 100644 index 0000000000..65642f982e Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/assets/DS-DIGIT-4.ttf differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt index e91a850337..11d1277f4c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt @@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.notice.traffic import android.content.Context import android.util.AttributeSet -import android.util.Log import android.view.LayoutInflater import android.view.View import android.widget.TextView @@ -80,8 +79,6 @@ class TrafficLightPromptView @JvmOverloads constructor( */ override fun onShowTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Int) { super.onShowTrafficLightPrompt(currentState, currentDuration) - Log.i("xuxinchao","TrafficLightPromptView onTrafficLightPrompt") - Log.i("xuxinchao","onShowTrafficLightPrompt user="+user) ThreadUtils.runOnUiThread { when(currentState){ TrafficLightEnum.GREEN->{ @@ -90,7 +87,6 @@ class TrafficLightPromptView @JvmOverloads constructor( tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green)) tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green)) }else{ - Log.i("xuxinchao","user="+user) tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p)) tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p)) } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt index 58c69affd5..35f66a7159 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt @@ -4,8 +4,11 @@ import android.app.Dialog import android.content.Context import android.os.Bundle import android.widget.ImageView +import android.widget.TextView +import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo import com.mogo.eagle.core.function.hmi.R import me.jessyan.autosize.utils.AutoSizeUtils +import java.util.Random /** * 行程总结View @@ -17,7 +20,15 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) : private val mContext: Context private val isDriver: Boolean - private var ivSummaryClose: ImageView ?= null + private var ivSummaryClose: ImageView ?= null //关闭弹窗按钮 + private var tvSummaryZhiContent: TextView ?= null //小智总结 + private var tvIntersectionServicesNum: TextView ?= null //全息路口服务次数 + private var tvLightServicesNum: TextView ?= null //路口灯态服务次数 + private var tvInfoTipNum: TextView ?= null //道路信息提醒次数 + private var tvVehicleTipNum: TextView ?= null //车辆行为提醒次数 + private var tvVulnerableTipNum: TextView ?= null //弱势参与者提醒次数 + private var tvDangerNum: TextView ?= null //消除安全风险隐患次数 + private var tvEfficiencyNum: TextView ?= null //通行效率提升 init { this.mContext = context @@ -47,8 +58,33 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) : ivSummaryClose?.setOnClickListener { dismiss() } - - + //小智总结 + tvSummaryZhiContent = findViewById(R.id.tvSummaryZhiContent) + //TODO 小智总结文案 + //全息路口服务次数 + tvIntersectionServicesNum = findViewById(R.id.tvIntersectionServicesNum) + tvIntersectionServicesNum?.text = AutopilotSummaryInfo.intersectionServicesNum.toString() + //路口灯态服务次数 + tvLightServicesNum = findViewById(R.id.tvLightServicesNum) + tvLightServicesNum?.text = AutopilotSummaryInfo.lightServicesNum.toString() + //道路信息提醒次数 + tvInfoTipNum = findViewById(R.id.tvInfoTipNum) + tvInfoTipNum?.text = AutopilotSummaryInfo.infoTipNum.toString() + //车辆行为提醒次数 + tvVehicleTipNum = findViewById(R.id.tvVehicleTipNum) + tvVehicleTipNum?.text = AutopilotSummaryInfo.vehicleTipNum.toString() + //弱势参与者提醒次数 + tvVulnerableTipNum = findViewById(R.id.tvVulnerableTipNum) + tvVulnerableTipNum?.text = AutopilotSummaryInfo.vulnerableTipNum.toString() + //消除安全风险隐患次数 + tvDangerNum = findViewById(R.id.tvDangerNum) + 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() } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TypefaceTextView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TypefaceTextView.kt index 3076462b6f..b3c876c227 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TypefaceTextView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TypefaceTextView.kt @@ -4,6 +4,7 @@ import android.content.Context import android.graphics.Typeface import android.util.AttributeSet import androidx.appcompat.widget.AppCompatTextView +import com.mogo.eagle.core.function.hmi.R /** * 融合红绿灯倒计时特定字体TextView @@ -19,8 +20,20 @@ class TypefaceTextView constructor( } private fun initTypefaceTextView(context: Context, attrs: AttributeSet) { - val typeface = Typeface.createFromAsset(context.assets, "digital-7.ttf") - setTypeface(typeface) + val typedArray = context.obtainStyledAttributes(attrs, R.styleable.TypefaceTextView) + val type = typedArray.getInt(R.styleable.TypefaceTextView_textType, 0) + if (type == 0) { + return + } + var typeface: Typeface? = null + when (type) { + 1 -> typeface = Typeface.createFromAsset(context.assets, "DS-DIGI-1.ttf") + 2 -> typeface = Typeface.createFromAsset(context.assets, "DS-DIGIB-2.ttf") + 3 -> typeface = Typeface.createFromAsset(context.assets, "DS-DIGII-3.ttf") + 4 -> typeface = Typeface.createFromAsset(context.assets, "DS-DIGIT-4.ttf") + } + typeface?.let { setTypeface(it) } + typedArray.recycle() } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/bg_fusion_traffic_light.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/bg_fusion_traffic_light.png index 5df329c378..361c0b5947 100644 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/bg_fusion_traffic_light.png and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/bg_fusion_traffic_light.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml index df23d3d702..e460f7e862 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml @@ -30,6 +30,7 @@ /> @@ -338,7 +332,6 @@ app:layout_constraintHorizontal_chainStyle="packed" android:textColor="@color/summary_danger_num" android:textSize="@dimen/sp_150" - android:text="13" android:layout_marginTop="@dimen/dp_80" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml index e56ca2fdf1..41e74f3228 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml @@ -30,6 +30,7 @@ /> @@ -338,7 +332,6 @@ app:layout_constraintHorizontal_chainStyle="packed" android:textColor="@color/summary_danger_num_p" android:textSize="@dimen/sp_195" - android:text="13" android:layout_marginTop="@dimen/dp_120" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_fusion_traffic_light.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_fusion_traffic_light.xml index 24d1acaa1c..170c3e95e1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_fusion_traffic_light.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_fusion_traffic_light.xml @@ -53,7 +53,7 @@ app:layout_constraintRight_toRightOf="parent" android:textColor="@color/black" android:textSize="@dimen/sp_55" - android:textStyle="bold" + app:textType="DS_DIGIB_2" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_prompt_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_prompt_p.xml index 27cf95e6a8..87dfef8b33 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_prompt_p.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_prompt_p.xml @@ -15,6 +15,7 @@ android:textColor="@color/light_prompt_content" android:layout_marginTop="@dimen/dp_50" android:layout_marginStart="@dimen/dp_50" + android:text="即将红灯,请减速慢行" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml index bcd32f1f27..32f3b7de6e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml @@ -143,4 +143,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt new file mode 100644 index 0000000000..693723af34 --- /dev/null +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt @@ -0,0 +1,50 @@ +package com.mogo.eagle.core.data.autopilot + +/** + * 行程总结报告数据 + */ +object AutopilotSummaryInfo { + + /** + * 全息路口服务次数 + */ + @JvmField + @Volatile + var intersectionServicesNum = 0 + + /** + * 路口灯态服务次数 + */ + @JvmField + @Volatile + var lightServicesNum = 0 + + /** + * 道路信息提醒次数 + */ + @JvmField + @Volatile + var infoTipNum = 0 + + /** + * 车辆行为提醒次数 + */ + @JvmField + @Volatile + var vehicleTipNum = 0 + + /** + * 弱势参与者提醒次数 + */ + @JvmField + @Volatile + var vulnerableTipNum = 0 + + /** + * 消除安全风险隐患次数 + */ + @JvmField + @Volatile + var dangerNum = 0 + +} \ No newline at end of file diff --git a/core/mogo-core-res/src/main/res/values/dimens.xml b/core/mogo-core-res/src/main/res/values/dimens.xml index 273a1d3513..2bfd230ee7 100644 --- a/core/mogo-core-res/src/main/res/values/dimens.xml +++ b/core/mogo-core-res/src/main/res/values/dimens.xml @@ -1081,6 +1081,7 @@ 55dp 72dp 76dp + 90dp 94dp 120dp 150dp