Merge branch 'dev_arch_opt_3.0' into dev_robosweeper-d_app-module_221230_1.1.0

# Conflicts:
#	OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperLimitingVelocityView.kt
#	OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java
#	OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml
This commit is contained in:
donghongyu
2023-01-31 17:25:18 +08:00
185 changed files with 2897 additions and 5656 deletions

View File

@@ -10,9 +10,9 @@ import mogo_msg.MogoReportMsg
import system_master.SystemStatusInfo
/**
* @author xiaoyuzhou
* @date 2021/9/30 5:48 下午
* 域控制器相关的回调监听
* @date 2021/9/30 5:48 下午
* @author xiaoyuzhou
*/
object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusListener>() {

View File

@@ -1,6 +1,58 @@
#### CallerAutoPilotStatusListenerManager 管理自动驾驶中的状态及参数信息
#### 管理与工控机相关的数据回掉
``` kotlin
/**
* 添加 监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun addListener(
tag: String,
listener: T
)
/**
* 在添加了监听后执行
*/
open fun doSomeAfterAddListener(tag: String, listener: T)
/**
* 删除监听
* @param tag 标记,用来注销监听使用
*/
fun removeListener(tag: String)
/**
* 删除监听
* @param listener 要删除的监听对象
*/
fun removeListener(listener: T)
```
CallerAutopilotActionsListenerManager
CallerAutopilotCarConfigListenerManager
CallerAutopilotIdentifyListenerManager
CallerAutoPilotManager
CallerAutopilotPointCloudListenerManager
CallerAutopilotRecordListenerManager
CallerAutopilotStatisticsListenerManager
CallerAutoPilotStatusListenerManager
CallerAutopilotVehicleStateListenerManager
CallerBatteryManagementSystemListenerManager
CallerChassisAccStateListenerManager
CallerChassisBrakeStateListenerManager
CallerChassisGearStateListenerManager
CallerChassisLamplightListenerManager
CallerChassisLocationGCJ20ListenerManager
CallerChassisLocationWGS84ListenerManager
CallerChassisSteeringStateListenerManager
CallerChassisThrottleStateListenerManager
CallerPlanningActionsListenerManager
CallerPlanningRottingListenerManager
CallerPlanningTrajectoryListenerManager
CallerRoboBusJinlvM1StatesListenerManager
CallerStartAutopilotFailedListenerManager
CallerSweeperFutianCleanSystemListenerManager
AutopilotStatusInfo
连接信息
实时经纬度、速度、车辆硬件状态
最后一次启动自动驾驶时候的启动参数 AutopilotControlParameters

View File

@@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Context
import android.view.View
import android.view.ViewGroup
import com.mogo.eagle.core.data.EnvConfig
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths
@@ -172,6 +173,10 @@ object CallerDevaToolsManager {
devaToolsProviderApi?.syncConfig()
}
fun getEnvConfig(): EnvConfig? {
return devaToolsProviderApi?.getEnvConfig()
}
fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit){
devaToolsProviderApi?.modifyCarInfo(callBack)
}

View File

