Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

# Conflicts:
#	core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt
#	libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java
#	libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java
This commit is contained in:
yangyakun
2023-02-21 16:28:51 +08:00
34 changed files with 797 additions and 315 deletions

View File

@@ -415,4 +415,39 @@ object CallerAutoPilotControlManager {
providerApi?.setIsDrawPointCloud(isDrawPointCloud)
}
fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean {
return providerApi?.sendRoboBusJinlvM1FrontDoorCmd(switchCmd) ?: false
}
fun sendRoboBusJinlvM1AirConditionerCmd(
switchCmd: Int,
modeCmd: Int,
windSpeedCmd: Int,
temperatureCmd: Int
): Boolean {
return providerApi?.sendRoboBusJinlvM1AirConditionerCmd(switchCmd, modeCmd, windSpeedCmd, temperatureCmd) ?: false
}
fun sendRoboBusJinlvM1HeaderCmd(switchCmd: Int, windSpeedCmd: Int): Boolean {
return providerApi?.sendRoboBusJinlvM1HeaderCmd(switchCmd, windSpeedCmd) ?: false
}
fun sendRoboBusJinlvM1MainLamp1Cmd(switchCmd: Int): Boolean {
return providerApi?.sendRoboBusJinlvM1MainLamp1Cmd(switchCmd) ?: false
}
fun sendRoboBusJinlvM1MainLamp2Cmd(switchCmd: Int): Boolean {
return providerApi?.sendRoboBusJinlvM1MainLamp2Cmd(switchCmd) ?: false
}
/**
* 车门控制
*/
fun sendRoboBusJinlvM1SmallLampCmd(switchCmd: Int): Boolean {
return providerApi?.sendRoboBusJinlvM1SmallLampCmd(switchCmd) ?: false
}
fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean {
return providerApi?.sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd) ?: false
}
}

View File

@@ -4,7 +4,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisBrakeStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 车辆挂挡档位 回调监听
* 车辆刹车 回调监听
*/
object CallerChassisBrakeStateListenerManager : CallerBase<IMoGoChassisBrakeStateListener>() {

View File

@@ -5,12 +5,12 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 车辆挂档位 回调监听
* 车辆挂档位 回调监听
*/
object CallerChassisGearStateListenerManager : CallerBase<IMoGoChassisGearStateListener>() {
/**
* 车辆挂档位
* 车辆挂档位
* @param gear 档位
*/
fun invokeAutopilotGearData(gear: Chassis.GearPosition) {

View File

@@ -35,8 +35,6 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
setListenerHz(tag, callBackHz)
}
//todo 宏宇 添加HZ的移除操作
fun getChassisLocationGCJ02(): MogoLocation? {
return mGnssInfo
}

View File

@@ -70,6 +70,16 @@ open class CallerBase<T : Any> {
return
}
M_LISTENERS.remove(tag)
if (!M_LISTENERS_HZ.containsKey(tag)) {
return
}
M_LISTENERS_HZ.remove(tag)
if (!M_LISTENERS_HZ_LAST_SEND_TIME.containsKey(tag)) {
return
}
M_LISTENERS_HZ_LAST_SEND_TIME.remove(tag)
}
/**
@@ -83,6 +93,16 @@ open class CallerBase<T : Any> {
M_LISTENERS.forEach {
if (it.value == listener) {
M_LISTENERS.remove(it.key)
if (!M_LISTENERS_HZ.containsKey(it.key)) {
return
}
M_LISTENERS_HZ.remove(it.key)
if (!M_LISTENERS_HZ_LAST_SEND_TIME.containsKey(it.key)) {
return
}
M_LISTENERS_HZ_LAST_SEND_TIME.remove(it.key)
}
}
}

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.core.function.call.obu
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.obu.IMoGoObuSaveMessageListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuWarningRsiListener
import com.mogo.eagle.core.function.call.base.CallerBase
@@ -11,11 +12,11 @@ import com.mogo.support.obu.ObuScene
*/
object CallerObuSaveMessageListenerManager : CallerBase<IMoGoObuSaveMessageListener>() {
fun invokeObuSaveMessage(type: String, content: String, tts: String) {
fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuSaveMessage(type, content, tts)
listener.onMoGoObuSaveMessage(type, content, tts, sourceType)
}
}