Merge branch 'dev_robo_240612_6.5.0_tmp' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robo_240612_6.5.0_tmp
# Conflicts: # core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt
@@ -221,6 +221,15 @@
|
||||
android:layout_marginTop="-24dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/module_mogo_och_autopilot_status" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
|
||||
app:layout_constraintStart_toEndOf="@+id/module_mogo_och_station_panel_container"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_marginBottom="@dimen/dp_28"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<!--订单调试页面-->
|
||||
<include
|
||||
android:id="@+id/module_mogo_och_bus_test_bar"
|
||||
@@ -256,16 +265,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_arrived_tv" />
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualView
|
||||
android:id="@+id/switch_visual_view"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView" />
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.reportworkorder.ReportWorkOrderView
|
||||
android:id="@+id/reportworkorderview"
|
||||
@@ -274,7 +273,7 @@
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/switch_visual_view" />
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaTaxiView
|
||||
android:layout_width="@dimen/dp_142"
|
||||
|
||||
@@ -187,6 +187,13 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/autopilot_status"
|
||||
app:layout_goneMarginTop="@dimen/dp_530" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
|
||||
app:layout_constraintStart_toEndOf="@+id/module_mogo_och_station_panel_container"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<!--订单信息-->
|
||||
<include
|
||||
android:id="@+id/module_mogo_och_bus_test_bar"
|
||||
@@ -223,23 +230,13 @@
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualView
|
||||
android:id="@+id/switch_visual_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.reportworkorder.ReportWorkOrderView
|
||||
android:id="@+id/reportworkorderview"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/switch_visual_view"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ import com.google.gson.reflect.TypeToken
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.angle.scenes.CrossRoad
|
||||
import com.mogo.eagle.core.function.angle.scenes.Default
|
||||
import com.mogo.eagle.core.function.angle.scenes.LongSight
|
||||
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N
|
||||
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
@@ -23,6 +26,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
@@ -57,6 +61,7 @@ object DebugDataDispatch {
|
||||
const val stopSite = "stopSite"
|
||||
const val v2N = "xiaozhiV2N"
|
||||
const val romal = "romal"
|
||||
const val visualView = "visual"
|
||||
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "location" --es path "1111/11111"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "globalPath" --es path "sy73.json"
|
||||
@@ -69,6 +74,7 @@ object DebugDataDispatch {
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "stopSite" --ei state 6 --ei action 1
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "xiaozhiV2N" --es poiType "10002" --ei state 0
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "romal" --ei show 0
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "visual" --ei show 0
|
||||
|
||||
|
||||
val ROOT_PATH =
|
||||
@@ -170,6 +176,22 @@ object DebugDataDispatch {
|
||||
pncAction.parkScenarioAction = planningaction.build()
|
||||
CallerPlanningActionsListenerManager.invokePNCActions(pncAction.build())
|
||||
}
|
||||
visualView ->{
|
||||
val state = intent.getIntExtra("show", 0)
|
||||
when (state) {
|
||||
0 -> {
|
||||
CallerVisualAngleManager.changeScene(LongSight(0))
|
||||
}
|
||||
1 -> {
|
||||
CallerVisualAngleManager.changeScene(Default(0))
|
||||
}
|
||||
2 -> {
|
||||
CallerVisualAngleManager.changeScene(CrossRoad(0))
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
||||
}
|
||||
romal ->{
|
||||
val state = intent.getIntExtra("show", 0)
|
||||
CallerMapRomaListener.invokeMapRomaRange(state==0)
|
||||
|
||||
@@ -11,12 +11,19 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.widget.ImageView
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintSet
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.taxi_p_seekbar_visualangle.view.iv_visualangle_bg
|
||||
import kotlinx.android.synthetic.main.taxi_p_seekbar_visualangle.view.iv_visualangle_value
|
||||
import kotlinx.android.synthetic.main.taxi_seekbar_visualangle.view.iv_visualangle_bg_dark
|
||||
import kotlinx.android.synthetic.main.taxi_seekbar_visualangle.view.iv_visualangle_value_dark
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
|
||||
@@ -53,13 +60,6 @@ class SeekBarView : ConstraintLayout, VisualViewModel.IVisualCallback {
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
val split = (height - draggableButton.height) / 3f
|
||||
canvas.drawLine(0f,split,width.toFloat(),split,p)
|
||||
canvas.drawLine(0f,split*2,width.toFloat(),split*2,p)
|
||||
canvas.drawLine(0f,(height - draggableButton.height).toFloat(),width.toFloat(),split*3,p)
|
||||
val translationY = draggableButton.translationY
|
||||
canvas.drawLine(0f,translationY,width.toFloat(),translationY,p)
|
||||
}
|
||||
|
||||
private var initialX = 0f
|
||||
@@ -82,12 +82,12 @@ class SeekBarView : ConstraintLayout, VisualViewModel.IVisualCallback {
|
||||
|
||||
if(draggableButton.translationY<-draggableButton.height){
|
||||
tempSet.clone(this)
|
||||
tempSet.setTranslationY(R.id.iv_setting_only_value,-draggableButton.height.toFloat())
|
||||
tempSet.setTranslationY(draggableButton.id,-draggableButton.height.toFloat())
|
||||
tempSet.applyTo(this)
|
||||
return true
|
||||
}else if (draggableButton.translationY>(height)){
|
||||
tempSet.clone(this)
|
||||
tempSet.setTranslationY(R.id.iv_setting_only_value,(height).toFloat())
|
||||
tempSet.setTranslationY(draggableButton.id,(height).toFloat())
|
||||
tempSet.applyTo(this)
|
||||
return true
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class SeekBarView : ConstraintLayout, VisualViewModel.IVisualCallback {
|
||||
initialY = event.rawY;
|
||||
|
||||
tempSet.clone(this)
|
||||
tempSet.setTranslationY(R.id.iv_setting_only_value,draggableButton.translationY+dy)
|
||||
tempSet.setTranslationY(draggableButton.id,draggableButton.translationY+dy)
|
||||
tempSet.applyTo(this)
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
@@ -178,10 +178,31 @@ class SeekBarView : ConstraintLayout, VisualViewModel.IVisualCallback {
|
||||
private lateinit var draggableButton:ImageView
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_seekbar_visualangle, this, true)
|
||||
draggableButton = findViewById(R.id.iv_setting_only_value)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_seekbar_visualangle, this, true)
|
||||
draggableButton = findViewById(R.id.iv_visualangle_value_dark)
|
||||
}else{
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_seekbar_visualangle, this, true)
|
||||
draggableButton = findViewById(R.id.iv_visualangle_value)
|
||||
}
|
||||
}
|
||||
|
||||
fun setBgResource(@DrawableRes resource:Int){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
iv_visualangle_bg_dark.setImageResource(resource)
|
||||
}else{
|
||||
iv_visualangle_bg.setImageResource(resource)
|
||||
}
|
||||
}
|
||||
fun setHumbResource(@DrawableRes resource:Int){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
iv_visualangle_value_dark.setImageResource(resource)
|
||||
}else{
|
||||
iv_visualangle_value.setImageResource(resource)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.mogo.och.common.module.wigets.map.switchvisual
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_visualangle_black.view.iv_center_location_bg
|
||||
import kotlinx.android.synthetic.main.common_visualangle_black.view.iv_visual_angle_title_bottom
|
||||
import kotlinx.android.synthetic.main.common_visualangle_black.view.iv_visual_angle_title_head
|
||||
import kotlinx.android.synthetic.main.common_visualangle_black.view.iv_visual_angle_title_value_bg
|
||||
|
||||
|
||||
class VisualViewDirver : ConstraintLayout {
|
||||
|
||||
private val TAG = "LeftBarView"
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
init {
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_visualangle_black, this, true)
|
||||
|
||||
iv_visual_angle_title_value_bg.enableCallback = object :SeekBarView.EnableCallback{
|
||||
override fun enableChangeListener(enable: Boolean) {
|
||||
if(enable){
|
||||
iv_visual_angle_title_head.setImageResource(R.drawable.commont_visual_head)
|
||||
iv_visual_angle_title_bottom.setImageResource(R.drawable.common_visual_bottom)
|
||||
iv_visual_angle_title_value_bg.setBgResource(R.drawable.common_visual_angle_bg)
|
||||
iv_visual_angle_title_value_bg.setHumbResource(R.drawable.common_visual_angle)
|
||||
iv_center_location_bg.setImageResource(R.drawable.common_visualangle_bg)
|
||||
}else{
|
||||
iv_visual_angle_title_head.setImageResource(R.drawable.commont_visual_head_unable)
|
||||
iv_visual_angle_title_bottom.setImageResource(R.drawable.common_visual_bottom_unenable)
|
||||
iv_visual_angle_title_value_bg.setBgResource(R.drawable.common_visual_angle_bg_unenable)
|
||||
iv_visual_angle_title_value_bg.setHumbResource(R.drawable.common_visual_angle_unenable)
|
||||
iv_center_location_bg.setImageResource(R.drawable.common_visualangle_bg_unenable)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_visual_angle.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_visual_angle_bg.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_visual_bottom.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 800 B |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
OCH/common/common/src/main/res/drawable-nodpi/commont_visual_head.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_308"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_center_location_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/common_visualangle_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.SeekBarView
|
||||
android:id="@+id/iv_visual_angle_title_value_bg"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_169"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_visual_angle_title_head"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:src="@drawable/commont_visual_head"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_visual_angle_title_bottom"
|
||||
android:layout_width="@dimen/dp_31"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_22"
|
||||
android:src="@drawable/common_visual_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</merge>
|
||||
@@ -7,7 +7,7 @@
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_bg"
|
||||
android:id="@+id/iv_visualangle_bg"
|
||||
android:layout_width="39dp"
|
||||
android:layout_height="141dp"
|
||||
android:src="@drawable/taxi_p_visual_angle_bg"
|
||||
@@ -17,7 +17,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_value"
|
||||
android:id="@+id/iv_visualangle_value"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/taxi_p_visual_angle"
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="208dp"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_169"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_bg"
|
||||
android:layout_width="39dp"
|
||||
android:layout_height="141dp"
|
||||
android:src="@drawable/taxi_p_visual_angle_bg"
|
||||
android:id="@+id/iv_visualangle_bg_dark"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_169"
|
||||
android:src="@drawable/common_visual_angle_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_value"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/taxi_p_visual_angle"
|
||||
android:id="@+id/iv_visualangle_value_dark"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_33"
|
||||
android:src="@drawable/common_visual_angle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -198,6 +198,14 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/module_mogo_och_autopilot_status"
|
||||
app:layout_goneMarginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
|
||||
app:layout_constraintStart_toEndOf="@+id/module_mogo_och_station_panel_container"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_marginBottom="@dimen/dp_28"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/module_mogo_och_bus_test_bar"
|
||||
layout="@layout/shuttle_test_bar_view"
|
||||
@@ -241,23 +249,12 @@
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualView
|
||||
android:id="@+id/switch_visual_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.reportworkorder.ReportWorkOrderView
|
||||
android:id="@+id/reportworkorderview"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/switch_visual_view"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
|
||||
@@ -792,4 +792,9 @@ public class SweeperCloudTaskModel implements IMoGoSweeperFutianCloudTaskListene
|
||||
public void onAutopilotTrajectoryDownloadReq(@NonNull AutopilotControlParameters.AutoPilotLine autoPilotLine, int downloadType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFsmReceiveTimeout(boolean isTimeout) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,4 +469,9 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
|
||||
@Override
|
||||
public void onAutopilotTrajectoryDownloadReq(@NonNull AutopilotControlParameters.AutoPilotLine autoPilotLine, int downloadType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFsmReceiveTimeout(boolean isTimeout) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mapBizView.onResume();
|
||||
mapRoamView.onResume();
|
||||
smallMapView.onResume();
|
||||
}
|
||||
|
||||
@@ -203,7 +202,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mapBizView.onPause();
|
||||
mapRoamView.onPause();
|
||||
smallMapView.onPause();
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,14 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_mogo_och_autopilot_status"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
|
||||
app:layout_constraintStart_toEndOf="@+id/module_mogo_och_station_panel_container"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView
|
||||
android:id="@+id/module_mogo_och_operation_status"
|
||||
android:layout_width="@dimen/dp_316"
|
||||
@@ -250,16 +258,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_operation_status" />
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualView
|
||||
android:id="@+id/switch_visual_view"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.reportworkorder.ReportWorkOrderView
|
||||
android:id="@+id/reportworkorderview"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
@@ -267,7 +265,7 @@
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/switch_visual_view" />
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaTaxiView
|
||||
android:layout_width="@dimen/dp_142"
|
||||
|
||||
@@ -86,7 +86,7 @@ class TaxiPassengerBaseFragment() :
|
||||
}
|
||||
|
||||
})
|
||||
lbv_go2_center.setOrderIdCallback(object :LeftBarView.LeftBarCallback{
|
||||
lbv_go2_center.setOrderIdCallback(object : LeftBarView.LeftBarCallback{
|
||||
override fun setGo2CenterClick() {
|
||||
when (bottom.getCurrentPage()) {
|
||||
BottomBar.SelectView.PRECISIONMAP -> {
|
||||
|
||||
@@ -8,7 +8,6 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.och.common.module.wigets.map.switchvisual.SeekBarView
|
||||
import com.mogo.och.taxi.passenger.common.R
|
||||
import kotlinx.android.synthetic.main.taxi_p_leftbar.view.iv_center_location
|
||||
import kotlinx.android.synthetic.main.taxi_p_leftbar.view.iv_center_location_bg
|
||||
import kotlinx.android.synthetic.main.taxi_p_leftbar.view.iv_visual_angle_title_bottom
|
||||
import kotlinx.android.synthetic.main.taxi_p_leftbar.view.iv_visual_angle_title_head
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/con_only_one_group"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="iv_setting_only_bg,ck_setting_only"
|
||||
app:constraint_referenced_ids="iv_visualangle_bg,ck_setting_only"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_bg"
|
||||
android:id="@+id/iv_visualangle_bg"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:src="@drawable/taxi_p_reset_location_bg"
|
||||
@@ -78,9 +78,9 @@
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:background="@drawable/taxi_p_setting_selector"
|
||||
android:button="@null"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_setting_only_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_setting_only_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_setting_only_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_setting_only_bg" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_visualangle_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_visualangle_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_visualangle_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_visualangle_bg" />
|
||||
|
||||
</merge>
|
||||
@@ -7,7 +7,7 @@
|
||||
tools:parentTag="androidx.constraintlayout.motion.widget.MotionLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_setting_only_bg"
|
||||
android:id="@+id/iv_visualangle_bg"
|
||||
android:layout_width="39px"
|
||||
android:layout_height="141px"
|
||||
android:src="@drawable/taxi_p_visual_angle_bg"
|
||||
|
||||
@@ -208,6 +208,13 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_mogo_och_autopilot_status"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
|
||||
app:layout_constraintStart_toEndOf="@+id/module_mogo_och_station_panel_container"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView
|
||||
android:id="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -237,21 +244,12 @@
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.switchvisual.VisualView
|
||||
android:id="@+id/switch_visual_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_marginStart="-11dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.reportworkorder.ReportWorkOrderView
|
||||
android:id="@+id/reportworkorderview"
|
||||
android:layout_marginStart="-11dp"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/switch_visual_view"
|
||||
app:layout_constraintLeft_toRightOf="@id/toolsView"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_142"/>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.os.Message
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import androidx.core.util.Pair
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.CommunicationType
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
@@ -33,7 +34,9 @@ import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerMan
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
@@ -46,14 +49,17 @@ import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissManager
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.utils.IEventDismissListener
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2NUtils
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager
|
||||
import com.mogo.map.MapDataWrapper
|
||||
import com.mogo.map.entities.Lane
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.Header
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.telematics.pad.MessagePad.V2nCrossSpeed
|
||||
import mogo.v2x.MogoV2X
|
||||
import mogo.v2x.MogoV2X.RSI_PB
|
||||
import mogo.v2x.MogoV2X.RTEData_PB
|
||||
import java.util.concurrent.TimeUnit.SECONDS
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* V2N上车相关事件绘制
|
||||
@@ -66,6 +72,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
private const val MSG_WHAT_DRAW_SHIGU = 0x1011 // 交通事故
|
||||
private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵
|
||||
private const val MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE = 0x1013 // 他车倒车/逆行
|
||||
private const val MSG_WHAT_DRAW_GREEN_WAVE = 0x1014 // 绿波通行
|
||||
|
||||
private val callback = Handler.Callback { msg ->
|
||||
if (msg.what == MSG_WHAT_DRAW_SHIGONE || msg.what == MSG_WHAT_DRAW_SHIGU) {
|
||||
@@ -156,33 +163,6 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
)
|
||||
)
|
||||
)
|
||||
// CallerHmiManager.warningV2X(
|
||||
// poiType,
|
||||
// alertContent,
|
||||
// ttsContent,
|
||||
// object : IMoGoWarningStatusListener {
|
||||
// override fun onShow() {
|
||||
// super.onShow()
|
||||
// runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.START) }
|
||||
// CallerVisualAngleManager.changeAngle(
|
||||
// RoadEvent(
|
||||
// itx.longitude,
|
||||
// itx.latitude,
|
||||
// itx.angle
|
||||
// )
|
||||
// )
|
||||
// }
|
||||
//
|
||||
// override fun onDismiss() {
|
||||
// super.onDismiss()
|
||||
// runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.STOP) }
|
||||
// CallerVisualAngleManager.changeAngle(Default())
|
||||
// }
|
||||
// },
|
||||
// ALERT_WARNING_TOP,
|
||||
// 10000,
|
||||
// false
|
||||
// )
|
||||
if (polygon.isNotEmpty()) {
|
||||
val decision = V2NUtils.computeOccupyLanesInfo(Triple(car.longitude, car.latitude, car.heading.toFloat()), Triple(itx.longitude, itx.latitude, itx.heading.toFloat()), polygon.map { kotlin.Pair(it.first, it.second) })
|
||||
if (decision != null) {
|
||||
@@ -377,6 +357,41 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
if (msg.what == MSG_WHAT_DRAW_GREEN_WAVE) {
|
||||
val data = msg.obj as? V2nCrossSpeed ?: return@Callback true
|
||||
val destX = data.lng
|
||||
val destY = data.lat
|
||||
val id = "${destX}_${destY}"
|
||||
AiRoadMarker.aiMakers.getOrPut(id) {
|
||||
AiRoadMarker().apply {
|
||||
try {
|
||||
val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val current = abs(location.gnssSpeed) * 3.6f.toInt()
|
||||
val min = abs(data.speedStraightMin * 3.6f).toInt()
|
||||
val max = abs(data.speedStraightMax * 3.6f).toInt()
|
||||
marker(Marker(id, EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, destX, destY, 0.0, null, null, null), drawMarker = false, false)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
AppStateManager.currentActivity()?.let {
|
||||
val speakText = StringBuilder("保持当前车速即可通过路口,好丝滑!")
|
||||
if (current < min) {
|
||||
speakText.setLength(0)
|
||||
speakText.append("蘑菇推荐您提升车速至${min}千米每小小, 当前车速${current}千米每小时")
|
||||
}
|
||||
if (current > max) {
|
||||
speakText.setLength(0)
|
||||
speakText.append("蘑菇推荐您降低车速至${max}千米每小时, 当前车速${current}千米每小时")
|
||||
}
|
||||
AIAssist.getInstance(it).speakTTSVoice(speakText.toString())
|
||||
}
|
||||
}
|
||||
CallerHmiManager.showGreenWave(min, max, computeCrossCountBetween(Triple(location.longitude, location.latitude, location.heading), kotlin.Pair(destX, destY)))
|
||||
} finally {
|
||||
receive()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
@@ -446,6 +461,21 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun computeCrossCountBetween(start: kotlin.Triple<Double, Double, Double>, end: kotlin.Pair<Double, Double>): Int {
|
||||
val points = V2NUtils.generateIntermediatePoints(kotlin.Pair(start.first, start.second), end, 10.0 * 1e-7)
|
||||
var crossId = MapDataWrapper.getCrossRoad(start.first, start.second, start.third)?.cross_id_end
|
||||
val angle = start.third
|
||||
var count = 1
|
||||
for (p in points) {
|
||||
val crossRoad = MapDataWrapper.getCrossRoad(p.first, p.second, angle)
|
||||
if (crossRoad != null && !TextUtils.isEmpty(crossRoad.cross_id) && !TextUtils.equals(crossId, crossRoad.cross_id)) {
|
||||
count++
|
||||
crossId = crossRoad.cross_id
|
||||
}
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
private fun getAlertContent(poiType: String, distance: Double): String {
|
||||
return when (poiType) {
|
||||
EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType -> {
|
||||
@@ -531,29 +561,43 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
}
|
||||
|
||||
private fun drawOtherRetrogradeVehicle(event: MessagePad.Event) {
|
||||
Log.d("V2NIdentifyDrawer", "---drawOtherRetrogradeVehicle --- :${event.toString()}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]")
|
||||
Logger.i("V2NIdentifyDrawer", "---drawOtherRetrogradeVehicle --- :${event.toString()}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]")
|
||||
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
handler.removeMessages(MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE)
|
||||
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE, event))
|
||||
}
|
||||
}
|
||||
|
||||
private fun drawGreenWave(crossSpeed: V2nCrossSpeed) {
|
||||
Log.d("V2NIdentifyDrawer", "---drawGreenWave---: $crossSpeed, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]")
|
||||
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
handler.removeMessages(MSG_WHAT_DRAW_GREEN_WAVE)
|
||||
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_GREEN_WAVE, crossSpeed))
|
||||
}
|
||||
}
|
||||
|
||||
private val nioEventListener = object : IMoGoV2nNioEventListener {
|
||||
override fun onV2nNioCongestionEvent(congestion: MessagePad.V2nCongestion) {
|
||||
super.onV2nNioCongestionEvent(congestion)
|
||||
V2XBizTrace.onAck(congestion, "onV2nNioCongestionEvent", true)
|
||||
}
|
||||
|
||||
override fun onV2nNioCrossoverEvent(event: MessagePad.Event) {
|
||||
super.onV2nNioCrossoverEvent(event)
|
||||
V2XBizTrace.onAck(event,"onV2nNioCrossoverEvent", true)
|
||||
//TODO renwj
|
||||
}
|
||||
|
||||
override fun onV2nNioGreenWavePassageEvent(crossSpeed: MessagePad.V2nCrossSpeed) {
|
||||
override fun onV2nNioGreenWavePassageEvent(crossSpeed: V2nCrossSpeed) {
|
||||
super.onV2nNioGreenWavePassageEvent(crossSpeed)
|
||||
V2XBizTrace.onAck(crossSpeed, "onV2nNioGreenWavePassageEvent", true)
|
||||
drawGreenWave(crossSpeed)
|
||||
}
|
||||
|
||||
override fun onV2nNioOtherRetrogradeEvent(event: MessagePad.Event) {
|
||||
super.onV2nNioOtherRetrogradeEvent(event)
|
||||
Logger.i(TAG, "onV2nNioOtherRetrogradeEvent --> ${event.toString()}")
|
||||
CallerLogger.i(TAG, "onV2nNioOtherRetrogradeEvent --> ${event}")
|
||||
V2XBizTrace.onAck(event, "onV2nNioOtherRetrogradeEvent", true)
|
||||
drawOtherRetrogradeVehicle(event)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,11 @@ import com.mogo.map.entities.Lane
|
||||
import com.zhidaoauto.map.data.road.CenterLine
|
||||
import org.locationtech.jts.geom.Coordinate
|
||||
import org.locationtech.jts.geom.GeometryFactory
|
||||
import org.locationtech.jts.geom.LineString
|
||||
import org.locationtech.jts.linearref.LengthIndexedLine
|
||||
import java.util.concurrent.CountDownLatch
|
||||
|
||||
|
||||
object V2NUtils {
|
||||
|
||||
private const val TAG = "V2NUtils"
|
||||
@@ -42,4 +45,25 @@ object V2NUtils {
|
||||
}
|
||||
|
||||
data class Decision(val laneId: Int? = null,val total: List<Lane>, val occupy: List<Lane>)
|
||||
|
||||
|
||||
fun generateIntermediatePoints(head: Pair<Double, Double>, tail: Pair<Double, Double>, interval: Double): List<Pair<Double, Double>> {
|
||||
val geometryFactory = GeometryFactory()
|
||||
val start = Coordinate(head.first, head.second)
|
||||
val end = Coordinate(tail.first, tail.second)
|
||||
val line: LineString = geometryFactory.createLineString(arrayOf(start, end))
|
||||
val indexedLine = LengthIndexedLine(line)
|
||||
val lineLength = indexedLine.endIndex
|
||||
val result: MutableList<Coordinate> = ArrayList()
|
||||
var i = 0.0
|
||||
while (i <= lineLength) {
|
||||
val p = indexedLine.extractPoint(i)
|
||||
result.add(p)
|
||||
i += interval
|
||||
}
|
||||
if (result[result.size - 1].distance(end) > 0.0001) {
|
||||
result.add(end)
|
||||
}
|
||||
return result.map { Pair(it.x, it.y) }
|
||||
}
|
||||
}
|
||||
@@ -105,6 +105,12 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onAutopilotPerceptionTrafficLight ---- hasObuLightStatus = $hasObuLightStatus ----hasAiLightStatus = $hasAiLightStatus , trafficLights : ${trafficLights?:"null"}"
|
||||
)
|
||||
Log.i(TAG,"source="+trafficLights?.source)
|
||||
if(trafficLights?.source == 2){
|
||||
hasObuLightStatus = false
|
||||
hasAiLightStatus = false
|
||||
hasFusionLightStatus = true
|
||||
}
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasAiLightStatus) {
|
||||
trafficLights?.let {
|
||||
@@ -130,6 +136,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
if (!hasAutopilotPerception) {
|
||||
hasAutopilotPerception = true
|
||||
}
|
||||
|
||||
if(light.nextState == null || light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION
|
||||
|| light.nextTwoState == null || light.nextTwoState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION){
|
||||
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
|
||||
@@ -147,17 +154,25 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
onTrafficLightPlusSource(convert(light.state), 0, DataSourceType.TELEMATIC)
|
||||
}
|
||||
}else{
|
||||
//有下一和下二灯态,则为融合V2N红绿灯数据
|
||||
onFusionTrafficLight(convert(light.state),light.duration.toInt(),
|
||||
convert(light.nextState),light.nextDuration.toInt(),
|
||||
convert(light.nextTwoState),light.nextTwoDuration.toInt(),
|
||||
DataSourceType.TELEMATIC_UNION_V2N
|
||||
)
|
||||
//当前灯态倒计时小于5S时,展示额外的提示框
|
||||
if(light.duration < 5){
|
||||
onTrafficLightPrompt(convert(light.state),light.duration.toInt())
|
||||
Log.i(TAG,"current state="+light.state+" current duration="+light.duration+
|
||||
" nextState="+light.nextState+" nextDuration="+light.nextDuration+
|
||||
" nextTwoState="+light.nextTwoState+" nextTwoDuration="+light.nextTwoDuration)
|
||||
if(convert(light.state) == TrafficLightEnum.BLACK){
|
||||
//隐藏当前红绿灯以及额外提示框
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
}else{
|
||||
//有下一和下二灯态,则为融合V2N红绿灯数据
|
||||
onFusionTrafficLight(convert(light.state),light.duration.toInt(),
|
||||
convert(light.nextState),light.nextDuration.toInt(),
|
||||
convert(light.nextTwoState),light.nextTwoDuration.toInt(),
|
||||
DataSourceType.TELEMATIC_UNION_V2N
|
||||
)
|
||||
//当前灯态倒计时小于5S时,展示额外的提示框
|
||||
if(light.duration < 5){
|
||||
onTrafficLightPrompt(convert(light.state),light.duration,convert(light.nextState),light.nextDuration,
|
||||
convert(light.nextTwoState),light.nextTwoDuration)
|
||||
}
|
||||
}
|
||||
//TODO 提示框的消失逻辑
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,10 +292,11 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_ADAS_TRAFFIC_LIGHT,
|
||||
paramIndexes = [0, 1])
|
||||
override fun onTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Int) {
|
||||
super.onTrafficLightPrompt(currentState, currentDuration)
|
||||
Log.i("xuxinchao","融合V2N红绿灯额外提示框提醒 Dis")
|
||||
CallerTrafficLightListenerManager.onShowTrafficLightPrompt(currentState, currentDuration)
|
||||
override fun onTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Float,
|
||||
nextState: TrafficLightEnum, nextDuration: Float,
|
||||
nextTwoState: TrafficLightEnum, nextTwoDuration: Float) {
|
||||
super.onTrafficLightPrompt(currentState, currentDuration,nextState, nextDuration, nextTwoState, nextTwoDuration)
|
||||
CallerTrafficLightListenerManager.onShowTrafficLightPrompt(currentState, currentDuration,nextState, nextDuration, nextTwoState, nextTwoDuration)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.lifecycle.ProcessLifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
@@ -30,6 +31,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.greenwave.GreenWaveView
|
||||
import com.mogo.eagle.core.function.hmi.ui.lookaround.M1LookAroundView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.DispatchDialogManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
@@ -83,6 +85,8 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
|
||||
private val xiaozhi by lazy { XiaoZhiStateManager() }
|
||||
|
||||
private val greenWave by lazy { AtomicReference<MoGoPopWindow>() }
|
||||
|
||||
|
||||
override fun init(context: Context?) {
|
||||
this.context = context
|
||||
@@ -403,4 +407,29 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
override fun notifyXiaoZhiStatusChanged(event: Event, state: State) {
|
||||
xiaozhi.notify(event, state)
|
||||
}
|
||||
|
||||
override fun showGreenWave(min: Int, max: Int, cross: Int) {
|
||||
val activity = AppStateManager.currentActivity() ?: return
|
||||
greenWave.get()?.hide()
|
||||
val content = GreenWaveView(activity)
|
||||
MoGoPopWindow.Builder()
|
||||
.contentView(content)
|
||||
.width(WindowManager.LayoutParams.WRAP_CONTENT)
|
||||
.height(WindowManager.LayoutParams.WRAP_CONTENT)
|
||||
.attachToActivity(activity)
|
||||
.gravityInActivity(Gravity.END)
|
||||
.onDismissed {
|
||||
greenWave.set(null)
|
||||
}
|
||||
.onShowed {
|
||||
content.bind(min, max, cross)
|
||||
}
|
||||
.build().also {
|
||||
greenWave.set(it)
|
||||
}.show()
|
||||
}
|
||||
|
||||
override fun dismissGreenWave() {
|
||||
greenWave.get()?.hide()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.greenwave
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.rv.divider.CommonDividerItemDecoration
|
||||
import com.mogo.eagle.core.utilcode.util.SizeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.coroutines.Runnable
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.abs
|
||||
import kotlinx.android.synthetic.main.view_green_wave_passenger_layout.view.speed as passenger_speed
|
||||
import kotlinx.android.synthetic.main.view_green_wave_driver_layout.view.speed as driver_speed
|
||||
import kotlinx.android.synthetic.main.view_green_wave_passenger_layout.view.wave_rv as passenger_wave_rv
|
||||
import kotlinx.android.synthetic.main.view_green_wave_driver_layout.view.wave_rv as driver_wave_rv
|
||||
import kotlinx.android.synthetic.main.view_green_wave_passenger_layout.view.recommend_speed as passenger_recommend_speed
|
||||
import kotlinx.android.synthetic.main.view_green_wave_driver_layout.view.recommend_speed as driver_recommend_speed
|
||||
import kotlinx.android.synthetic.main.view_green_wave_passenger_layout.view.recommend_cross as passenger_recommend_cross
|
||||
import kotlinx.android.synthetic.main.view_green_wave_driver_layout.view.recommend_cross as driver_recommend_cross
|
||||
|
||||
class GreenWaveView: LinearLayout, IMoGoChassisLocationGCJ02Listener, RecyclerView.OnItemTouchListener, Runnable {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "GreenWaveView"
|
||||
}
|
||||
|
||||
private var lastSpeed: Int = Int.MIN_VALUE
|
||||
|
||||
constructor(context: Context) : this(context, null)
|
||||
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
||||
LayoutInflater.from(context).inflate(if (isDriver) R.layout.view_green_wave_driver_layout else R.layout.view_green_wave_passenger_layout, this)
|
||||
background = if (isDriver) ContextCompat.getDrawable(context, R.drawable.bg_green_wave_driver) else ContextCompat.getDrawable(context, R.drawable.bg_green_wave_passenger)
|
||||
}
|
||||
|
||||
private val isDriver by lazy {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
|
||||
private class WaveHolder(item: ImageView): RecyclerView.ViewHolder(item)
|
||||
|
||||
private class WaveAdapter: RecyclerView.Adapter<WaveHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WaveHolder {
|
||||
val item = ImageView(parent.context)
|
||||
item.layoutParams = RecyclerView.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
return WaveHolder(item)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return 5000
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: WaveHolder, position: Int) {
|
||||
val item = holder.itemView as? ImageView ?: return
|
||||
val reminder = position % 3
|
||||
when(reminder) {
|
||||
0 -> {
|
||||
item.background = ContextCompat.getDrawable(item.context, R.drawable.icon_green_wave_alpha_low)
|
||||
}
|
||||
1 -> {
|
||||
item.background = ContextCompat.getDrawable(item.context, R.drawable.icon_green_wave_alpha_mid)
|
||||
}
|
||||
else -> {
|
||||
item.background = ContextCompat.getDrawable(item.context, R.drawable.icon_green_wave_alpha_high)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 5, this)
|
||||
val rv: RecyclerView? = if (isDriver) driver_wave_rv else passenger_wave_rv
|
||||
rv?.addItemDecoration(CommonDividerItemDecoration.Builder()
|
||||
.spanCountTBCare(false)
|
||||
.horizontalInnerSpace(SizeUtils.dp2px(10f))
|
||||
.build())
|
||||
rv?.addOnItemTouchListener(this)
|
||||
rv?.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, true)
|
||||
rv?.adapter = WaveAdapter()
|
||||
startAutoScroll()
|
||||
}
|
||||
|
||||
private fun startAutoScroll() {
|
||||
removeCallbacks(this)
|
||||
post(this)
|
||||
}
|
||||
|
||||
private fun stopAutoScroll() {
|
||||
removeCallbacks(this)
|
||||
}
|
||||
|
||||
override fun run() {
|
||||
val rv: RecyclerView? = if (isDriver) driver_wave_rv else passenger_wave_rv
|
||||
rv?.scrollBy(-3, 0)
|
||||
postDelayed(this, 20)
|
||||
}
|
||||
|
||||
override fun onInterceptTouchEvent(rv: RecyclerView, e: MotionEvent): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onTouchEvent(rv: RecyclerView, e: MotionEvent) { }
|
||||
|
||||
override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) { }
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
val rv: RecyclerView? = if (isDriver) driver_wave_rv else passenger_wave_rv
|
||||
rv?.removeOnItemTouchListener(this)
|
||||
stopAutoScroll()
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
var isChanged = false
|
||||
val speed = (abs(mogoLocation?.gnssSpeed ?: 0f) * 3.6f).toInt()
|
||||
if (lastSpeed != speed) {
|
||||
isChanged = true
|
||||
lastSpeed = speed
|
||||
}
|
||||
if (isChanged) {
|
||||
UiThreadHandler.post {
|
||||
if (isDriver) {
|
||||
driver_speed?.text = speed.toString()
|
||||
} else {
|
||||
passenger_speed?.text = speed.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun bind(minSpeed: Int, maxSpeed: Int, cross: Int) {
|
||||
scope.launch {
|
||||
if (isDriver) {
|
||||
driver_recommend_speed?.text = "建议车速${minSpeed}-${maxSpeed}km/h"
|
||||
driver_recommend_cross?.text = "可丝滑通过${cross}个路口"
|
||||
} else {
|
||||
passenger_recommend_speed?.text = "建议车速${minSpeed}-${maxSpeed}km/h"
|
||||
passenger_recommend_cross?.text = "可丝滑通过${cross}个路口"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo
|
||||
import com.mogo.eagle.core.data.notice.AutoExplorationEntity
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
@@ -86,6 +87,18 @@ class AutomaticExplorationView @JvmOverloads constructor(
|
||||
dataList.add(AutoExplorationEntity("前方路口行人/非机动车分析",6000L))
|
||||
dataList.add(AutoExplorationEntity("路侧视频分析",8000L))
|
||||
automaticExplorationAdapter?.setData(dataList)
|
||||
|
||||
//每出现一次自动探查,增加相应的服务次数
|
||||
//车辆服务次数
|
||||
AutopilotSummaryInfo.vehicleServiceNum += 31
|
||||
//道路信息提醒次数
|
||||
AutopilotSummaryInfo.infoTipNum += 9
|
||||
//车辆行为提醒次数
|
||||
AutopilotSummaryInfo.vehicleTipNum += 13
|
||||
//弱势参与者提醒次数
|
||||
AutopilotSummaryInfo.vulnerableTipNum += 4
|
||||
//消除安全风险隐患次数
|
||||
AutopilotSummaryInfo.dangerNum += 24
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
/**
|
||||
* 融合红绿灯变灯提示
|
||||
@@ -33,7 +34,6 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
private var tvPromptContent: TextView ?= null
|
||||
private var tvTrafficNum: TypefaceTextView ?= null
|
||||
private var tvTrafficNumDecimal: TypefaceTextView ?= null
|
||||
private val randomList = ArrayList<Float>()
|
||||
|
||||
init {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.TrafficLightPromptView)
|
||||
@@ -53,16 +53,6 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
tvTrafficNum = findViewById(R.id.tvTrafficNum)
|
||||
tvTrafficNumDecimal = findViewById(R.id.tvTrafficNumDecimal)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
|
||||
randomList.add(0.99f)
|
||||
randomList.add(0.72f)
|
||||
randomList.add(0.44f)
|
||||
randomList.add(0.21f)
|
||||
randomList.add(0.06f)
|
||||
|
||||
// tvPromptContent?.text = "请准备出发"
|
||||
// tvTrafficNum?.text = "12"
|
||||
// tvTrafficNumDecimal?.text = ".56"
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -70,6 +60,12 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun disableTrafficLight() {
|
||||
super.disableTrafficLight()
|
||||
UiThreadHandler.post{
|
||||
this@TrafficLightPromptView.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,8 +73,10 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
* @param currentState 当前灯态
|
||||
* @param currentDuration 当前灯态倒计时
|
||||
*/
|
||||
override fun onShowTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Int) {
|
||||
super.onShowTrafficLightPrompt(currentState, currentDuration)
|
||||
override fun onShowTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Float,
|
||||
nextState: TrafficLightEnum, nextDuration: Float,
|
||||
nextTwoState: TrafficLightEnum, nextTwoDuration: Float) {
|
||||
super.onShowTrafficLightPrompt(currentState, currentDuration,nextState, nextDuration, nextTwoState, nextTwoDuration)
|
||||
ThreadUtils.runOnUiThread {
|
||||
when(currentState){
|
||||
TrafficLightEnum.GREEN->{
|
||||
@@ -115,7 +113,49 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
this@TrafficLightPromptView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
tvTrafficNum?.text = currentDuration.toString()
|
||||
if(currentDuration>0 && currentDuration<5){
|
||||
tvTrafficNum?.text = "${currentDuration.toInt()}."
|
||||
tvTrafficNumDecimal?.text = (currentDuration*100 - currentDuration.toInt()*100).toInt().toString()
|
||||
}else{
|
||||
tvTrafficNum?.text = "0."
|
||||
tvTrafficNumDecimal?.text = "0"
|
||||
this@TrafficLightPromptView.visibility = View.GONE
|
||||
}
|
||||
when(nextState){
|
||||
TrafficLightEnum.GREEN->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将绿灯"
|
||||
tvPromptContent?.text = "请准备出发"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将绿灯,请准备出发"
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.RED->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将红灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将黄灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.BLACK->{
|
||||
this@TrafficLightPromptView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
@@ -12,14 +12,8 @@ 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.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightBg
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightNum
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightPointer
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightProportion
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightScale
|
||||
import kotlinx.android.synthetic.main.hmi_view_fusion_traffic_light.view.fusionTrafficLightState
|
||||
|
||||
/**
|
||||
* 融合红绿灯View
|
||||
* 鹰眼6.5.0版本需求
|
||||
@@ -41,6 +35,12 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
private var maxYellowDuration = 0 //黄灯最长时间
|
||||
private var maxRedDuration = 0 //红灯最长时间
|
||||
|
||||
private var fusionTrafficLightNum: TypefaceTextView ?=null //融合红绿灯倒计时
|
||||
private var fusionTrafficLightState: ImageView ?= null //融合红绿灯灯态
|
||||
private var fusionTrafficLightScale: ImageView ?= null //融合红绿灯刻度
|
||||
private var fusionTrafficLightPointer: ImageView ?= null //融合红绿灯指针
|
||||
private var fusionTrafficLightProportion: ProportionChartView ?= null //占比进度条
|
||||
|
||||
|
||||
init {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.FusionTrafficLightView)
|
||||
@@ -50,13 +50,17 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_fusion_traffic_light, this, true)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
if(user == 0){
|
||||
fusionTrafficLightBg.setBackgroundResource(R.drawable.bg_fusion_traffic_light)
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_fusion_traffic_light, this, true)
|
||||
}else{
|
||||
fusionTrafficLightBg.setBackgroundResource(R.drawable.bg_fusion_traffic_light_p)
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_fusion_traffic_light_p, this, true)
|
||||
}
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
fusionTrafficLightNum = findViewById(R.id.fusionTrafficLightNum)
|
||||
fusionTrafficLightState = findViewById(R.id.fusionTrafficLightState)
|
||||
fusionTrafficLightScale = findViewById(R.id.fusionTrafficLightScale)
|
||||
fusionTrafficLightPointer = findViewById(R.id.fusionTrafficLightPointer)
|
||||
fusionTrafficLightProportion = findViewById(R.id.fusionTrafficLightProportion)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -69,7 +73,6 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
*/
|
||||
override fun disableTrafficLight() {
|
||||
super.disableTrafficLight()
|
||||
Log.i("xuxinchao","disableTrafficLight 关闭红绿灯预警展示")
|
||||
UiThreadHandler.post{
|
||||
mCurrentLightId = TrafficLightEnum.BLACK
|
||||
this@FusionTrafficLightView.visibility = GONE
|
||||
@@ -94,116 +97,128 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
) {
|
||||
super.showFusionTrafficLight(currentState, currentDuration, nextState,
|
||||
nextDuration, nextTwoState, nextTwoDuration, lightSource)
|
||||
//如果当前红绿灯视图为隐藏状态则设置为显示状态
|
||||
if(this@FusionTrafficLightView.visibility == View.GONE){
|
||||
this@FusionTrafficLightView.visibility = View.VISIBLE
|
||||
//首次展示,需要将当前、下一、下二灯态的时间占比绘制出来,只绘制一次
|
||||
val proportionList = ArrayList<Int>()
|
||||
//按照绿、黄、红的顺序将灯态时间添加到数组
|
||||
when (currentState) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
//如果当前红绿灯视图为隐藏状态则设置为显示状态
|
||||
if(this@FusionTrafficLightView.visibility == View.GONE){
|
||||
this@FusionTrafficLightView.visibility = View.VISIBLE
|
||||
//首次展示,需要将当前、下一、下二灯态的时间占比绘制出来,只绘制一次
|
||||
val proportionList = ArrayList<Int>(3)
|
||||
proportionList.add(0)
|
||||
proportionList.add(0)
|
||||
proportionList.add(0)
|
||||
//按照绿、黄、红的顺序将灯态时间添加到数组
|
||||
when (currentState) {
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,currentDuration)
|
||||
maxGreenDuration = currentDuration
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,currentDuration)
|
||||
maxYellowDuration = if(currentDuration < 3){
|
||||
3
|
||||
}else{
|
||||
currentDuration
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
proportionList.add(2,currentDuration)
|
||||
maxRedDuration = currentDuration
|
||||
}
|
||||
}
|
||||
when(nextState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,nextDuration)
|
||||
maxGreenDuration = nextDuration
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,nextDuration)
|
||||
maxYellowDuration = if(nextDuration<3){
|
||||
3
|
||||
}else{
|
||||
nextDuration
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
proportionList.add(2,nextDuration)
|
||||
maxRedDuration = nextDuration
|
||||
}
|
||||
}
|
||||
when(nextTwoState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,nextTwoDuration)
|
||||
maxGreenDuration = nextTwoDuration
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,nextTwoDuration)
|
||||
maxYellowDuration = if(nextTwoDuration<3){
|
||||
3
|
||||
}else{
|
||||
nextTwoDuration
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
proportionList.add(2,nextTwoDuration)
|
||||
maxRedDuration = nextTwoDuration
|
||||
}
|
||||
}
|
||||
fusionTrafficLightProportion?.updateProportion(proportionList)
|
||||
totalDuration = maxGreenDuration + maxYellowDuration + maxRedDuration
|
||||
}
|
||||
//根据当前灯态设置转盘、刻度、指针背景
|
||||
when(currentState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,currentDuration)
|
||||
maxGreenDuration = currentDuration
|
||||
fusionTrafficLightState?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green))
|
||||
fusionTrafficLightScale?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green_scale))
|
||||
fusionTrafficLightPointer?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green_pointer))
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,currentDuration)
|
||||
maxYellowDuration = currentDuration
|
||||
fusionTrafficLightState?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow))
|
||||
fusionTrafficLightScale?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow_scale))
|
||||
fusionTrafficLightPointer?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow_pointer))
|
||||
}
|
||||
else -> {
|
||||
proportionList.add(2,currentDuration)
|
||||
maxRedDuration = currentDuration
|
||||
fusionTrafficLightState?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red))
|
||||
fusionTrafficLightScale?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red_scale))
|
||||
fusionTrafficLightPointer?.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red_pointer))
|
||||
}
|
||||
}
|
||||
when(nextState){
|
||||
//更新当前灯态倒计时时间
|
||||
if(currentDuration>0){
|
||||
fusionTrafficLightNum?.text = currentDuration.toString()
|
||||
}else{
|
||||
fusionTrafficLightNum?.text = "0"
|
||||
}
|
||||
//当时间为1开头时时间视觉上看不是左右居中对齐,需要做便宜操作
|
||||
if(currentDuration.toString().startsWith("1")){
|
||||
val numLayoutParams = fusionTrafficLightNum?.layoutParams as LayoutParams
|
||||
numLayoutParams.rightMargin = 6
|
||||
fusionTrafficLightNum?.layoutParams = numLayoutParams
|
||||
}else{
|
||||
val numLayoutParams = fusionTrafficLightNum?.layoutParams as LayoutParams
|
||||
numLayoutParams.rightMargin = 0
|
||||
fusionTrafficLightNum?.layoutParams = numLayoutParams
|
||||
}
|
||||
|
||||
//更新指针指向
|
||||
val pointerLayoutParams = fusionTrafficLightPointer?.layoutParams as LayoutParams
|
||||
val currentAngle = when (currentState) {
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,nextDuration)
|
||||
maxGreenDuration = nextDuration
|
||||
360f*(maxGreenDuration-currentDuration)/totalDuration
|
||||
}
|
||||
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,nextDuration)
|
||||
maxYellowDuration = nextDuration
|
||||
360f*(maxGreenDuration+maxYellowDuration-currentDuration)/totalDuration
|
||||
}
|
||||
|
||||
else -> {
|
||||
proportionList.add(2,nextDuration)
|
||||
maxRedDuration = nextDuration
|
||||
360f*(maxGreenDuration+maxYellowDuration+maxRedDuration-currentDuration)/totalDuration
|
||||
}
|
||||
}
|
||||
when(nextTwoState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
proportionList.add(0,nextTwoDuration)
|
||||
maxGreenDuration = nextTwoDuration
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
proportionList.add(1,nextTwoDuration)
|
||||
maxYellowDuration = nextTwoDuration
|
||||
}
|
||||
else -> {
|
||||
proportionList.add(2,nextTwoDuration)
|
||||
maxRedDuration = nextTwoDuration
|
||||
}
|
||||
}
|
||||
fusionTrafficLightProportion.updateProportion(proportionList)
|
||||
totalDuration = maxGreenDuration + maxYellowDuration + maxRedDuration
|
||||
Log.i("xuxinchao","totalDuration="+totalDuration)
|
||||
Log.i("xuxinchao","maxGreenDuration="+maxGreenDuration)
|
||||
Log.i("xuxinchao","maxYellowDuration="+maxYellowDuration)
|
||||
Log.i("xuxinchao","maxRedDuration="+maxRedDuration)
|
||||
}
|
||||
//根据当前灯态设置转盘、刻度、指针背景
|
||||
when(currentState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
fusionTrafficLightState.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green))
|
||||
fusionTrafficLightScale.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green_scale))
|
||||
fusionTrafficLightPointer.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_green_pointer))
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
fusionTrafficLightState.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow))
|
||||
fusionTrafficLightScale.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow_scale))
|
||||
fusionTrafficLightPointer.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_yellow_pointer))
|
||||
}
|
||||
else -> {
|
||||
fusionTrafficLightState.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red))
|
||||
fusionTrafficLightScale.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red_scale))
|
||||
fusionTrafficLightPointer.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_light_red_pointer))
|
||||
}
|
||||
}
|
||||
//更新当前灯态倒计时时间
|
||||
if(currentDuration>0){
|
||||
fusionTrafficLightNum.text = currentDuration.toString()
|
||||
}else{
|
||||
fusionTrafficLightNum.text = "0"
|
||||
}
|
||||
//当时间为1开头时时间视觉上看不是左右居中对齐,需要做便宜操作
|
||||
if(currentDuration.toString().startsWith("1")){
|
||||
val numLayoutParams = fusionTrafficLightNum.layoutParams as LayoutParams
|
||||
numLayoutParams.rightMargin = 10
|
||||
fusionTrafficLightNum.layoutParams = numLayoutParams
|
||||
}else{
|
||||
val numLayoutParams = fusionTrafficLightNum.layoutParams as LayoutParams
|
||||
numLayoutParams.rightMargin = 0
|
||||
fusionTrafficLightNum.layoutParams = numLayoutParams
|
||||
pointerLayoutParams.circleAngle = currentAngle
|
||||
fusionTrafficLightPointer?.rotation = currentAngle
|
||||
fusionTrafficLightPointer?.layoutParams = pointerLayoutParams
|
||||
}
|
||||
|
||||
//更新指针指向
|
||||
val pointerLayoutParams = fusionTrafficLightPointer.layoutParams as LayoutParams
|
||||
var currentAngle = 0f
|
||||
currentAngle = when (currentState) {
|
||||
TrafficLightEnum.GREEN -> {
|
||||
360f*(maxGreenDuration-currentDuration)/totalDuration
|
||||
}
|
||||
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
360f*(maxGreenDuration+maxYellowDuration-currentDuration)/totalDuration
|
||||
}
|
||||
|
||||
else -> {
|
||||
360f*(maxGreenDuration+maxYellowDuration+maxRedDuration-currentDuration)/totalDuration
|
||||
}
|
||||
}
|
||||
pointerLayoutParams.circleAngle = currentAngle
|
||||
fusionTrafficLightPointer.rotation = currentAngle
|
||||
fusionTrafficLightPointer.layoutParams = pointerLayoutParams
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,6 +56,14 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
//关闭Dialog按钮
|
||||
ivSummaryClose = findViewById(R.id.ivSummaryClose)
|
||||
ivSummaryClose?.setOnClickListener {
|
||||
//对本次服务记录清零
|
||||
AutopilotSummaryInfo.intersectionServicesNum = 0
|
||||
AutopilotSummaryInfo.lightServicesNum = 0
|
||||
AutopilotSummaryInfo.infoTipNum = 0
|
||||
AutopilotSummaryInfo.vehicleTipNum = 0
|
||||
AutopilotSummaryInfo.vulnerableTipNum = 0
|
||||
AutopilotSummaryInfo.dangerNum = 0
|
||||
//关闭弹窗
|
||||
dismiss()
|
||||
}
|
||||
//小智总结
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.SweepGradient;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
@@ -132,7 +131,6 @@ public class ProportionChartView extends View {
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
Log.i("xuxinchao","onDraw canvas");
|
||||
drawRingView(canvas);
|
||||
}
|
||||
|
||||
@@ -140,7 +138,6 @@ public class ProportionChartView extends View {
|
||||
* 画Ring
|
||||
*/
|
||||
private void drawRingView(Canvas canvas){
|
||||
Log.i("xuxinchao","drawRingView 画Ring");
|
||||
float sweepAngle = 0f;
|
||||
float startAngle = -90f;
|
||||
//矩形坐标
|
||||
@@ -176,7 +173,7 @@ public class ProportionChartView extends View {
|
||||
}
|
||||
mRingPaint.setShader(sweepGradient);
|
||||
//画圆环
|
||||
canvas.drawArc(mRectF, startAngle, sweepAngle - 2, false, mRingPaint);
|
||||
canvas.drawArc(mRectF, startAngle, sweepAngle, false, mRingPaint);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,12 +79,11 @@ class RomaTaxiView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun romaViewStatus(status: Boolean) {
|
||||
Log.i("emArrow","romaViewStatus:$status")
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(status){
|
||||
this.visibility = View.VISIBLE
|
||||
} else {
|
||||
// this.visibility = View.GONE
|
||||
this.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class WifiStateView @JvmOverloads constructor(
|
||||
wifiHandler = WifiHandler(this)
|
||||
val wifiInfo = wifiManager!!.connectionInfo
|
||||
wifiName = wifiInfo.ssid.replace("\"","")
|
||||
Log.i("emArrow", "init wifiName: $wifiName")
|
||||
// Log.i("emArrow", "init wifiName: $wifiName")
|
||||
}
|
||||
|
||||
private val wifiStateReceiver: BroadcastReceiver = object : BroadcastReceiver() {
|
||||
@@ -105,7 +105,7 @@ class WifiStateView @JvmOverloads constructor(
|
||||
}
|
||||
val wifiInfo = wifiManager!!.connectionInfo
|
||||
wifiName = wifiInfo.ssid.replace("\"","")
|
||||
Log.i("emArrow", "wifiName: $wifiName")
|
||||
// Log.i("emArrow", "wifiName: $wifiName")
|
||||
level = WifiManager.calculateSignalLevel(wifiInfo.rssi, 5)
|
||||
wifiHandler?.sendEmptyMessage(level)
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<solid android:color="#43D1A6" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<gradient
|
||||
android:startColor="#68E0BB"
|
||||
android:endColor="#b072ECC3"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="@dimen/dp_90" android:height="@dimen/dp_90" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="@dimen/dp_90" android:height="@dimen/dp_90" />
|
||||
<gradient
|
||||
android:startColor="#BADDFFF3"
|
||||
android:endColor="#FFFFFF"
|
||||
android:angle="-45"/>
|
||||
</shape>
|
||||
@@ -3,9 +3,9 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/fusionTrafficLightBg"
|
||||
android:layout_width="@dimen/dp_250"
|
||||
android:layout_height="@dimen/dp_250"
|
||||
android:background="@drawable/bg_fusion_traffic_light_p"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:background="@drawable/bg_fusion_traffic_light"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -51,15 +51,15 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_55"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_69"
|
||||
app:textType="DS_DIGIB_2"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.ProportionChartView
|
||||
android:id="@+id/fusionTrafficLightProportion"
|
||||
android:layout_width="@dimen/dp_170"
|
||||
android:layout_height="@dimen/dp_170"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/fusionTrafficLightBg"
|
||||
android:layout_width="@dimen/dp_250"
|
||||
android:layout_height="@dimen/dp_250"
|
||||
android:background="@drawable/bg_fusion_traffic_light_p"
|
||||
>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.ProportionChartView
|
||||
android:id="@+id/fusionTrafficLightProportion"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fusionTrafficLightState"
|
||||
android:layout_width="@dimen/dp_147"
|
||||
android:layout_height="@dimen/dp_147"
|
||||
app:layout_constraintTop_toTopOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintLeft_toLeftOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintRight_toRightOf="@id/fusionTrafficLightProportion"
|
||||
android:src="@drawable/icon_light_green"
|
||||
android:contentDescription="@string/fusion_traffic_light_state"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fusionTrafficLightScale"
|
||||
android:layout_width="@dimen/dp_148"
|
||||
android:layout_height="@dimen/dp_148"
|
||||
app:layout_constraintTop_toTopOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintLeft_toLeftOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintRight_toRightOf="@id/fusionTrafficLightProportion"
|
||||
android:src="@drawable/icon_light_green_scale"
|
||||
android:contentDescription="@string/fusion_traffic_light_scale"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fusionTrafficLightPointer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintCircle="@id/fusionTrafficLightState"
|
||||
app:layout_constraintCircleRadius="@dimen/dp_60"
|
||||
android:src="@drawable/icon_light_green_pointer"
|
||||
android:contentDescription="@string/fusion_traffic_light_pointer"
|
||||
tools:ignore="MissingConstraints"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/fusionTrafficLightNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintLeft_toLeftOf="@id/fusionTrafficLightProportion"
|
||||
app:layout_constraintRight_toRightOf="@id/fusionTrafficLightProportion"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_69"
|
||||
app:textType="DS_DIGIB_2"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:background="@drawable/bg_green_wave_driver"
|
||||
tools:layout_height="wrap_content"
|
||||
tools:layout_width="wrap_content"
|
||||
tools:parentTag="android.widget.LinearLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:background="@drawable/bg_white_circle_driver"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="-5dp"
|
||||
android:textColor="#43D1AB"
|
||||
android:textSize="@dimen/sp_34"
|
||||
tools:text="56" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km/h"
|
||||
android:textColor="#43D1A6"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/wave_rv"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_129"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommend_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="建议车速45-60km/h" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommend_cross"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#b0ffffff"
|
||||
android:textSize="@dimen/dp_20"
|
||||
tools:text="可丝滑通过2个路口" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</merge>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:parentTag="android.widget.LinearLayout"
|
||||
tools:layout_width="wrap_content"
|
||||
tools:layout_height="wrap_content"
|
||||
tools:gravity="center_vertical"
|
||||
tools:background="@drawable/bg_green_wave_passenger">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/dp_108"
|
||||
android:layout_height="@dimen/dp_108"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_white_circle_passenger"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:layout_marginStart="@dimen/dp_34"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:id="@+id/speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_49"
|
||||
android:textColor="#0F664B"
|
||||
android:layout_marginBottom="-5dp"
|
||||
tools:text="56"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:textColor="#0F664B"
|
||||
android:text="km/h" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/wave_rv"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_155"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_29"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommend_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_33"
|
||||
android:textColor="#004A35"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
tools:text="建议车速45-60km/h" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommend_cross"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:textColor="#004A35"
|
||||
tools:text="可丝滑通过2个路口" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</merge>
|
||||
@@ -15,7 +15,6 @@
|
||||
android:layout_marginLeft="@dimen/dp_150"
|
||||
android:textSize="@dimen/sp_30"
|
||||
android:textColor="@color/white"
|
||||
android:text="即将绿灯"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -27,7 +26,6 @@
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textSize="@dimen/sp_21"
|
||||
android:textColor="@color/white"
|
||||
android:text="请准备出发"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
@@ -37,8 +35,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPromptContent"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:text=".99"
|
||||
android:textSize="@dimen/sp_48"
|
||||
android:textColor="@color/light_prompt_red"
|
||||
app:textType="DS_DIGIB_2"
|
||||
/>
|
||||
@@ -47,10 +44,11 @@
|
||||
android:id="@+id/tvTrafficNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTrafficNumDecimal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvTrafficNumDecimal"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:layout_marginRight="@dimen/dp_2"
|
||||
android:textSize="@dimen/sp_90"
|
||||
android:text="3"
|
||||
android:textColor="@color/light_prompt_red"
|
||||
app:textType="DS_DIGIB_2"
|
||||
/>
|
||||
|
||||
@@ -13,33 +13,31 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="@color/light_prompt_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:text="即将红灯,请减速慢行"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:layout_marginStart="@dimen/dp_70"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvTrafficNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPromptContent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvPromptContent"
|
||||
android:textSize="@dimen/sp_76"
|
||||
android:text="2"
|
||||
android:layout_marginLeft="@dimen/dp_25"
|
||||
android:textSize="@dimen/sp_90"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvTrafficNumDecimal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTrafficNum"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPromptContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvTrafficNum"
|
||||
android:textSize="@dimen/sp_30"
|
||||
android:text=".99"
|
||||
android:layout_marginLeft="@dimen/dp_2"
|
||||
android:textSize="@dimen/sp_48"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:gravity="bottom"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -37,8 +37,8 @@ class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
CallerVisualAngleManager.init()
|
||||
}
|
||||
|
||||
override fun trigger(romaStatus: Boolean) {
|
||||
romaManager.trigger(romaStatus)
|
||||
override fun trigger(roamStatus: Boolean) {
|
||||
romaManager.trigger(roamStatus)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -32,21 +32,15 @@ class AiCloudIdentifyDataManager {
|
||||
})
|
||||
}
|
||||
|
||||
fun trigger(romaStatus: Boolean, startDis: Int, endDis: Int) {
|
||||
requestRangeOfIdentify(romaStatus, startDis, endDis)
|
||||
fun trigger(romaStatus: Boolean, startDis: Int, endDis: Int, lat: Double, lon: Double) {
|
||||
requestRangeOfIdentify(romaStatus, startDis, endDis, lat, lon)
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify(
|
||||
romaStatus: Boolean,
|
||||
startDis: Int,
|
||||
endDis: Int
|
||||
romaStatus: Boolean, startDis: Int, endDis: Int, lat: Double, lon: Double
|
||||
) {
|
||||
val loc = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange(
|
||||
romaStatus,
|
||||
startDis, endDis,
|
||||
loc.longitude,
|
||||
loc.latitude,
|
||||
romaStatus, startDis, endDis, lon, lat,
|
||||
{
|
||||
CallerMapAiCloudDataManager.invokeResponse(romaStatus)
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.business.ai
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.util.Log
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -51,7 +52,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
IMoGoAutopilotStatusListener, IMoGoRomaListener, IMoGoAiCloudIdentifyDataListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudIdentifyData"
|
||||
private const val TAG = "RomaManager"
|
||||
|
||||
private const val H_ERROR_CLOUD = 1
|
||||
private const val H_ERROR_MAP = 2
|
||||
@@ -116,13 +117,17 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
true
|
||||
}
|
||||
|
||||
fun trigger(romaStatus: Boolean) {
|
||||
if (CallerMapIdentifyManager.roma.first != TAG && CallerMapIdentifyManager.roma.second) {
|
||||
fun trigger(roamStatus: Boolean) {
|
||||
if (CallerMapIdentifyManager.roam.first.isNotEmpty()
|
||||
&& CallerMapIdentifyManager.roam.first!= TAG
|
||||
&& CallerMapIdentifyManager.roam.second) {
|
||||
ToastUtils.showLong("正在展示路口漫游,请稍后重试")
|
||||
Log.e("emArrow", "正在展示路口漫游,请稍后重试")
|
||||
CallerMapRomaListener.invokeMapRoma(false)
|
||||
return
|
||||
}
|
||||
// 乘客司机屏屏各自单独控制漫游
|
||||
if (romaStatus) {
|
||||
if (roamStatus) {
|
||||
// 开启roma,当前非漫游,开启
|
||||
MapRomaTrace.log(
|
||||
"",
|
||||
@@ -140,7 +145,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
private fun openRoma() {
|
||||
CallerMapIdentifyManager.roma = Pair(TAG, true)
|
||||
CallerMapIdentifyManager.roam = Pair(TAG, true)
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(true)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setScrollGesturesEnable(false)
|
||||
updateLongSightLevel(true)
|
||||
@@ -149,7 +154,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
|
||||
@Synchronized
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
CallerMapIdentifyManager.roma = Pair("", false)
|
||||
CallerMapIdentifyManager.roam = Pair("", false)
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(false)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setScrollGesturesEnable(true)
|
||||
updateLongSightLevel(false)
|
||||
@@ -192,7 +197,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
"cityCode" to CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().cityCode
|
||||
), !dataReceive
|
||||
)
|
||||
aiCloudIdentifyDataManager.trigger(dataReceive, START_METRE, END_METRE)
|
||||
aiCloudIdentifyDataManager.trigger(dataReceive, START_METRE, END_METRE,loc.latitude,loc.longitude)
|
||||
}
|
||||
|
||||
override fun response(requestStatus: Boolean, errorMsg: String?) {
|
||||
|
||||
@@ -8,13 +8,12 @@ import android.util.Log
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoAiCloudIdentifyDataListener
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.RomaManager
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapAiCloudDataManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.map.MogoMap.Companion.MAP_ROAM
|
||||
import com.mogo.map.MogoMapView
|
||||
@@ -24,23 +23,19 @@ import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
|
||||
class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
|
||||
LifecycleObserver, IMoGoMapRoadListener , IMoGoAiCloudIdentifyDataListener {
|
||||
LifecycleObserver, IMoGoMapRoadListener, IMoGoAiCloudIdentifyDataListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MapRoamView"
|
||||
}
|
||||
|
||||
override fun onCreate(bundle: Bundle?) {
|
||||
super.onCreate(bundle)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initMapView()
|
||||
}
|
||||
|
||||
private fun initMapView() {
|
||||
map?.uiController?.showMyLocation(false)
|
||||
getUI()?.showMyLocation(false)
|
||||
map?.uiSettings?.let {
|
||||
it.setAllGesturesEnabled(false)
|
||||
//设置指南针是否可见。
|
||||
@@ -58,18 +53,6 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context
|
||||
return MAP_ROAM
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
private fun getUI(): IMogoMapUIController? {
|
||||
return map?.uiController
|
||||
}
|
||||
@@ -83,25 +66,28 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context
|
||||
|
||||
fun openRoam() {
|
||||
this.onResume()
|
||||
CallerMapAiCloudDataManager.addListener(TAG, this)
|
||||
getUI()?.setVisible(true)
|
||||
CallerMapAiCloudDataManager.addListener(RoadCrossRoamView.TAG, this)
|
||||
// 更新地图视角 - 高视角
|
||||
getUI()?.changeMapVisualAngle(VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP, null)
|
||||
// 更新路口位置
|
||||
val latLng = CallerMapRoadListenerManager.getStopLineLatLng()
|
||||
Log.i("emArrow","$TAG 开始漫游 latLng:${latLng.toString()}")
|
||||
latLng?.let {
|
||||
val loc = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val curLat = loc.latitude
|
||||
val curLng = loc.longitude
|
||||
loc.latitude = latLng.first
|
||||
loc.longitude = latLng.second
|
||||
setExtraGPSData(loc)
|
||||
val dis = CoordinateUtils.calculateLineDistance(curLat, curLng, latLng.first, latLng.second)
|
||||
Log.i("emArrow", "$TAG 开始漫游 latLng:$latLng , curLat:$curLat , curLng:$curLng , dis:$dis")
|
||||
// 开始漫游
|
||||
aiCloudIdentifyDataManager.trigger(true, 1, 300, latLng.first, latLng.second)
|
||||
}
|
||||
// 开始漫游
|
||||
aiCloudIdentifyDataManager.trigger(true, 1, 300)
|
||||
}
|
||||
|
||||
|
||||
override fun response(requestStatus: Boolean, errorMsg: String?) {
|
||||
|
||||
Log.e("emArrow","road map response:$requestStatus , errorMsg:${errorMsg?:""}")
|
||||
}
|
||||
|
||||
override fun onAiIdentifyData(obj: SocketDownData.SocketDownDataProto?) {
|
||||
@@ -116,17 +102,16 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context
|
||||
}
|
||||
}
|
||||
|
||||
fun closeRoam(){
|
||||
this.onPause()
|
||||
fun closeRoam() {
|
||||
// 结束漫游
|
||||
aiCloudIdentifyDataManager.trigger(false, 1, 300)
|
||||
CallerMapAiCloudDataManager.removeListener(TAG)
|
||||
val latLng = CallerMapRoadListenerManager.getStopLineLatLng()
|
||||
latLng?.let {
|
||||
aiCloudIdentifyDataManager.trigger(false, 1, 300, it.first, it.second)
|
||||
}
|
||||
CallerMapAiCloudDataManager.removeListener(RoadCrossRoamView.TAG)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma(MAP_ROAM)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
// 先取消注册数据,再onDestroy
|
||||
super.onDestroy()
|
||||
this.onPause()
|
||||
getUI()?.setVisible(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -48,7 +47,6 @@ class RoadCrossRoamListAdapter(private val mContext: Context, private val lightM
|
||||
|
||||
val r0 = Random.nextInt(0,3)
|
||||
val r1 = Random.nextInt(1,9)
|
||||
Log.i("emArrow","random:${r0 * 1000L + r1 * 100L}")
|
||||
// 模拟加载完成
|
||||
holder.itemView.postDelayed({
|
||||
holder.progressBar.visibility = View.GONE
|
||||
|
||||
@@ -36,7 +36,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoMapRoadListener{
|
||||
|
||||
companion object {
|
||||
private const val TAG = "RoadCrossRoamView"
|
||||
const val TAG = "RoadCrossRoamView"
|
||||
}
|
||||
|
||||
private var showState by Delegates.observable(false) { _, oldV, newV ->
|
||||
@@ -91,19 +91,23 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
|
||||
override fun onStopLineInfo(info: StopLine) {
|
||||
super.onStopLineInfo(info)
|
||||
if(info.distance == 0.0){
|
||||
Log.i("emArrow", "showState return , distance is zero")
|
||||
return
|
||||
}
|
||||
showState = info.distance < 200 && info.distance > 100
|
||||
Log.i("emArrow", "showState $showState , distance:${info.distance}")
|
||||
// Log.i("emArrow", "showState $showState , distance:${info.distance}")
|
||||
}
|
||||
|
||||
private fun attachView() {
|
||||
// 处于漫游模式下不做处理
|
||||
if (CallerMapIdentifyManager.roma.second) {
|
||||
if (CallerMapIdentifyManager.roma.first != TAG) {
|
||||
if (CallerMapIdentifyManager.roam.second) {
|
||||
if (CallerMapIdentifyManager.roam.first != TAG) {
|
||||
ToastUtils.showLong("正在漫游中,不展示路口漫游")
|
||||
}
|
||||
return
|
||||
}
|
||||
CallerMapIdentifyManager.roma = Pair(TAG, true)
|
||||
CallerMapIdentifyManager.roam = Pair(TAG, true)
|
||||
this.visibility = View.VISIBLE
|
||||
ivZhiRoadRoamView.visibility = View.VISIBLE
|
||||
mapRoamView.visibility = View.VISIBLE
|
||||
@@ -145,7 +149,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
mapRoamView.closeRoam()
|
||||
mapRoamView.visibility = View.GONE
|
||||
CallerMapIdentifyManager.roma = Pair("", false)
|
||||
CallerMapIdentifyManager.roam = Pair("", false)
|
||||
lvRoadCrossRoamTip.adapter = null
|
||||
animator?.cancel()
|
||||
if (lightMode) {
|
||||
|
||||
@@ -5,6 +5,13 @@ package com.mogo.eagle.core.data.autopilot
|
||||
*/
|
||||
object AutopilotSummaryInfo {
|
||||
|
||||
/**
|
||||
* 车辆服务次数
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var vehicleServiceNum = 0
|
||||
|
||||
/**
|
||||
* 全息路口服务次数
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.data.enums
|
||||
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.R
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -518,6 +519,13 @@ enum class EventTypeEnumNew(
|
||||
content = "前方%s米有车辆异常倒车/逆行,蘑菇提醒您注意观察小心通过",
|
||||
tts = "前方%s米有车辆异常倒车/逆行,蘑菇提醒您注意观察小心通过"
|
||||
),
|
||||
TYPE_SOCKET_ROAD_GREE_WAVE(
|
||||
"100063",
|
||||
"绿波通行",
|
||||
poiTypeSrcVr = View.NO_ID,
|
||||
content = "保持当前车速即可通过路口,好丝滑!",
|
||||
tts = "保持当前车速即可通过路口,好丝滑!"
|
||||
),
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
"未知/错误/异常",
|
||||
|
||||
@@ -33,7 +33,9 @@ interface IMoGoTrafficLightListener {
|
||||
/**
|
||||
* 红绿灯额外提示框
|
||||
*/
|
||||
fun onTrafficLightPrompt(currentState: TrafficLightEnum,currentDuration: Int){}
|
||||
fun onTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Float,
|
||||
nextState: TrafficLightEnum, nextDuration: Float,
|
||||
nextTwoState: TrafficLightEnum, nextTwoDuration: Float){}
|
||||
|
||||
/**
|
||||
* 融合红绿灯,带有下一灯态和下二灯态
|
||||
@@ -67,7 +69,9 @@ interface IMoGoTrafficLightListener {
|
||||
* @param currentState 当前灯态
|
||||
* @param currentDuration 当前灯态倒计时
|
||||
*/
|
||||
fun onShowTrafficLightPrompt(currentState: TrafficLightEnum,currentDuration: Int){}
|
||||
fun onShowTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Float,
|
||||
nextState: TrafficLightEnum, nextDuration: Float,
|
||||
nextTwoState: TrafficLightEnum, nextTwoDuration: Float){}
|
||||
|
||||
/**
|
||||
* 展示融合带有下一下二灯态的红绿灯
|
||||
|
||||
@@ -217,4 +217,14 @@ interface IMoGoHmiProvider :IProvider{
|
||||
* 通知小智形象要变化了
|
||||
*/
|
||||
fun notifyXiaoZhiStatusChanged(event: Event, state: State)
|
||||
|
||||
/**
|
||||
* 展示绿波通行弹窗
|
||||
*/
|
||||
fun showGreenWave(min: Int, max: Int, cross: Int)
|
||||
|
||||
/**
|
||||
* 隐藏绿波通弹窗
|
||||
*/
|
||||
fun dismissGreenWave()
|
||||
}
|
||||
@@ -6,8 +6,8 @@ interface IMogoRoma : IProvider {
|
||||
|
||||
/**
|
||||
* 触发开启/关闭漫游
|
||||
* @param romaStatus 漫游状态
|
||||
* @param roamStatus 漫游状态
|
||||
*/
|
||||
fun trigger(romaStatus:Boolean)
|
||||
fun trigger(roamStatus:Boolean)
|
||||
|
||||
}
|
||||
@@ -317,4 +317,18 @@ object CallerHmiManager {
|
||||
fun notifyXiaoZhiStatusChanged(event: Event, state: State) {
|
||||
hmiProviderApi?.notifyXiaoZhiStatusChanged(event, state)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示绿波通行弹窗
|
||||
*/
|
||||
fun showGreenWave(min: Int, max: Int, cross: Int) {
|
||||
hmiProviderApi?.showGreenWave(min, max, cross)
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏绿波通行弹窗
|
||||
*/
|
||||
fun dismissGreenWave() {
|
||||
hmiProviderApi?.dismissGreenWave()
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoAiCloudIdentifyDataListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
@@ -7,14 +8,15 @@ import mogo.yycp.api.proto.SocketDownData
|
||||
object CallerMapAiCloudDataManager : CallerBase<IMoGoAiCloudIdentifyDataListener>() {
|
||||
|
||||
fun invokeResponse(requestStatus: Boolean, errorMsg: String? = null) {
|
||||
val tag = CallerMapIdentifyManager.roma.first
|
||||
val tag = CallerMapIdentifyManager.roam.first
|
||||
Log.i("emArrow","invokeResponse tag:$tag , status:$requestStatus , errorMsg:${errorMsg?:""}")
|
||||
if(tag.isNotEmpty() && M_LISTENERS.containsKey(tag)){
|
||||
M_LISTENERS[tag]?.response(requestStatus, errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeAiIdentifyData(obj: SocketDownData.SocketDownDataProto?){
|
||||
val tag = CallerMapIdentifyManager.roma.first
|
||||
val tag = CallerMapIdentifyManager.roam.first
|
||||
if(tag.isNotEmpty() && M_LISTENERS.containsKey(tag)){
|
||||
M_LISTENERS[tag]?.onAiIdentifyData(obj)
|
||||
}
|
||||
|
||||
@@ -3,19 +3,21 @@ package com.mogo.eagle.core.function.call.map
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
|
||||
object CallerMapIdentifyManager {
|
||||
|
||||
@Volatile
|
||||
var roma = Pair("", false)
|
||||
var roam = Pair("", false)
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
private val romaApi: IMogoRoma
|
||||
private val roamApi: IMogoRoma
|
||||
get() = ARouter.getInstance().build(MogoServicePaths.PATH_MAP_BIZ)
|
||||
.navigation() as IMogoRoma
|
||||
|
||||
fun romaTrigger(romaStatus: Boolean) {
|
||||
romaApi.trigger(romaStatus)
|
||||
fun romaTrigger(roamStatus: Boolean) {
|
||||
roamApi.trigger(roamStatus)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,14 +26,14 @@ object CallerMsgBoxManager {
|
||||
*/
|
||||
fun saveMsgBox(bean: MsgBoxBean) {
|
||||
CallerTrace.write(TAG,bean)
|
||||
providerApi?.saveMsg(bean) //todo emArrow test
|
||||
providerApi?.saveMsg(bean)
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储含有pb的数据到消息盒子(区别与上述方法中的trace write)
|
||||
*/
|
||||
fun saveMsgBoxHasPB(bean: MsgBoxBean){
|
||||
providerApi?.saveMsg(bean) //todo emArrow test
|
||||
providerApi?.saveMsg(bean)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -77,10 +77,12 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
|
||||
* @param currentState 当前灯态
|
||||
* @param currentDuration 当前灯态倒计时
|
||||
*/
|
||||
fun onShowTrafficLightPrompt(currentState: TrafficLightEnum,currentDuration: Int){
|
||||
fun onShowTrafficLightPrompt(currentState: TrafficLightEnum, currentDuration: Float,
|
||||
nextState: TrafficLightEnum, nextDuration: Float,
|
||||
nextTwoState: TrafficLightEnum, nextTwoDuration: Float){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onShowTrafficLightPrompt(currentState,currentDuration)
|
||||
listener.onShowTrafficLightPrompt(currentState,currentDuration,nextState, nextDuration, nextTwoState, nextTwoDuration)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1079,6 +1079,7 @@
|
||||
<dimen name="sp_48">48dp</dimen>
|
||||
<dimen name="sp_52">52dp</dimen>
|
||||
<dimen name="sp_55">55dp</dimen>
|
||||
<dimen name="sp_69">69dp</dimen>
|
||||
<dimen name="sp_72">72dp</dimen>
|
||||
<dimen name="sp_76">76dp</dimen>
|
||||
<dimen name="sp_90">90dp</dimen>
|
||||
|
||||
@@ -181,9 +181,6 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
override fun getMapEngine(): MapEngine {
|
||||
return mMapEngine
|
||||
}
|
||||
@@ -229,7 +226,7 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
mITraffic = null
|
||||
}
|
||||
|
||||
//surfaceview截屏
|
||||
// surfaceView截屏
|
||||
private fun createBitmapFromGLSurface(x: Int, y: Int, w: Int, h: Int, gl: GL10): Bitmap? {
|
||||
val bitmapBuffer = IntArray(w * h)
|
||||
val bitmapSource = IntArray(w * h)
|
||||
@@ -256,10 +253,6 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
return Bitmap.createBitmap(bitmapSource, w, h, Bitmap.Config.ARGB_8888)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fun setMapController(mMapController: IMapController?) {
|
||||
this.mMapController = mMapController
|
||||
}
|
||||
@@ -1231,7 +1224,6 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
//设置刷新帧率
|
||||
override fun setRenderFps(fps: Int) {
|
||||
m_FPS = fps
|
||||
|
||||
}
|
||||
|
||||
//设置刷新帧率
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.open.view
|
||||
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import com.autonavi.nge.map.LonLat
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
@@ -775,6 +776,10 @@ class MapAutoViewHelper(mapAutoView: MapAutoView) {
|
||||
?.setPanel(PanelManager.PANEL_WHAT_HID, PanelManager.PANEL_BTN_LOGO)
|
||||
}
|
||||
|
||||
fun setVisible(visible:Boolean){
|
||||
mMapAutoView.getClerk()?.add()
|
||||
mMapAutoView.getMapView()?.visibility = if (visible) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图截屏
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.map
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.map.entities.BusStation
|
||||
import com.mogo.map.entities.CrossRoad
|
||||
import com.mogo.map.entities.Lane
|
||||
import com.mogo.map.entities.RoadInfo
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
@@ -121,4 +122,9 @@ interface IMogoData {
|
||||
* 获取公交站点集合
|
||||
*/
|
||||
fun getBusStation(routeList: ArrayList<LonLatPoint>): List<BusStation>
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路口数据
|
||||
*/
|
||||
fun getCrossRoad(lon: Double, lat: Double, angle: Double): CrossRoad?
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.map.entities
|
||||
|
||||
data class CrossRoad(
|
||||
val status: Int, // 0: 不在路口 1: 在路口
|
||||
val tile_id: String, // 起始路口瓦片id或者当前路口的瓦片id
|
||||
val cross_id: String, // 起始路口id或当前路口id
|
||||
val tile_id_end: String, //
|
||||
val cross_id_end: String
|
||||
)
|
||||
@@ -327,4 +327,6 @@ interface IMogoMapUIController {
|
||||
*/
|
||||
fun getMapScreenShot()
|
||||
fun setWeatherEnable(enable: Boolean)
|
||||
|
||||
fun setVisible(visible:Boolean)
|
||||
}
|
||||
@@ -951,4 +951,8 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
override fun setWeatherEnable(enable: Boolean) {
|
||||
mMapView.getMapAutoViewHelper()?.setWeatherEnable(enable)
|
||||
}
|
||||
|
||||
override fun setVisible(visible: Boolean) {
|
||||
mMapView.getMapAutoViewHelper()?.setVisible(visible)
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,13 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.entities.BusStation
|
||||
import com.mogo.map.entities.CrossRoad
|
||||
import com.mogo.map.entities.Lane
|
||||
import com.mogo.map.location.GDLocationClient.Companion.gdLocationClient
|
||||
import com.mogo.map.utils.HDMapUtils.getHDCityCode
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.data.road.CenterLine
|
||||
import com.zhidaoauto.map.data.road.RoadCross
|
||||
import com.zhidaoauto.map.data.road.RoadNameInfo
|
||||
import com.zhidaoauto.map.data.road.RoadRectInfos
|
||||
import com.zhidaoauto.map.data.road.RoutePath
|
||||
@@ -21,6 +23,7 @@ import com.zhidaoauto.map.sdk.open.abs.OnHdDataDownByCityListener
|
||||
import com.zhidaoauto.map.sdk.open.data.CityInfo
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
* 地图数据工具,涉及到数据调用可能会有耗时,建议IO操作
|
||||
@@ -303,4 +306,18 @@ object MapDataWrapper : IMogoData {
|
||||
latch.await()
|
||||
return resultList
|
||||
}
|
||||
|
||||
override fun getCrossRoad(lon: Double, lat: Double, angle: Double): CrossRoad? {
|
||||
val latch = CountDownLatch(1)
|
||||
val temp = AtomicReference<CrossRoad>()
|
||||
MapDataApi.getCrossRoad(lon, lat, angle.toFloat(), object : IResult<RoadCross> {
|
||||
|
||||
override fun result(code: Int, result: RoadCross?) {
|
||||
temp.set(CrossRoad(result?.status ?: 0, result?.tile_id ?: "", result?.cross_id ?: "", result?.tile_id_end ?: "", result?.cross_id_end ?: ""))
|
||||
latch.countDown()
|
||||
}
|
||||
})
|
||||
latch.await()
|
||||
return temp.get()
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class MogoIdentifyManager implements IMogoIdentifyManager {
|
||||
@Override
|
||||
public void removeMarker(String uuidString, String mapInstance) {
|
||||
try {
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(MogoMap.DEFAULT);
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(mapInstance);
|
||||
if(iMogoMap != null){
|
||||
iMogoMap.removeMarker(uuidString);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class MogoIdentifyManager implements IMogoIdentifyManager {
|
||||
@Override
|
||||
public void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList, String mapInstance) {
|
||||
try {
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(MogoMap.DEFAULT);
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(mapInstance);
|
||||
if(iMogoMap != null){
|
||||
iMogoMap.updateBatchMarkerPosition(optionsArrayList);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class MogoIdentifyManager implements IMogoIdentifyManager {
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList, String mapInstance) {
|
||||
try {
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(MogoMap.DEFAULT);
|
||||
IMogoMap iMogoMap = MogoMap.Companion.getMapInstance().getMogoMap(mapInstance);
|
||||
if(iMogoMap != null){
|
||||
iMogoMap.updateBatchAiMarkerPosition(optionsArrayList);
|
||||
}
|
||||
|
||||