@@ -1,23 +1,18 @@
package com.mogo.eagle.core.function.call.hmi
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_SLW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.zhjt.service_biz.BizConfig
/**
* @author xiaoyuzhou
@@ -37,42 +32,6 @@ object CallerHmiManager {
waringProviderApi?.displayEffects()
}
/**
* 隐藏 脉速表
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setSpeedChartViewVisibility(visibility: Int) {
waringProviderApi?.setSpeedChartViewVisibility(visibility)
}
/**
* 隐藏 自动驾驶触发 按钮
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setAutopilotStatusViewVisibility(visibility: Int) {
waringProviderApi?.setAutopilotStatusViewVisibility(visibility)
}
/**
* 隐藏 切换视角 按钮
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setPerspectiveSwitchViewVisibility(visibility: Int) {
waringProviderApi?.setPerspectiveSwitchViewVisibility(visibility)
}
/**
* 隐藏 工具箱 按钮
* @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
*/
fun setToolsViewVisibility(visibility: Int) {
waringProviderApi?.setToolsViewVisibility(visibility)
}
fun setCameraViewVisibility(visibility: Int) {
waringProviderApi?.setCameraViewVisibility(visibility)
}
/**
* 控制转向灯功能
*/
@@ -200,24 +159,6 @@ object CallerHmiManager {
waringProviderApi?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
}
/**
* 展示限速预警
*
* @param limitingSpeed 限速速度
* @param limitSpeedSource 限速来源 1:MAP, 2:RSU
*/
@BizConfig(V2I, "", BIZ_SLW)
fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
waringProviderApi?.showLimitingVelocity(limitingSpeed, limitSpeedSource)
}
/**
* 关闭限速预警
*/
fun disableLimitingVelocity() {
waringProviderApi?.disableLimitingVelocity()
}
/**
* 展示指定方位上的红框预警
* @param direction
@@ -346,14 +287,6 @@ object CallerHmiManager {
waringProviderApi?.setProxyTrafficLightView(view)
}
/**
* 设置 限速 代理View
* @param view
*/
fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
waringProviderApi?.setProxyLimitingSpeedView(view)
}
/**
* 展示工控机监控上报数据
* @param errorReportList 错误级别上报数据列表

View File

@@ -13,21 +13,9 @@ import java.util.concurrent.ConcurrentHashMap
object CallerMapLocationListenerManager : CallerBase<Any>() {
// 记录地图最后一次位置
@Volatile
private var mLocation: MogoLocation? = null
/**
* 记录最后一次高精坐标的位置
*/
private var mGpsLocation: MogoLocation? = null
// 存储所有注册了监听的对象invokeXXXX进行遍历回调将信息同步
private val mMapStyleChangeListeners: ConcurrentHashMap<String, IMoGoMapLocationListener> =
ConcurrentHashMap()
// 高精坐标回调
private val mGpsChangedListeners: ConcurrentHashMap<String, IMoGoMapLocationListener> = ConcurrentHashMap()
/**
* 获取当前经纬度
*/
@@ -35,103 +23,7 @@ object CallerMapLocationListenerManager : CallerBase<Any>() {
return mLocation
}
/**
* 获取当前高精坐标
*/
fun getCurrentGpsLocation(): MogoLocation? {
return mGpsLocation
}
/**
* 添加 地图样式改变 监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun addListener(tag: String, listener: IMoGoMapLocationListener, isGps: Boolean) {
if (!isGps) {
if (mMapStyleChangeListeners.containsKey(tag)) {
return
}
mMapStyleChangeListeners[tag] = listener
listener.onLocationChanged(mLocation, 0, isGps)
} else {
if (mGpsChangedListeners.containsKey(tag)) {
return
}
mGpsChangedListeners[tag] = listener
listener.onLocationChanged(mGpsLocation, 0, isGps)
}
}
/**
* 删除 地图样式改变 监听
* @param tag 标记,用来注销监听使用
*/
fun removeListener(tag: String, isGps: Boolean) {
if (!isGps) {
if (!mMapStyleChangeListeners.containsKey(tag)) {
return
}
mMapStyleChangeListeners.remove(tag)
} else {
if (!mGpsChangedListeners.containsKey(tag)) {
return
}
mGpsChangedListeners.remove(tag)
}
}
/**
* 删除 地图样式改变 监听
* @param listener 要删除的监听对象
*/
fun removeListener(listener: IMoGoMapLocationListener, isGps: Boolean) {
if (!isGps) {
if (!mMapStyleChangeListeners.containsValue(listener)) {
return
}
mMapStyleChangeListeners.forEach {
if (it.value == listener) {
mMapStyleChangeListeners.remove(it.key)
}
}
} else {
if (!mGpsChangedListeners.containsValue(listener)) {
return
}
mGpsChangedListeners.forEach {
if (it.value == listener) {
mGpsChangedListeners.remove(it.key)
}
}
}
}
/**
* 触发 地图样式改变 监听
*/
fun invokeMapLocationChangeListener() {
invokeMapLocationChangeListener(mLocation, 0, false)
}
/**
* 触发 地图样式改变 监听
* @param location 选中状态
*/
fun invokeMapLocationChangeListener(location: MogoLocation?, from: Int, isGps: Boolean) {
if (!isGps) {
mLocation = location
mMapStyleChangeListeners.forEach {
val listener = it.value
listener.onLocationChanged(location, from, isGps)
}
} else {
mGpsLocation = location
mGpsChangedListeners.forEach {
it.value.onLocationChanged(location, from, isGps)
}
}
fun setCurrentLocation(location: MogoLocation) {
mLocation = location
}
}

View File

