Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into 'dev_robotaxi-d-app-module_282_220707_2.8.2'

# Conflicts:
#   core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
#   core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt
This commit is contained in:
pangfan
2022-07-25 09:38:11 +00:00
330 changed files with 6283 additions and 1849 deletions

View File

@@ -3,6 +3,8 @@ package com.mogo.eagle.core.function.call.autopilot
import androidx.annotation.Nullable
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
import com.mogo.eagle.core.function.call.base.CallerBase
import mogo.telematics.pad.MessagePad
import rule_segement.MogoPointCloudOuterClass
import java.util.concurrent.ConcurrentHashMap
/**
@@ -13,11 +15,11 @@ import java.util.concurrent.ConcurrentHashMap
object CallerAutopilotPointCloudListenerManager : CallerBase() {
// 存储所有注册了监听的对象invokeXXXX进行遍历回调将信息同步
private val M_AUTOPILOT_IDENTIFY_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotPointCloudListener> =
private val M_POINT_CLOUD_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotPointCloudListener> =
ConcurrentHashMap()
/**
* 添加 域控制器感知数据 监听
* 添加 点云数据 监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
@@ -25,10 +27,10 @@ object CallerAutopilotPointCloudListenerManager : CallerBase() {
@Nullable tag: String,
@Nullable listener: IMoGoAutopilotPointCloudListener
) {
if (M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) {
if (M_POINT_CLOUD_LISTENERS.containsKey(tag)) {
return
}
M_AUTOPILOT_IDENTIFY_LISTENERS[tag] = listener
M_POINT_CLOUD_LISTENERS[tag] = listener
}
/**
@@ -36,34 +38,46 @@ object CallerAutopilotPointCloudListenerManager : CallerBase() {
* @param tag 标记,用来注销监听使用
*/
fun removeListener(@Nullable tag: String) {
if (!M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) {
if (!M_POINT_CLOUD_LISTENERS.containsKey(tag)) {
return
}
M_AUTOPILOT_IDENTIFY_LISTENERS.remove(tag)
M_POINT_CLOUD_LISTENERS.remove(tag)
}
/**
* 删除自动驾驶按钮选中监听
* 删除 点云数据 监听
* @param listener 要删除的监听对象
*/
fun removeListener(@Nullable listener: IMoGoAutopilotPointCloudListener) {
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
M_POINT_CLOUD_LISTENERS.forEach {
if (it.value == listener) {
M_AUTOPILOT_IDENTIFY_LISTENERS.remove(it.key)
M_POINT_CLOUD_LISTENERS.remove(it.key)
}
}
}
/**
* 识别交通元素数据发生更新 回调
* 点云数据 回调
*/
@Synchronized
fun invokeAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
M_POINT_CLOUD_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotPointCloudDataUpdate(pointCloud)
}
}
/**
* 点云数据 回调
*/
@Synchronized
fun invokeAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
M_POINT_CLOUD_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotPointCloudDataUpdate(header, pointCloud)
}
}
}

View File

@@ -4,6 +4,7 @@ import androidx.annotation.Nullable
import chassis.Chassis
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
import mogo.telematics.pad.MessagePad
import java.util.concurrent.ConcurrentHashMap
/**
@@ -100,6 +101,18 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
}
}
/**
* 车辆加速度
* acc 加速度
*/
fun invokeAutopilotAcc(carAcc: Float){
M_AUTOPILOT_VEHICLE_LISTENERS.forEach{
val listener = it.value
listener.onAutopilotAcc(carAcc)
}
}
/**
* 工控机时间回调
*/

View File

@@ -0,0 +1,62 @@
package com.mogo.eagle.core.function.call.cloud
import androidx.annotation.Nullable
import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
import java.util.concurrent.ConcurrentHashMap
object CallerCloudListenerManager {
private val M_CLOUD_LISTENER: ConcurrentHashMap<String, IMoGoCloudListener> =
ConcurrentHashMap()
/**
* 添加监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun registerCloudListener(
@Nullable tag: String,
@Nullable listener: IMoGoCloudListener
) {
if (M_CLOUD_LISTENER.containsKey(tag)) {
return
}
M_CLOUD_LISTENER[tag] = listener
}
/**
* 删除监听
* @param tag 标记,用来注销监听使用
*/
fun unRegisterCloudListener(@Nullable tag: String) {
if (!M_CLOUD_LISTENER.containsKey(tag)) {
return
}
M_CLOUD_LISTENER.remove(tag)
}
/**
* 删除监听
* @param listener 要删除的监听对象
*/
fun unRegisterCloudListener(@Nullable listener: IMoGoCloudListener) {
if (!M_CLOUD_LISTENER.containsValue(listener)) {
return
}
M_CLOUD_LISTENER.forEach {
if (it.value == listener) {
M_CLOUD_LISTENER.remove(it.key)
}
}
}
/**
* 分发获取到的设备sn
*/
fun invokeCloudTokenGot(sn: String) {
M_CLOUD_LISTENER.forEach {
val listener = it.value
listener.tokenGot(sn)
}
}
}

View File

@@ -301,6 +301,14 @@ object CallerHmiManager : CallerBase() {
waringProviderApi?.hideToolsView()
}
fun showSmallFragment() {
waringProviderApi?.showSmallFragment()
}
fun hideSmallFragment() {
waringProviderApi?.hideSmallFragment()
}
/**
*注册工控机升级提示圆点View的回调
* @param 提示圆点View
@@ -350,4 +358,8 @@ object CallerHmiManager : CallerBase() {
waringProviderApi?.showIPCReportWindow(reportList)
}
@JvmOverloads
fun showVideoDialog(url: String, isFlvUrl: Boolean = false) {
waringProviderApi?.showVideoDialog(url, isFlvUrl)
}
}

View File

@@ -19,6 +19,10 @@ object CallerMonitorManager {
providerApi.openCameraStream(cameraIp)
}
fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit) {
providerApi.openCameraStream(cameraIp, success, error)
}
fun disposeCameraStream() {
providerApi.disposeCameraStream()
}