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/fragment/BaseSweeperTabFragment.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperLimitingVelocityView.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java # OCH/mogo-och-sweeper/src/main/res/drawable/sweeper_list_left_top_line.xml # app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt # core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt # core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
This commit is contained in:
@@ -13,8 +13,6 @@ 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.IMoGoHmiViewProxy.IViewNotificationProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
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
|
||||
@@ -110,41 +108,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.setCloudWeaknessTraffic(isOpen)
|
||||
}
|
||||
|
||||
/**
|
||||
* 开关DebugView
|
||||
*/
|
||||
fun toggleDebugView() {
|
||||
waringProviderApi?.toggleDebugView()
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(
|
||||
v2xType: String,
|
||||
alertContent: CharSequence?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
listenerIMoGo: IMoGoWarningStatusListener?,
|
||||
playTts: Boolean,
|
||||
expireTime: Long = 5000L
|
||||
) {
|
||||
waringProviderApi?.showWarningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
tag,
|
||||
listenerIMoGo,
|
||||
playTts,
|
||||
expireTime
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
*/
|
||||
@@ -180,7 +143,7 @@ object CallerHmiManager {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
* @param lightSource 1:云端下发;2:自车感知;3:OBU
|
||||
*/
|
||||
fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) {
|
||||
waringProviderApi?.showWarningTrafficLight(checkLightId, lightSource)
|
||||
@@ -241,10 +204,11 @@ object CallerHmiManager {
|
||||
* 展示限速预警
|
||||
*
|
||||
* @param limitingSpeed 限速速度
|
||||
* @param limitSpeedSource 限速来源 1:MAP, 2:RSU
|
||||
*/
|
||||
@BizConfig(V2I, "", BIZ_SLW)
|
||||
fun showLimitingVelocity(limitingSpeed: Int) {
|
||||
waringProviderApi?.showLimitingVelocity(limitingSpeed)
|
||||
fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
waringProviderApi?.showLimitingVelocity(limitingSpeed, limitSpeedSource)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -297,13 +261,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.showNoticeNormalData(noticeNormal)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示VIP标识
|
||||
*/
|
||||
fun vipIdentification(visible: Boolean) {
|
||||
waringProviderApi?.vipIdentification(visible)
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启道路视频直播
|
||||
*/
|
||||
@@ -381,31 +338,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.hideSmallFragment()
|
||||
}
|
||||
|
||||
fun showMaskView() {
|
||||
waringProviderApi?.showMaskView()
|
||||
}
|
||||
|
||||
fun hideMaskView() {
|
||||
waringProviderApi?.hideMaskView()
|
||||
}
|
||||
|
||||
/**
|
||||
*注册工控机升级提示圆点View的回调
|
||||
* @param 提示圆点View
|
||||
*/
|
||||
fun registerUpgradeTipsCallback(tipsView: () -> View) {
|
||||
waringProviderApi?.registerUpgradeTipsCallback(tipsView)
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机重启返回结果
|
||||
* @param code
|
||||
* @param msg
|
||||
*/
|
||||
fun showDockerRebootResult(code: Int, msg: String) {
|
||||
waringProviderApi?.showDockerRebootResult(code, msg)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
* @param view
|
||||
@@ -422,14 +354,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.setProxyLimitingSpeedView(view)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 V2X弹窗预警 代理View
|
||||
* @param view
|
||||
*/
|
||||
fun setNotificationViewProvider(provider: IViewNotificationProvider) {
|
||||
waringProviderApi?.setViewNotificationProvider(provider)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示工控机监控上报数据
|
||||
* @param errorReportList 错误级别上报数据列表
|
||||
@@ -448,14 +372,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.showVideoDialog(infList)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 bus出车/收车View
|
||||
* @param view
|
||||
*/
|
||||
fun setBusOperationView(view: IOchBusView) {
|
||||
waringProviderApi?.setBusOperationView(view)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态栏暗夜或明亮模式
|
||||
* 默认 light
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import android.view.ViewGroup
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/23 10:22 上午
|
||||
* HMI 视图上的监听管理
|
||||
*/
|
||||
object CallerHmiViewControlListenerManager : CallerBase<IViewControlListener>() {
|
||||
|
||||
/**
|
||||
* 触发 view 显示隐藏
|
||||
* @param v 显示/隐藏状态
|
||||
*/
|
||||
fun invokeVisible(tag: String, v: Int) {
|
||||
M_LISTENERS[tag]?.visible(v)
|
||||
}
|
||||
|
||||
fun setStatusBarDarkOrLight(tag: String, light: Boolean) {
|
||||
M_LISTENERS[tag]?.setStatusBarDarkOrLight(light)
|
||||
}
|
||||
|
||||
fun updateStatusBarRightView(
|
||||
tag: String,
|
||||
insert: Boolean,
|
||||
viewTag: String,
|
||||
viewGroup: ViewGroup
|
||||
) {
|
||||
M_LISTENERS[tag]?.updateStatusBarRightView(insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
fun updateStatusBarLeftView(
|
||||
tag: String,
|
||||
insert: Boolean,
|
||||
viewTag: String,
|
||||
viewGroup: ViewGroup
|
||||
) {
|
||||
M_LISTENERS[tag]?.updateStatusBarLeftView(insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
fun updateStatusBarDownloadView(tag: String, insert: Boolean, viewTag: String, progress: Int) {
|
||||
M_LISTENERS[tag]?.updateStatusBarDownloadView(insert, tag, progress)
|
||||
}
|
||||
|
||||
fun updateMfStatus(tag: String, viewTag: String, status: Boolean) {
|
||||
M_LISTENERS[tag]?.updateMfStatus(viewTag, status)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import com.mogo.eagle.core.function.api.map.IMogoMapService
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.map.location.IMogoGDLocationClient
|
||||
import com.mogo.map.location.IMogoLocationClient
|
||||
import com.mogo.map.marker.IMogoMarkerManager
|
||||
import com.mogo.map.overlay.IMogoOverlayManager
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
@@ -23,11 +22,6 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.mapUIController
|
||||
}
|
||||
|
||||
//todo 改造,module-map中监听location定位回调,调用至地图更新,解除map-api对caller的依赖关系
|
||||
fun getSingletonLocationClient(context: Context): IMogoLocationClient? {
|
||||
return serviceProvider?.getSingletonLocationClient(context)
|
||||
}
|
||||
|
||||
fun getMarkerManager(context: Context): IMogoMarkerManager? {
|
||||
return serviceProvider?.getMarkerManager(context)
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.mogo.eagle.core.function.call.map
|
||||
import android.os.Looper
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider
|
||||
import com.mogo.eagle.core.function.api.v2x.IV2XEventProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
@@ -22,6 +24,10 @@ object CallerSmpManager : CallerBase<Any>() {
|
||||
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as IMogoSmallMapProvider
|
||||
|
||||
private val v2xProvider: IV2XEventProvider
|
||||
get() = ARouter.getInstance().build(MogoServicePaths.PATH_V2X_MODULE)
|
||||
.navigation() as IV2XEventProvider
|
||||
|
||||
/**
|
||||
* 绘制路径线
|
||||
*/
|
||||
@@ -58,9 +64,11 @@ object CallerSmpManager : CallerBase<Any>() {
|
||||
fun startQueryV2XEvents() {
|
||||
if (Thread.currentThread() !== Looper.getMainLooper().thread) {
|
||||
UiThreadHandler.post {
|
||||
v2xProvider.queryWholeRoadEvents()
|
||||
mogoOverViewMapProvider.startQueryV2XEvents()
|
||||
}
|
||||
} else {
|
||||
v2xProvider.queryWholeRoadEvents()
|
||||
mogoOverViewMapProvider.startQueryV2XEvents()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,9 +301,12 @@ object CallerVisualAngleManager {
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
|
||||
if (prev.priority == current.priority) {
|
||||
Log.d("${M_DEVA}${TAG}", "--- 9 --- 场景[$prev]正在展示,尚未收到关闭,优先级一致,直接return")
|
||||
return@launch
|
||||
}
|
||||
if (prev.priority > current.priority && prev.displayThreshold < 0) {
|
||||
Log.d("${M_DEVA}${TAG}", "--- 6 --- 场景[$prev]正在展示,尚未收到关闭,场景,依然展示当前场景,直接return")
|
||||
Log.d("${M_DEVA}${TAG}", "--- 10 --- 场景[$prev]正在展示,尚未收到关闭,场景,依然展示当前场景,直接return")
|
||||
return@launch
|
||||
}
|
||||
doRealVisualAngleChange(triggerTime, current, displayed)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
|
||||
object CallerObuTrafficLightListenerManager : CallerBase<IMoGoObuTrafficLightListener>() {
|
||||
|
||||
private val M_OBU_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap<String, IMoGoObuTrafficLightListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
var mLight: Int = 0
|
||||
|
||||
|
||||
fun invokeObuTrafficLight(light: Int) {
|
||||
this.mLight = light
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onObuTrafficLight(light)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.eagle.core.function.call.obucombine
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.api.obucombine.IMoGoObuDcCombineListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
* obu和dc数据通道 回调监听
|
||||
*/
|
||||
object CallerObuDcCombineListenerManager : CallerBase<IMoGoObuDcCombineListener>() {
|
||||
// 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步
|
||||
private val M_DC_COMBINE_LISTENERS: ConcurrentHashMap<String, IMoGoObuDcCombineListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
/**
|
||||
* 添加 obu和dc数据通道 监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
// fun addListener(
|
||||
// @Nullable tag: String,
|
||||
// @Nullable listener: IMoGoObuDcCombineListener
|
||||
// ) {
|
||||
// if (M_DC_COMBINE_LISTENERS.containsKey(tag)) {
|
||||
// return
|
||||
// }
|
||||
// M_DC_COMBINE_LISTENERS[tag] = listener
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
*/
|
||||
// fun removeListener(@Nullable tag: String) {
|
||||
// if (!M_DC_COMBINE_LISTENERS.containsKey(tag)) {
|
||||
// return
|
||||
// }
|
||||
// M_DC_COMBINE_LISTENERS.remove(tag)
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除自动驾驶按钮选中监听
|
||||
* @param listener 要删除的监听对象
|
||||
*/
|
||||
// fun removeListener(@Nullable listener: IMoGoObuDcCombineListener) {
|
||||
// M_DC_COMBINE_LISTENERS.forEach {
|
||||
// if (it.value == listener) {
|
||||
// M_DC_COMBINE_LISTENERS.remove(it.key)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* v2i数据
|
||||
*/
|
||||
fun invokeObuDcData(obuWarningData: ObuWarningEvent.ObuWarningData?){
|
||||
M_DC_COMBINE_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onMoGoObuDcCombineData(obuWarningData)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.trafficlight
|
||||
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.trafficlight.ITrafficLightProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerTrafficLightManager : CallerBase<Any>() {
|
||||
|
||||
fun getTrafficLightProvider(): ITrafficLightProvider {
|
||||
return getApiInstance(
|
||||
ITrafficLightProvider::class.java,
|
||||
MogoServicePaths.PATH_TRAFFIC_LIGHT
|
||||
)
|
||||
}
|
||||
|
||||
fun getTrafficLightCurrentState() {
|
||||
getTrafficLightProvider().getTrafficLightCurrentState()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user