Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
# Conflicts: # app/productFlavors/fOchBusPassengerM1.gradle
This commit is contained in:
@@ -41,6 +41,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
private const val MSG_SOCKET_TYPE = 501000
|
||||
private const val MSG_TYPE_SHOW_DIALOG = 0
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_STATUS = 1
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING = 2
|
||||
|
||||
val dispatchAutoPilotManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
DispatchAutoPilotManager()
|
||||
@@ -68,6 +69,16 @@ class DispatchAutoPilotManager private constructor() :
|
||||
getAutoPilotStatusInfo().reason
|
||||
)
|
||||
sendEmptyMessageDelayed(MSG_TYPE_UPLOAD_AUTOPILOT_STATUS, 1000L)
|
||||
} else if(msg.what == MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING){
|
||||
val data = msg.obj as MessagePad.GlobalPathResp
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in data.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,14 +176,10 @@ class DispatchAutoPilotManager private constructor() :
|
||||
if (globalPathResp == null || globalPathResp.wayPointsList.isEmpty()) {
|
||||
return
|
||||
}
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in globalPathResp.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
val message = Message()
|
||||
message.what = MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING
|
||||
message.obj = globalPathResp
|
||||
handler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
|
||||
@@ -76,7 +76,7 @@ class DispatchServiceModel private constructor() {
|
||||
fun uploadAutopilotRoute(list: List<RouteModels?>?) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
val reportedRoute = ReportedRoute(sn, GsonUtil.jsonFromObject(list))
|
||||
val map: MutableMap<String, Any> = HashMap()
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
map["sn"] = sn
|
||||
map["data"] = GsonUtil.jsonFromObject(reportedRoute)
|
||||
mAdasApiService.uploadAutopilotRoute(map)
|
||||
|
||||
@@ -15,7 +15,7 @@ interface IDispatchAdasApiService {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("eagle-eye-dns/eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, Any>): Observable<BaseData>
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, String>): Observable<BaseData>
|
||||
|
||||
/**
|
||||
* 上报自动驾驶调度处理结果 服务于业务调度
|
||||
|
||||
@@ -748,27 +748,29 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
override fun connectSpecifiedServer(ip: String) {
|
||||
NSDNettyManager.getInstance().connectSpecifiedServer(
|
||||
ip,
|
||||
NettyTcpServer.SERVER_PORT,
|
||||
MoGoAiCloudClientConfig.getInstance().sn,
|
||||
object : NettyClientListener<MogoProtocolMsg> {
|
||||
override fun onMessageResponseClient(
|
||||
msg: MogoProtocolMsg?,
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
msgHandler.handleMsgFromServer(msg, channel)
|
||||
}
|
||||
ThreadUtils.getIoPool().submit {
|
||||
NSDNettyManager.getInstance().connectSpecifiedServer(
|
||||
ip,
|
||||
NettyTcpServer.SERVER_PORT,
|
||||
MoGoAiCloudClientConfig.getInstance().sn,
|
||||
object : NettyClientListener<MogoProtocolMsg> {
|
||||
override fun onMessageResponseClient(
|
||||
msg: MogoProtocolMsg?,
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
msgHandler.handleMsgFromServer(msg, channel)
|
||||
}
|
||||
|
||||
override fun onClientStatusConnectChanged(
|
||||
statusCode: Int,
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
msgHandler.handleClientConnStatus(statusCode, sign, channel)
|
||||
}
|
||||
})
|
||||
override fun onClientStatusConnectChanged(
|
||||
statusCode: Int,
|
||||
sign: String?,
|
||||
channel: Channel
|
||||
) {
|
||||
msgHandler.handleClientConnStatus(statusCode, sign, channel)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -684,12 +684,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
when (appId) {
|
||||
//前向碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.FCW.toString() -> {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion && level == 3) {
|
||||
alertContent = "前车距离过近"
|
||||
ttsContent = "前车距离过近"
|
||||
CallerObuWarningListenerManager.invokeTrackerFusionData(
|
||||
ObuManager.getInstance().obuRvToTrackedObject(info)
|
||||
)
|
||||
} else {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
|
||||
@@ -172,8 +172,10 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
* obu的升级,只需要司机屏连接
|
||||
*/
|
||||
fun queryObuUpgrade(obuVersionName: String) {
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
|
||||
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
|
||||
if (screenType == 1) {
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
|
||||
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -163,18 +163,26 @@ class BindingCarNetWorkManager private constructor() {
|
||||
}
|
||||
d(SceneConstant.M_BINDING + TAG, "updateCarVrIconRes : $brandId")
|
||||
when (brandId) {
|
||||
"1" -> {
|
||||
"1" -> { //东风
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
}
|
||||
"2" -> {
|
||||
"2" -> { //红旗
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.hq_h9)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.hq_h9
|
||||
}
|
||||
"3" -> {
|
||||
"3" -> { //金旅
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
}
|
||||
"4" -> { //开沃
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
}
|
||||
"5" -> { //福田
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.huanwei)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
|
||||
}
|
||||
else -> {
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
@@ -186,6 +194,8 @@ class BindingCarNetWorkManager private constructor() {
|
||||
return when (HdMapBuildConfig.currentCarVrIconRes) {
|
||||
R.raw.chuzuche -> "1"
|
||||
R.raw.xiaobache -> "3"
|
||||
R.raw.xiaobache -> "4"
|
||||
R.raw.huanwei -> "5"
|
||||
else -> "1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,14 +410,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//展示OBU控制中心
|
||||
obuControllerLayout.visibility = View.VISIBLE
|
||||
tbVehicleStateController.isChecked = true
|
||||
//展示HMI控制中心
|
||||
hmiObuLayout.visibility = View.VISIBLE
|
||||
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏OBU控制中心
|
||||
obuControllerLayout.visibility = View.GONE
|
||||
tbVehicleStateController.isChecked = false
|
||||
hmiObuLayout.visibility = View.GONE
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1059,29 +1058,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowSnBindingView = !isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
|
||||
// 默认开启
|
||||
HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
|
||||
// 默认关闭
|
||||
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 限速数据,优先使用obu,默认打开
|
||||
*/
|
||||
tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时加速度面板控制
|
||||
*/
|
||||
@@ -1657,6 +1633,28 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
//obu TODO 后面会添加很多os那边需要显示的内容
|
||||
obuVersionNameTv.text = Html.fromHtml(
|
||||
"OBU版本号:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
"<font color='blue'> 1.0"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
}
|
||||
}"
|
||||
)
|
||||
|
||||
obuConnectStatusTv.text = Html.fromHtml(
|
||||
"OBU连接状态:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
}
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,13 +6,11 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.main.AppListActivity
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -41,11 +39,8 @@ class VersionNameView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
}
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
|
||||
// 调试入口,应对M1、M2没有安装Launcher的情况
|
||||
setOnLongClickListener {
|
||||
@@ -72,7 +67,7 @@ class VersionNameView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
tvMapVersionName?.let {
|
||||
if (!dockerVersion.isNullOrEmpty()) {
|
||||
it.text = " ; MAP:${dockerVersion}"
|
||||
it.text = "MAP:${dockerVersion}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,18 +75,12 @@ class VersionNameView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
|
||||
@@ -1078,64 +1078,47 @@
|
||||
android:id="@+id/tvObuInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_margin="@dimen/dp_5"
|
||||
android:minLines="4"
|
||||
android:text="OBU配置信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/obuDivider" />
|
||||
|
||||
<View
|
||||
android:id="@+id/obuDivider2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvObuInfo" />
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/hmiObuLayout"
|
||||
<LinearLayout
|
||||
android:id="@+id/obuStatusCenterLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintTop_toBottomOf="@id/obuDivider2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvObuInfo"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuWeaknessTraffic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="关闭路侧弱势群体预警"
|
||||
android:textOn="打开路侧弱势群体预警"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
<TextView
|
||||
android:id="@+id/obuVersionNameTv"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCloudWeaknessTraffic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="开启云端弱势群体预警"
|
||||
android:textOn="关闭云端弱势群体预警"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbRoadLimitSpeed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="获取路侧限速提醒"
|
||||
android:textOn="关闭路侧限速提醒"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
<TextView
|
||||
android:id="@+id/obuConnectStatusTv"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</GridLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- OBU 配置 end -->
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersionName"
|
||||
@@ -10,6 +10,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:textColor="#FFBEC6EF"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -18,6 +19,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:textColor="#FFBEC6EF"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -102,7 +102,6 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
@SuppressLint("NewApi")
|
||||
private fun filterTrafficData(trafficData: List<TrackedObject>): HashMap<String, TrackedObject> {
|
||||
mFilterTrafficData.clear()
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
// 过滤掉未知感知数据
|
||||
if (TrackerSourceColorHelper.filterData(data)) {
|
||||
@@ -110,13 +109,12 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
}
|
||||
var temp: TrackedObject = data
|
||||
val uuid = "" + data.uuid
|
||||
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
|
||||
val cacheData = mMarkersCaches[uuid]
|
||||
if (cacheData != null) {
|
||||
val color = TrackerSourceColorHelper.getDefaultColor(data)
|
||||
temp = data.toBuilder().setColor(color).build()
|
||||
mFilterTrafficData[uuid] = temp
|
||||
}
|
||||
mFilterTrafficData[uuid] = temp
|
||||
mMarkersCaches[uuid] = temp
|
||||
trafficDataUuidList.add(uuid)
|
||||
}
|
||||
|
||||
@@ -94,21 +94,6 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerFusionData(trackObject: TrackedObject?) {
|
||||
super.updateTrackerFusionData(trackObject)
|
||||
try {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
//todo emArrow
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class SmallMapView @JvmOverloads constructor(
|
||||
fun drawablePolyline() {
|
||||
clearPolyline()
|
||||
if (mAMap != null) {
|
||||
if (mCoordinatesLatLng.size > 2) {
|
||||
if (mCoordinatesLatLng.size >= 2) {
|
||||
// 设置开始结束Marker位置
|
||||
mStartMarker!!.position = mCoordinatesLatLng[0]
|
||||
mEndMarker!!.position = mCoordinatesLatLng[mCoordinatesLatLng.size - 1]
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_RECONNECT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
@@ -166,6 +168,15 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 初始化SDK,可以设置状态回调来监听
|
||||
MoGoAiCloudClient.getInstance().init(context, clientConfig).addTokenCallbacks(
|
||||
object : IMoGoTokenCallback {
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
linkCode = CHAIN_LINK_CLOUD,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onTokenGot(token: String, sn: String) {
|
||||
clientConfig.token = token
|
||||
// 由于存在token过期问题,在更新后会回调至此处,增加二次判定
|
||||
@@ -181,6 +192,14 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
linkCode = CHAIN_LINK_CLOUD,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR,
|
||||
paramIndexes = [1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onError(code: Int, msg: String) {
|
||||
CallerLogger.d(
|
||||
"$M_MAIN$TAG",
|
||||
@@ -335,4 +354,5 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
HttpDnsSimpleLocation("010", 1.0, 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user