Merge branch 'dev_robotaxi-d_230809_6.0.0' into 6.0.0merge2master

# Conflicts:
#	OCH/sweeper/sweeper-cloud/src/main/java/com/mogo/och/sweepercloud/model/SweeperTaskModel.java
#	libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java
#	libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/OnAdasListener.java
This commit is contained in:
yangyakun
2023-09-11 17:43:17 +08:00
3672 changed files with 38961 additions and 14144 deletions

View File

@@ -107,18 +107,41 @@ object CallerAutoPilotControlManager {
}
}
/**
* 发送 轨迹下载请求
* @param downloadType 下载类型: 0:正常下载 1:预下载
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType)
}
}
/**
* 结束自动驾驶
*/
fun cancelAutoPilot() {
// 司机屏才能取消自动驾驶
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.cancelAutoPilot()
// 更新记录在全局的控制参数
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null)
cancelAutoPilotInner()
}
}
/**
* 包车乘客屏 取消自驾(包车 乘客屏为中心)
*/
fun cancelAutoPilot4Passenger(){
if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) {
cancelAutoPilotInner()
}
}
private fun cancelAutoPilotInner() {
providerApi?.cancelAutoPilot()
// 更新记录在全局的控制参数
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null)
}
/**
* 开启域控制器录制bag包
*/
@@ -281,6 +304,48 @@ object CallerAutoPilotControlManager {
return providerApi?.sendWeakNetSlowDown(isEnable)
}
/**
* 故障减速停车策路开关
* isEnable = true 使用故障减速停车策略
* isEnable = false 关闭故障减速停车策略
* @return boolean
*/
fun sendBreakdownSlowDown(isEnable: Boolean): Boolean? {
return providerApi?.sendBreakdownSlowDown(isEnable)
}
/**
* 融合模式
*
* @param cmd 1:全融合模式 2:盲区模式 3:超视距模式 4:透传模式 5:纯路侧模式默认1
* @return boolean
*/
fun sendFusionMode(cmd: Int): Boolean? {
return providerApi?.sendFusionMode(cmd)
}
/**
* 批量设置参数命令
*
* @param param {@link AdasConstants.MapSystemParamType#DETOURING Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#DETOURING_SPEED Value类型double或double类型String}
* {@link AdasConstants.MapSystemParamType#AEB Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#LANE_CHANGE_RESTRAIN_VALID Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#STOP_YIELD_VALID Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#HADMAP_SPEED_LIMIT_VALID Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#RAMP_THETA_VALID Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#WEAK_NET_SLOW_DOWN Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#BREAKDOWN_SLOW_DOWN Value类型int或int类型String}
* {@link AdasConstants.MapSystemParamType#BLIND_AREA Value类型boolean或boolean类型String}
* {@link AdasConstants.MapSystemParamType#V2N_TO_PNC Value类型boolean或boolean类型String}
* {@link AdasConstants.MapSystemParamType#V2I_TO_PNC Value类型boolean或boolean类型String}
* {@link AdasConstants.MapSystemParamType#FUSION_MODE Value类型int或int类型String}
* @return boolean
*/
fun sendSetParamReq(param: Map<AdasConstants.MapSystemParamType, Any>): Boolean? {
return providerApi?.sendSetParamReq(param)
}
/**
* 获取全部参数
* 结果回调{@link OnAdasListener#onGetParamResp(MessagePad.Header, MessagePad.SetParamReq, AdasParam)}
@@ -298,8 +363,8 @@ object CallerAutoPilotControlManager {
* @param paramType 参数类型:libraries/mogo-adas-data/src/main/proto/personal/adas_constants.proto
* @return boolean
*/
fun sendGetParamReq(paramType: AdasConstants.MapSystemParamType): Boolean? {
return providerApi?.sendGetParamReq(paramType)
fun sendGetParamReq(vararg paramType: AdasConstants.MapSystemParamType): Boolean? {
return providerApi?.sendGetParamReq(*paramType)
}
/**
* 获取数据采集录制模式配置列表
@@ -330,13 +395,34 @@ object CallerAutoPilotControlManager {
}
/**
* 控制V2N数据给车端PnC
* @param switchCmd true为发给PnCfalse为不发给PnC
* 控制V2I进PnC
*
* @param switchCmd true发给Pnc和鹰眼false不发给PnC和鹰眼
* @return boolean
*/
fun sendV2iToPncCmd(switchCmd: Boolean){
providerApi?.sendV2iToPncCmd(switchCmd)
}
/**
* 控制V2N进PnC
*
* @param switchCmd true发给PnCfalse不发给PnC
* @return boolean
*/
fun sendV2nToPncCmd(switchCmd: Boolean){
providerApi?.sendV2nToPncCmd(switchCmd)
}
/**
* 盲区数据开关
*
* @param switchCmd 数据开关
* @return boolean
*/
fun sendBlindAreaCmd(switchCmd: Boolean){
providerApi?.sendBlindAreaCmd(switchCmd)
}
/**
* 向左变道
*/
@@ -407,13 +493,6 @@ object CallerAutoPilotControlManager {
providerApi?.setControlAutopilotCarAuto(isEnable)
}
/**
* 车机与工控机是否连上了
*/
fun isConnected(): Boolean {
return providerApi?.isConnected() ?: false
}
/**
* 查询工控机基础配置信息
*/

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.GsonUtils
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import system_master.SsmInfo
import system_master.SystemStatusInfo
import kotlin.properties.Delegates
@@ -82,7 +83,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
return mAutopilotStatusInfo.dockVersion
}
fun getConnectStates():Boolean{
fun isConnect():Boolean{
return mAutopilotStatusInfo.connectStatus
}
@@ -207,6 +208,19 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
}
}
/**
* 定频SSM
* 老版本 SSMSystemStatusInfo.StatusInfo HQ、M1 MAP350开始弃用其他车型MAP360开始弃用
*/
fun invokeSystemStatus(statusInf: SsmInfo.SsmStatusInf?) {
statusInf?.also {
M_LISTENERS.forEach { itx ->
val listener = itx.value
listener.onSystemStatus(it)
}
}
}
/**
* 更新自动驾驶控制参数结束自动驾驶时候需要更新为null且更新时候同时触发onAutopilotStatusResponse回调
*/

