[6.5.0][道路事件] 优化小智形象消失逻辑

This commit is contained in:
renwj
2024-07-24 15:36:14 +08:00
parent 2e96c2b3d8
commit d4da41c2eb
2 changed files with 19 additions and 19 deletions

View File

@@ -20,6 +20,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoV2nNioEventListener
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.START
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.STOP
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
@@ -189,6 +190,12 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), START)
}
scope.launch {
delay(5000)
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), STOP)
}
}
}
val ss = sb.toString()
val content = ss.substring(0, ss.indexOf("@@"))
@@ -250,6 +257,12 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE), START)
}
scope.launch {
delay(5000)
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE), STOP)
}
}
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt())
@@ -369,6 +382,12 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS), START)
}
scope.launch {
delay(5000)
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS), STOP)
}
}
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt())

View File

@@ -7,17 +7,13 @@ import android.os.HandlerThread
import android.os.Looper
import android.view.animation.DecelerateInterpolator
import androidx.core.util.Pair
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.STOP
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
@@ -132,11 +128,6 @@ class AiRoadMarker {
CallerHmiManager.dismissGreenWave()
} else {
CallerRoadV2NEventWindowListenerManager.dismiss(marker.id)
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP)
}
}
}
}
wrapper.addPoint(p)
@@ -305,11 +296,6 @@ class AiRoadMarker {
aiMakers.remove(id)?.also {
val m = it.marker.get()
CallerRoadV2NEventWindowListenerManager.dismiss(m.id)
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP)
}
}
}
}
MarkerRemoveManager.addMarker(wrapper)
@@ -339,11 +325,6 @@ class AiRoadMarker {
CallerHmiManager.dismissGreenWave()
} else {
MarkerRemoveManager.removeMarker(marker.id)
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
runCatching {
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP)
}
}
CallerRoadV2NEventWindowListenerManager.dismiss(marker.id)
}
}