[2.15.0] add opt code of roma
This commit is contained in:
@@ -26,8 +26,8 @@ class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
aiCloudIdentifyDataManager.initServer(AbsMogoApplication.getApp())
|
||||
}
|
||||
|
||||
override fun trigger(romaStatus: Boolean) {
|
||||
aiCloudIdentifyDataManager.trigger(romaStatus)
|
||||
override fun trigger(romaStatus: Boolean,connectError:((Boolean) -> Unit)?) {
|
||||
aiCloudIdentifyDataManager.trigger(romaStatus,connectError)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.business.ai
|
||||
import android.content.Context
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
@@ -87,8 +88,16 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
}
|
||||
}
|
||||
|
||||
fun trigger(romaStatus: Boolean) {
|
||||
fun trigger(romaStatus: Boolean,connectError: ((Boolean) -> Unit)?) {
|
||||
MapBizTrace.log(TAG, "trigger")
|
||||
if (serverSn.isEmpty()) {
|
||||
serverSn = CallerTelematicManager.getServerToken()
|
||||
if (serverSn.isEmpty()) {
|
||||
ToastUtils.showLong("未获取到司机屏设备信息")
|
||||
connectError?.invoke(!romaStatus)
|
||||
return
|
||||
}
|
||||
}
|
||||
// 乘客屏单独控制漫游
|
||||
if (romaStatus) {
|
||||
// 开启roma,当前非漫游,开启
|
||||
@@ -116,13 +125,6 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
}
|
||||
|
||||
private fun openRoma() {
|
||||
if (serverSn.isEmpty()) {
|
||||
serverSn = CallerTelematicManager.getServerToken()
|
||||
if (serverSn.isEmpty()) {
|
||||
ToastUtils.showLong("未获取到司机屏设备信息")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!MogoMapUIController.getInstance().currentMapVisualAngle.isRoma) {
|
||||
requestRangeOfIdentify(true)
|
||||
updateLongSightLevel(true)
|
||||
@@ -130,13 +132,6 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
}
|
||||
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
if (serverSn.isEmpty()) {
|
||||
serverSn = CallerTelematicManager.getServerToken()
|
||||
if (serverSn.isEmpty()) {
|
||||
ToastUtils.showLong("未获取到司机屏设备信息")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!showAiCloud.get()) {
|
||||
return
|
||||
}
|
||||
@@ -179,6 +174,9 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE, dataReceive:$dataReceive"
|
||||
)
|
||||
if(DebugConfig.isDebug()){
|
||||
ToastUtils.showShort("漫游请求异常,msg:$it")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user