View File

@@ -2,18 +2,99 @@ package com.mogo.eagle.core.function.call.autopilot
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
import com.mogo.eagle.core.function.call.base.CallerBase
import com.zhjt.mogo.adas.data.bean.UnableAutopilotReason
/**
* pnc actions 决策 驾驶的意图
* 能否启动自驾管理类
*/
object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsListener>() {
@Volatile
private var isConnected = false
private var isAutopilotAbility: Boolean = false
private var unableAutopilotReasons: ArrayList<UnableAutopilotReason>? = null
@Synchronized
fun invokeAutopilotAbility(isAutopilotAbility: Boolean, unableAutopilotReason: String?) {
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReason)
init {
isAutopilotAbility = false
unableAutopilotReasons = disconnectedReason()
// printLog("初始化")
}
private fun disconnectedReason(): ArrayList<UnableAutopilotReason> {
val list = ArrayList<UnableAutopilotReason>()
list.add(UnableAutopilotReason(UnableAutopilotReason.SourceType.LIB, "未连接自动驾驶系统"))
return list
}
/**
* 能否启动自动驾驶
*/
fun isAutopilotAbility(): Boolean {
return isAutopilotAbility
}
/**
* 获取不能启动自驾的原因
* null表示没有任何原因证证明isAutopilotAbility为true
*/
fun getUnableAutopilotReasons(): ArrayList<UnableAutopilotReason>? {
return unableAutopilotReasons
}
fun setConnected(isConnected: Boolean) {
if (this.isConnected != isConnected) {
this.isConnected = isConnected
this.isAutopilotAbility = isConnected
unableAutopilotReasons = if (isConnected) null else disconnectedReason()
notification()
// printLog("更新数据 连接状态变更")
}
}
@Synchronized
fun invokeAutopilotAbility(
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableAutopilotReason>?
) {
if (isConnected) {
var isEquals: Boolean = true
if (unableAutopilotReasons != null && this.unableAutopilotReasons != null) {
unableAutopilotReasons.let { onw ->
onw.sortWith(compareBy(UnableAutopilotReason::hashCode));
this.unableAutopilotReasons?.let { old ->
old.sortWith(compareBy(UnableAutopilotReason::hashCode));
isEquals = onw.toTypedArray() contentEquals old.toTypedArray()
// Log.i(
// "ddd",
// "都不为null时=${isEquals}=${this.isAutopilotAbility} ${(if (this.unableAutopilotReasons == null) null else this.unableAutopilotReasons.toString())}"
// )
}
}
} else isEquals =
!(unableAutopilotReasons != null || this.unableAutopilotReasons != null)
// Log.i(
// "ddd",
// " 两个List是否相同=${isEquals} 新是否能启动自驾=${isAutopilotAbility} 老是否能启动自驾=${this.isAutopilotAbility} 新List是否为空=${unableAutopilotReasons == null} 老List是否为空=${this.unableAutopilotReasons == null}"
// )
if (this.isAutopilotAbility != isAutopilotAbility || !isEquals) {
this.isAutopilotAbility = isAutopilotAbility
this.unableAutopilotReasons = unableAutopilotReasons
notification()
// printLog("更新数据")
}
}
}
private fun notification() {
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons)
}
}
// fun printLog(tag: String) {
// Log.i(
// "xfk",
// "${tag}=${isAutopilotAbility} ${(if (unableAutopilotReasons == null) null else unableAutopilotReasons.toString())}"
// )
// }
}