@@ -12,6 +12,7 @@ import androidx.lifecycle.LifecycleOwner
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.*
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleOwner
@@ -23,6 +24,7 @@ import com.zhidaoauto.map.sdk.open.tools.MapTools
import kotlinx.coroutines.*
import kotlinx.coroutines.android.asCoroutineDispatcher
import kotlinx.coroutines.internal.synchronized
import mogo.telematics.pad.MessagePad.GnssInfo
import java.util.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeUnit.SECONDS
@@ -63,7 +65,7 @@ object CallerVisualAngleManager {
val displayThreshold: Long //最大展示时长 > 0; 表示最长展示多长时间, -1 表示,一直展示,直到触发默认视角, 0: 默认视角专用值,
}
private val triggerLocation = AtomicReference<MogoLocation>()
private val triggerLocation = AtomicReference<GnssInfo>()
private val distanceOfCarToStopLine = AtomicReference(0.0)
@@ -76,7 +78,7 @@ object CallerVisualAngleManager {
override fun onRoadIdInfo(roadId: String) {
this.roadId.set(roadId)
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId")
val loc = CallerMapLocationListenerManager.getCurrentLocation()
val loc = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
var triggerClose = false
val distance = distanceOfCarToStopLine.get() + 5
if (hasCrossRoad && distance > 0) {
@@ -109,7 +111,7 @@ object CallerVisualAngleManager {
hasCrossRoad = true
triggerRoadId.set(this.roadId.get())
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
triggerLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
triggerLocation.set(CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02())
changeVisualAngle(CrossRoad(true))
}
}

View File

@@ -0,0 +1,30 @@
package com.mogo.eagle.core.function.call.msgbox
import androidx.annotation.Nullable
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.concurrent.ConcurrentHashMap
/**
* @author XuXinChao
* @date 2023/1/16
* 消息盒子事件监听管理
*/
object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
private val statusListeners: ConcurrentHashMap<String, IMsgBoxEventListener> =
ConcurrentHashMap()
/**
* 触发监听
*/
fun invokeListener(){
statusListeners.forEach {
val tag = it.key
val listener = it.value
listener.onSummaryClickEvent()
}
}
}

View File

@@ -0,0 +1,25 @@
package com.mogo.eagle.core.function.call.startup
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.startup.IStartUpProvider
import com.mogo.eagle.core.function.call.base.CallerBase
object CallerStartUpManager {
private val TAG = "CallerStartUpManager"
private val providerApi: IStartUpProvider?
get() = CallerBase.getApiInstance(
IStartUpProvider::class.java,
MogoServicePaths.PATH_STARTUP_PROVIDER
)
@JvmStatic
fun initStageOne() {
providerApi?.initStageOne()
}
@JvmStatic
fun initStageTwo() {
providerApi?.initStageTwo()
}
}

View File

@@ -1,29 +0,0 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 限速信息监听
*/
object CallLimitingVelocityListenerManager : CallerBase<LimitingVelocityListener>() {
private const val TAG = "CallLimitingVelocityListenerManager"
private var mCurrentLimitingVelocity = 0
override fun doSomeAfterAddListener(tag: String, listener: LimitingVelocityListener) {
listener.onLimitingVelocityChange(mCurrentLimitingVelocity)
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int) {
this.mCurrentLimitingVelocity = limitingVelocity
M_LISTENERS.forEach {
val tag = it.key
//LogUtils.dTag(TAG, "invokeOnLimitingVelocityChange tag is : $tag")
val listener = it.value
listener.onLimitingVelocityChange(limitingVelocity)
}
}
}

View File

@@ -1,26 +0,0 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.function.api.v2x.ObuLimitingSpeedListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.concurrent.ConcurrentHashMap
/**
* 限速信息监听
*/
object CallObuLimitingSpeedListenerManager : CallerBase<ObuLimitingSpeedListener>(){
private const val TAG = "CallObuLimitingSpeedListenerManager"
private val M_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap<String, ObuLimitingSpeedListener> =
ConcurrentHashMap()
private var mObuLimitSpeed = 0
fun invokeOnObuLimitingSpeedChange(limitingSpeed: Int) {
this.mObuLimitSpeed = limitingSpeed
M_TRAFFIC_LIGHT_LISTENER.forEach {
val tag = it.key
val listener = it.value
listener.onObuLimitingSpeedChange(limitingSpeed)
}
}
}

View File

@@ -0,0 +1,28 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 限速信息监听
*/
object CallerLimitingVelocityListenerManager : CallerBase<ILimitingVelocityListener>() {
private var mCurrentLimitingVelocity = 0
private var sourceType = DataSourceType.DEFAULT
override fun doSomeAfterAddListener(tag: String, listener: ILimitingVelocityListener) {
listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
this.mCurrentLimitingVelocity = limitingVelocity
this.sourceType = sourceType
M_LISTENERS.forEach {
val listener = it.value
listener.onLimitingVelocityChange(limitingVelocity, sourceType)
}
}
}

View File

@@ -0,0 +1,28 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 限速信息监听
*/
object CallerViewLimitingVelocityListenerManager : CallerBase<ILimitingVelocityListener>() {
private var mCurrentLimitingVelocity = 0
private var sourceType = DataSourceType.DEFAULT
override fun doSomeAfterAddListener(tag: String, listener: ILimitingVelocityListener) {
listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
this.mCurrentLimitingVelocity = limitingVelocity
this.sourceType = sourceType
M_LISTENERS.forEach {
val listener = it.value
listener.onLimitingVelocityChange(limitingVelocity, sourceType)
}
}
}