View File

@@ -19,7 +19,6 @@ object CallerAutopilotIdentifyListenerManager : CallerBase<IMoGoAutopilotIdentif
@Synchronized
fun invokeAutopilotIdentifyDataUpdate(trafficData: List<MessagePad.TrackedObject>?) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotIdentifyDataUpdate(trafficData)
}
@@ -31,7 +30,6 @@ object CallerAutopilotIdentifyListenerManager : CallerBase<IMoGoAutopilotIdentif
@Synchronized
fun invokeAutopilotIdentifyPlanningObj(planningObjects: List<MessagePad.PlanningObject>?) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotIdentifyPlanningObj(planningObjects)
}
@@ -43,7 +41,6 @@ object CallerAutopilotIdentifyListenerManager : CallerBase<IMoGoAutopilotIdentif
@Synchronized
fun invokeAutopilotPerceptionTrafficLight(trafficLights: TrafficLightOuterClass.TrafficLights?) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotPerceptionTrafficLight(trafficLights)
}

View File

@@ -16,7 +16,6 @@ object CallerAutopilotPointCloudListenerManager : CallerBase<IMoGoAutopilotPoint
@Synchronized
fun invokeAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotPointCloudDataUpdate(pointCloud)
}

View File

@@ -18,7 +18,6 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
*/
fun invokeAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotRecordResult(recordPanel)
}
@@ -29,7 +28,6 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
*/
fun invokeAutopilotRecordConfig(config: MessagePad.RecordDataConfig) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotRecordConfig(config)
}
@@ -40,7 +38,6 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
*/
fun invokeBagManagerResult(bagManager: BagManagerOuterClass.BagManager){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBagManagerResult(bagManager)
}

View File

@@ -0,0 +1,109 @@
package com.mogo.eagle.core.function.call.autopilot
import chassis.Chassis
import chassis.VehicleStateOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisDoorStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.concurrent.CopyOnWriteArrayList
import kotlin.properties.Delegates
/**
* 车门数据 回调监听
*/
object CallerChassisDoorStateListenerManager : CallerBase<IMoGoChassisDoorStateListener>() {
private val listCache = CopyOnWriteArrayList<VehicleStateOuterClass.DoorStateV2>()
private var frontLeft by Delegates.observable(0) { _, oldV, newV ->
if (oldV != newV) {
invokeSingleDoorState(Chassis.DoorNumber.FRONT_LEFT, newV)
}
}
private var frontRight by Delegates.observable(0) { _, oldV, newV ->
if (oldV != newV) {
invokeSingleDoorState(Chassis.DoorNumber.FRONT_RIGHT, newV)
}
}
private var backLeft by Delegates.observable(0) { _, oldV, newV ->
if (oldV != newV) {
invokeSingleDoorState(Chassis.DoorNumber.REAR_LEFT, newV)
}
}
private var backRight by Delegates.observable(0) { _, oldV, newV ->
if (oldV != newV) {
invokeSingleDoorState(Chassis.DoorNumber.REAR_RIGHT, newV)
}
}
private var middle by Delegates.observable(0) { _, oldV, newV ->
if (oldV != newV) {
invokeSingleDoorState(Chassis.DoorNumber.MIDDLE, newV)
}
}
override fun doSomeAfterAddListener(tag: String, listener: IMoGoChassisDoorStateListener) {
super.doSomeAfterAddListener(tag, listener)
if (listCache.size > 0) {
listener.onAutopilotDoorState(listCache)
}
}
/**
* 车门状态
*/
fun invokeAutopilotDoorState(doorList: MutableList<VehicleStateOuterClass.DoorStateV2>) {
listCache.clear()
listCache.addAll(doorList)
doorList.forEach {
when (it.number.number) {
Chassis.DoorNumber.FRONT_LEFT.number -> frontLeft = it.status
Chassis.DoorNumber.FRONT_RIGHT.number -> frontRight = it.status
Chassis.DoorNumber.REAR_LEFT.number -> backLeft = it.status
Chassis.DoorNumber.REAR_RIGHT.number -> backRight = it.status
Chassis.DoorNumber.MIDDLE.number -> middle = it.status
else -> {}
}
}
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotDoorState(doorList)
}
}
@Synchronized
private fun invokeSingleDoorState(num: Chassis.DoorNumber, value: Int) {
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotSingleDoorState(num, value == 1)
}
}
/**
* 返回所有门状态
*/
fun getDoorList(): List<VehicleStateOuterClass.DoorStateV2>? {
return if (listCache.size > 0) listCache else null
}
/**
* 获取某个门的状态
* @param num
* @return true:开门false:关门
*/
fun getIndexDoorState(num: Chassis.DoorNumber): Boolean {
return when (num) {
Chassis.DoorNumber.FRONT_LEFT -> frontLeft == 1
Chassis.DoorNumber.FRONT_RIGHT -> frontRight == 1
Chassis.DoorNumber.REAR_LEFT -> backLeft == 1
Chassis.DoorNumber.REAR_RIGHT -> backRight == 1
Chassis.DoorNumber.MIDDLE -> middle == 1
else -> {
false
}
}
}
}

View File

@@ -18,7 +18,6 @@ object CallerChassisGnssListenerManager : CallerBase<IMoGoChassisGnssListener>()
@Synchronized
fun invokeChassisGnssListener(gnssInfo: MessagePad.GnssInfo) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onChassisGnss(gnssInfo)
}

View File

@@ -16,7 +16,6 @@ object CallerPlanningActionsListenerManager : CallerBase<IMoGoAutopilotPlanningA
@Synchronized
fun invokePNCActions(planningActionMsg: MessagePad.PlanningActionMsg) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.pncActions(planningActionMsg)
}

View File

@@ -34,7 +34,6 @@ object CallerPlanningRottingListenerManager : CallerBase<IMoGoPlanningRottingLis
fun invokeAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
this.globalPathResp = globalPathResp
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotRotting(globalPathResp)
}

View File

@@ -18,7 +18,6 @@ object CallerPlanningTrajectoryListenerManager : CallerBase<IMoGoPlanningTraject
@Synchronized
fun invokeAutopilotTrajectory(trajectoryInfo: MutableList<MessagePad.TrajectoryPoint>) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotTrajectory(trajectoryInfo)
}

View File

@@ -30,4 +30,11 @@ object CallerFuncBizListenerManager: CallerBase<IFuncBizProvider>() {
listener.onV2XEvents(v2XEventData)
}
}
fun invokeAttrZombieAnalyticsEvent(){
M_LISTENERS.forEach{
val listener = it.value
listener.onAttrZombieAnalyticsEvent()
}
}
}

View File

@@ -15,13 +15,13 @@ import org.jetbrains.annotations.TestOnly
object CallerChatManager: CallerBase<Any>() {
private val provider by lazy {
getApiInstance(IMoGoChatProvider::class.java, ChatConsts.CHAT_PROVIDER_PATH)?.chat()
getApiInstance(IMoGoChatProvider::class.java, ChatConsts.CHAT_PROVIDER_PATH).chat()
}
@TestOnly
@OptIn(ExperimentalCoroutinesApi::class)
fun call(ctx: Context , sn: String) {
val facade = provider ?: return
val facade = provider
facade
.call(ChatParams(sn))
.onEach {

View File

@@ -14,6 +14,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.mogo.eagle.core.function.api.devatools.apm.*
import com.mogo.eagle.core.function.api.devatools.block.*
import com.mogo.eagle.core.function.api.devatools.download.*
import com.mogo.eagle.core.function.api.devatools.logcat.*
import com.mogo.eagle.core.function.api.devatools.mofang.*
@@ -161,6 +162,13 @@ object CallerDevaToolsManager {
devaToolsProviderApi?.showReportListWindow(context,isShow)
}
/**
* 获取工控机异常上报列表展示状态
*/
fun getReportWindowStatus(): Boolean{
return devaToolsProviderApi?.getReportWindowStatus() ?: false
}
/**
* 下载指定包
*/
@@ -264,4 +272,6 @@ object CallerDevaToolsManager {
fun mofang(): IMoGoMoFangProvider? = devaToolsProviderApi?.mofang()
fun logcat(): IMoGoLogRecordProvider? = devaToolsProviderApi?.logRecord()
fun block(): IMoGoBlockProvider? = devaToolsProviderApi?.block()
}

View File

@@ -24,7 +24,6 @@ object CallerHmiListenerManager : CallerBase<IMoGoCheckAutoPilotBtnListener>() {
fun invokeCheckAutoPilotBtnListener(isChecked: Boolean) {
mIsChecked = isChecked
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onCheck(mIsChecked)
}
@@ -32,7 +31,6 @@ object CallerHmiListenerManager : CallerBase<IMoGoCheckAutoPilotBtnListener>() {
fun invokeHDDataCacheStatus(isCached: Boolean) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.updateHDDataCacheStatus(isCached)
}

View File

@@ -223,4 +223,33 @@ object CallerHmiManager {
fun showStatusSummaryDialog() {
hmiProviderApi?.showStatusSummaryDialog()
}
/**
* 展示红绿灯
*/
fun showTrafficLightView(){
hmiProviderApi?.showTrafficLightView()
}
/**
* 隐藏红绿灯
*/
fun hideTrafficLightView(){
hmiProviderApi?.hideTrafficLightView()
}
/**
* 展示转向灯
*/
fun showTurnLightView(){
hmiProviderApi?.showTurnLightView()
}
/**
* 隐藏转向灯
*/
fun hideTurnLightView(){
hmiProviderApi?.hideTurnLightView()
}
}

View File

@@ -15,7 +15,6 @@ object CallerGaoDeMapLocationListenerManager : CallerBase<IGaoDeMapLocationListe
@Synchronized
fun invokeMoGoLocationChanged(location: MogoLocation) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoLocationChanged(location)
}

View File

@@ -25,9 +25,16 @@ object CallerMapRomaListener : CallerBase<IMoGoRomaListener>() {
fun invokeMapRoma(romaStatus: Boolean) {
roma = romaStatus
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.romaStatus(romaStatus)
}
}
fun invokeRomaDistance(distance: String) {
M_LISTENERS.forEach {
val listener = it.value
listener.romaDistance(distance)
}
}
}

View File

@@ -38,7 +38,6 @@ object CallerMapStyleListenerManager : CallerBase<IMoGoMapStyleChangeListener>()
fun invokeMapStyleChange(mapStyleMode: Int) {
mMapStyleMode = mapStyleMode
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMapStyleModeChange(mMapStyleMode)
}

View File

@@ -15,9 +15,6 @@ object CallerVisualAngleManager {
.navigation() as? IMoGoVisualAngleChangeProvider
}
@Volatile
private var isVisualAngleChanged = false
fun init() {
provider?.let {
Log.d("CallerVisualAngle", "--- init ---")
@@ -32,18 +29,4 @@ object CallerVisualAngleManager {
fun updateLongSightLevel(level: Boolean) {
provider?.updateLongSightLevel(level)
}
fun showTurning(open: Boolean) {
if (open) {
if (!isVisualAngleChanged) {
isVisualAngleChanged = true
changeAngle(Turning(true))
}
} else {
if (isVisualAngleChanged) {
isVisualAngleChanged = false
changeAngle(Turning(false))
}
}
}
}

View File

@@ -16,7 +16,6 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
*/
fun invokeSummaryListener(){
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onSummaryClickEvent()
}
@@ -27,7 +26,6 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
*/
fun invokeUpdateTipListener(isShow: Boolean){
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onUpdateTipEvent(isShow)
}
@@ -38,7 +36,6 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
**/
fun invokeBubbleOperationListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleOperationClickEvent(msgBoxBean)
}
@@ -49,7 +46,6 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
*/
fun invokeBubbleV2XListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleV2XClickEvent(msgBoxBean)
}
@@ -60,7 +56,6 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
*/
fun invokeBubbleReportListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleReportClickEvent(msgBoxBean)
}

View File

@@ -21,7 +21,6 @@ object CallerMsgBoxListenerManager : CallerBase<IMsgBoxListener>() {
*/
fun invokeListener(category: MsgCategory, msgBox: MsgBoxBean) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onDataChanged(category, msgBox)
}

View File

@@ -49,7 +49,6 @@ object CallerObuConnectListenerManager : CallerBase<IMoGoObuConnectListener>() {
fun invokeObuConnectListener(obuStatusInfo: ObuStatusInfo) {
mObuStatusInfo = obuStatusInfo
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onConnectStatus(mObuStatusInfo)
}

View File

@@ -11,7 +11,6 @@ object CallerObuLocationWGS84ListenerManager : CallerBase<IMoGoObuLocationWGS84L
fun invokeObuLocationWGS84(data: MessagePad.GnssInfo) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onObuLocationWGS84(data)
}

View File

@@ -11,7 +11,6 @@ object CallerObuMapMathListenerManager : CallerBase<IMoGoObuWarningMapListener>(
fun invokeObuMapMath(data: ObuScene.MapMatchData) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuMapMath(data)
}

View File

@@ -1,10 +1,9 @@
package com.mogo.eagle.core.function.call.obu
import com.mogo.eagle.core.data.enums.CommunicationType
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuSaveMessageListener
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsiListener
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.support.obu.ObuScene
/**
* OBU 保存到数据中心,展示在消息盒子的数据
@@ -12,11 +11,10 @@ import com.mogo.support.obu.ObuScene
*/
object CallerObuSaveMessageListenerManager : CallerBase<IMoGoObuSaveMessageListener>() {
fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) {
fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType,communicationType: CommunicationType) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuSaveMessage(type, content, tts, sourceType)
listener.onMoGoObuSaveMessage(type, content, tts, sourceType,communicationType)
}
}

View File

@@ -14,7 +14,6 @@ object CallerObuWarningListenerManager : CallerBase<IMoGoObuStatusListener>() {
fun invokeDelayTime(delayTime: Long) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onObuV2iDelayTime(delayTime)
}

View File

@@ -11,7 +11,6 @@ object CallerObuWarningRsiListenerManager : CallerBase<IMoGoObuWarningRsiListene
fun invokeObuRsiWarning(data: ObuScene.RsiWarningData) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuRsiWarning(data)
}

View File

@@ -11,7 +11,6 @@ object CallerObuWarningRsmListenerManager : CallerBase<IMoGoObuWarningRsmListene
fun invokeObuRsmWarning(data: ObuScene.RsmWarningData) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuRsmWarning(data)
}

View File

@@ -11,7 +11,6 @@ object CallerObuWarningRvListenerManager : CallerBase<IMoGoObuWarningRvListener>
fun invokeObuRvWarning(data: MogoObuRvWarningData) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuRvWarning(data)
}

View File

@@ -11,7 +11,6 @@ object CallerObuWarningSpatListenerManager : CallerBase<IMoGoObuWarningSpatListe
fun invokeObuSpatWarning(data: ObuScene.SpatWarningData) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuSpatWarning(data)
}

View File

@@ -12,7 +12,6 @@ object CallerOrderListenerManager: CallerBase<IOrderListener>() {
fun invokeOrderStatus(inOrder: Boolean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onUpdateOrderStatus(inOrder)
}
@@ -20,7 +19,6 @@ object CallerOrderListenerManager: CallerBase<IOrderListener>() {
fun invokeOrderRemoval(){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onOrderRemoval()
}

View File

@@ -0,0 +1,25 @@
package com.mogo.eagle.core.function.call.setting
import com.mogo.eagle.core.function.api.setting.IMoGoRequestActivityHandler
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 仅为了view在操作时无权限时申请比activity启动早的请求 需要统一调度在activity中request
*/
object CallerRequestActivityHandleManager : CallerBase<IMoGoRequestActivityHandler>() {
fun requestPermission(tag: String, permission: String) {
M_LISTENERS.forEach {
val listener = it.value
listener.handleRequestPermission(tag, permission)
}
}
fun requestLight(percent:Float){
M_LISTENERS.forEach {
val listener = it.value
listener.handleRequestLight(percent)
}
}
}

View File

@@ -20,7 +20,6 @@ object CallerSkinModeListenerManager : CallerBase<IMoGoSkinModeChangeListener>()
*/
fun invokeListener(skinMode: Int) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onSkinModeChange(skinMode)
}

View File

@@ -14,7 +14,6 @@ object CallVipSetListenerManager : CallerBase<IMoGoVipSetListener>() {
fun invokeVipSetStatus(vipStatus: Boolean) {
vipSet = vipStatus
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onVipSet(vipStatus)
}

View File

@@ -71,10 +71,10 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
}
}
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) {
M_LISTENERS.forEach {
val listener = it.value
listener.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
listener.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum)
}
}

View File

@@ -0,0 +1,20 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 转向灯事件管理
*/
object CallerTurnLightListenerManager: CallerBase<IMoGoTurnLightListener>() {
/**
* 隐藏转向灯
*/
fun invokeHideTurnLightView(){
M_LISTENERS.forEach {
val listener = it.value
listener.hideTurnLightView()
}
}
}