[code_opt_3.3.0] split autopilot status and param
This commit is contained in:
@@ -11,9 +11,9 @@ class V2XBizTrace {
|
||||
companion object {
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_CLOUD_V2N,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_CLOUD_V2N,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun onAck(data: Any, data1: Any) {
|
||||
|
||||
@@ -6,9 +6,9 @@ import android.util.*
|
||||
import androidx.annotation.*
|
||||
import androidx.localbroadcastmanager.content.*
|
||||
import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_CLOUD_V2N
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_V2X_MSG
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_CLOUD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_CLOUD_V2N
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_V2X
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew.Companion.isRoadEvent
|
||||
@@ -144,9 +144,9 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_CLOUD_V2N,
|
||||
linkChainLog = CHAIN_TYPE_V2X,
|
||||
linkCode = CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = CHAIN_CODE_CLOUD_V2N,
|
||||
nodeAliasCode = CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
override fun onAck(event: V2XEvent) {
|
||||
@@ -179,9 +179,9 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_CLOUD_V2N,
|
||||
linkChainLog = CHAIN_TYPE_V2X,
|
||||
linkCode = CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = CHAIN_CODE_CLOUD_V2N,
|
||||
nodeAliasCode = CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
override fun onAutopilotIdentifyPlanningObj(planningObjects: List<PlanningObject>?) {
|
||||
|
||||
@@ -28,11 +28,11 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_VEHICLE
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotSNRequest
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotStatusRespByQuery
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutoPilotDockerInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutoPilotStatus
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager.invokeAutopilotAbility
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager.invokeAutopilotCarConfigData
|
||||
@@ -119,7 +119,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
)
|
||||
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) {
|
||||
CallerChassisGnssListenerManager.invokeChassisGnssListener(gnssInfo)
|
||||
|
||||
if (gnssInfo != null) {
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
@@ -356,8 +355,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
carConfigResp: MessagePad.CarConfigResp?
|
||||
) {
|
||||
if (carConfigResp != null) {
|
||||
val autopilotStatusInfo = getAutoPilotStatusInfo()
|
||||
autopilotStatusInfo.dockVersion = carConfigResp.dockVersion
|
||||
updateAutoPilotDockerInfo(carConfigResp.dockVersion)
|
||||
AppConfigInfo.dockerVersion = carConfigResp.dockVersion
|
||||
AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号
|
||||
AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址
|
||||
@@ -576,9 +574,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param rsi 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_CLOUD_V2N,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_CLOUD_V2N,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
override fun onV2nCongestionEvent(header: MessagePad.Header, rsi: MogoV2X.RSI_PB) {
|
||||
@@ -596,9 +594,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param parkingViolation 违停 ---包含 静态障碍车
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_CLOUD_V2N,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_CLOUD_V2N,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
override fun onV2nGlobalPathEvents(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.datacenter.autopilot.server
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
@@ -36,7 +35,6 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
|
||||
}
|
||||
}
|
||||
|
||||
private var mPreAutoStatus = AtomicInteger(-1)
|
||||
private var createSubscribe: Disposable? = null
|
||||
|
||||
fun initServer() {
|
||||
@@ -45,16 +43,11 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
val state = autoPilotStatusInfo.state
|
||||
if (mPreAutoStatus.get() != state) {
|
||||
mPreAutoStatus.set(state)
|
||||
createSubscribe?.let {
|
||||
if (!it.isDisposed) {
|
||||
bizLog(SceneConstant.M_ADAS_IMPL + TAG, "自动驾驶状态变化,取消前置轨迹请求,间隔2s重新请求底盘轨迹")
|
||||
createSubscribe?.dispose()
|
||||
}
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
createSubscribe?.let {
|
||||
if (!it.isDisposed) {
|
||||
bizLog(SceneConstant.M_ADAS_IMPL + TAG, "自动驾驶状态变化,取消前置轨迹请求,间隔2s重新请求底盘轨迹")
|
||||
createSubscribe?.dispose()
|
||||
}
|
||||
|
||||
when (state) {
|
||||
|
||||
@@ -65,10 +65,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
AdasManager.getInstance().decoderRaw(it.body)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
CallerLogger.e(
|
||||
"${SceneConstant.M_ADAS_IMPL}$TAG",
|
||||
"乘客屏解析数据过程中出现异常:${e.message}"
|
||||
)
|
||||
invokeNettyConnResult("乘客屏解析数据过程中出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
MogoProtocolMsg.SYNC_MODE_STATUS -> {
|
||||
@@ -144,11 +141,6 @@ class TeleMsgHandler : IMsgHandler {
|
||||
CallerTrafficLightListenerManager.invokeEnterCrossRoad(false)
|
||||
}
|
||||
}
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.OPEN_ROMA_STATUS,it.body)
|
||||
}
|
||||
}
|
||||
TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR,it.body)
|
||||
@@ -223,11 +215,6 @@ class TeleMsgHandler : IMsgHandler {
|
||||
TelematicConstant.BUSINESS_STRING -> {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.BUSINESS_STRING, it.body)
|
||||
}
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.OPEN_ROMA_STATUS,it.body)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zhjt.mogo_core_function_devatools.status.flow.trace
|
||||
|
||||
import android.content.*
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
@@ -37,7 +36,6 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?) {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
val code = guardianInfo?.code
|
||||
@@ -70,9 +68,7 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
val state = autoPilotStatusInfo.state
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
try {
|
||||
if (ipcStatus.get() != state) {
|
||||
if (state != STATUS_AUTOPILOT_RUNNING) {
|
||||
|
||||
@@ -66,8 +66,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_NATIVE_LEAK)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_ANR] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_ANR)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_CLOUD_V2N] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_CLOUD_WEB_SOCKET_V2N)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_V2X] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_V2X)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_HD_MAP] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_HD_MAP_BIZ)
|
||||
|
||||
@@ -94,7 +94,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
ChainLogParam(true, "Native Leak Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_ANR] =
|
||||
ChainLogParam(true, "ANR Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_CLOUD_V2N] =
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_V2X] =
|
||||
ChainLogParam(true, "Cloud WebSocket V2N")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_HD_MAP] =
|
||||
ChainLogParam(true, "HD Map Caller")
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.Context
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
@@ -72,18 +71,15 @@ class IPCUpgradeManager: IMogoOnMessageListener<IPCUpgradeStateInfo> ,
|
||||
//更新下载or升级状态
|
||||
CallerHmiManager.showAdUpgradeStatus(it)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息
|
||||
* @param autoPilotStatusInfo 状态信息
|
||||
*/
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
autopilotStatus = autoPilotStatusInfo.state
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
//有升级任务,且不处于自动驾驶状态,进行升级提示
|
||||
autopilotStatus = state
|
||||
if(hasIPCUpgradeTask && autopilotStatus!=2){
|
||||
ipcUpgradeStateInfoTask?.let {
|
||||
var releaseId=""
|
||||
|
||||
@@ -19,14 +19,12 @@ import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
@@ -82,7 +80,6 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffe
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.component1
|
||||
@@ -126,8 +123,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
private var logInfoView: LogInfoView? = null
|
||||
private var logViewAttach = false
|
||||
|
||||
@Volatile
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
private var mGnssInfo: MogoLocation? = null
|
||||
|
||||
private var accelerationFloatWindow: AccelerationFloatWindow? = null
|
||||
@@ -932,7 +927,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
clipboardManager?.setPrimaryClip(
|
||||
ClipData.newPlainText(
|
||||
"DockVersion",
|
||||
mAutoPilotStatusInfo?.dockVersion
|
||||
CallerAutoPilotStatusListenerManager.getDockerVersion()?:""
|
||||
)
|
||||
)
|
||||
ToastUtils.showLong("docker版本复制成功")
|
||||
@@ -1090,13 +1085,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 设置域控制器点击监听
|
||||
*/
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setDomainControllerCheckedChangeListener() {
|
||||
|
||||
// 初始化工控机 IP信息
|
||||
val autoPilotIpAddress =
|
||||
SharedPrefsMgr.getInstance(context)
|
||||
.getString(MoGoConfig.AUTOPILOT_IP, FunctionBuildConfig.adasConnectIP)
|
||||
|
||||
etAutopilotIP.setText("192.168.1.")
|
||||
etAutopilotIP.text?.let { etAutopilotIP.setSelection(it.length) }
|
||||
//设置工控机IP
|
||||
@@ -1586,8 +1576,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
} else {
|
||||
tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}"
|
||||
}
|
||||
tvIpcVersionInfo.text = "MAP:${mAutoPilotStatusInfo?.dockVersion}"
|
||||
tvIpcVersionInfoKey.text = "MAP:${mAutoPilotStatusInfo?.dockVersion}"
|
||||
val dockerVersion = CallerAutoPilotStatusListenerManager.getDockerVersion()
|
||||
tvIpcVersionInfo.text = "MAP:$dockerVersion"
|
||||
tvIpcVersionInfoKey.text = "MAP:$dockerVersion"
|
||||
tvMoGoMapVersion.text = "HD-Map版本:${DebugConfig.getMapVersion()}"
|
||||
tvMoGoMapVersionKey.text = "HD-Map版本:${DebugConfig.getMapVersion()}"
|
||||
tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}"
|
||||
@@ -1658,12 +1649,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
"司机端Server启动"
|
||||
}
|
||||
else -> {
|
||||
"乘客端${
|
||||
when {
|
||||
!AppConfigInfo.serverSn.isNullOrEmpty() -> "(司机屏SN是:${AppConfigInfo.serverSn?:""})"
|
||||
else -> ""
|
||||
}
|
||||
}连接"
|
||||
"乘客端${"(司机屏SN是:${AppConfigInfo.serverSn})"}连接"
|
||||
}
|
||||
}
|
||||
}是否正常:${
|
||||
@@ -1696,11 +1682,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
mAutoPilotStatusInfo?.let {
|
||||
val autopilotJson = GsonUtils.toJson(it)
|
||||
tvAutopilotInfo.text = autopilotJson
|
||||
tvIpcInfo.text = autopilotJson
|
||||
tvIpcInfoKey.text = autopilotJson
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString().let {
|
||||
tvAutopilotInfo.text = it
|
||||
tvIpcInfo.text = it
|
||||
tvIpcInfoKey.text = it
|
||||
}
|
||||
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)?:""
|
||||
|
||||
@@ -1780,8 +1765,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 自动驾驶状态回调
|
||||
*/
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
setAutopilotConnectStatus()
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,9 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.temp.EventLogout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
@@ -44,7 +42,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
), IMoGoAutopilotStatusListener {
|
||||
) {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "AutoPilotAndCheckView"
|
||||
@@ -52,8 +50,6 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
private var keyBoardUtil: KeyBoardUtil? = null
|
||||
@Volatile
|
||||
private var connectStatus = false
|
||||
private var lastTime = 0L
|
||||
|
||||
init {
|
||||
@@ -174,7 +170,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
svLayout.post {
|
||||
svLayout.fullScroll(View.FOCUS_DOWN)
|
||||
}
|
||||
if (!connectStatus) { //todo 单次获取
|
||||
if (!CallerAutoPilotStatusListenerManager.getConnectStates()) {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
keyBoardUtil?.hideKeyboard()
|
||||
return@setOnTouchListener true
|
||||
@@ -267,20 +263,14 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerAutopilotCarConfigListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
connectStatus = autoPilotStatusInfo.connectStatus
|
||||
}
|
||||
|
||||
interface ClickListener {
|
||||
fun onClose(v: View)
|
||||
fun showDebugPanelView()
|
||||
|
||||
@@ -6,13 +6,12 @@ import android.util.TypedValue.COMPLEX_UNIT_PX
|
||||
import android.view.LayoutInflater
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.isRed
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
|
||||
@@ -40,9 +39,6 @@ class PncActionsView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var mTrafficLightResult: TrafficLightResult? = null
|
||||
|
||||
@Volatile
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
|
||||
private val bgResources: Int
|
||||
private val topMargin: Float
|
||||
private val txtSize: Float
|
||||
@@ -68,7 +64,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin.toInt()
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize.toFloat())
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize)
|
||||
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
@@ -82,10 +78,8 @@ class PncActionsView @JvmOverloads constructor(
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
if (mAutoPilotStatusInfo!!.state != STATUS_AUTOPILOT_RUNNING) {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
if (state != STATUS_AUTOPILOT_RUNNING) {
|
||||
UiThreadHandler.post {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
@@ -96,45 +90,43 @@ class PncActionsView @JvmOverloads constructor(
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
try {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
UiThreadHandler.post {
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let { it ->
|
||||
try {
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficLightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let { it ->
|
||||
try {
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficLightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
} else {
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, bgResources)
|
||||
tvHmiPncActions.text = actions
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
} else {
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, bgResources)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
} else {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
@@ -16,7 +15,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -33,31 +31,22 @@ class TakeOverView @JvmOverloads constructor(
|
||||
const val TAG = "TakeOverView"
|
||||
}
|
||||
|
||||
private var autopilotStatus: Int = 0 //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中,7:平行驾驶中
|
||||
private var isParallel: Boolean = false //是否是平行驾驶
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true)
|
||||
}
|
||||
|
||||
private var takeOver = false
|
||||
private var isParallel: Boolean = false //是否是平行驾驶
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息
|
||||
*
|
||||
* @param autoPilotStatusInfo 状态信息
|
||||
*/
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
autopilotStatus = autoPilotStatusInfo.state
|
||||
if(autoPilotStatusInfo.state == 7){
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
if(state == 7){
|
||||
isParallel = true
|
||||
}else if(autoPilotStatusInfo.state == 0 || autoPilotStatusInfo.state == 1){
|
||||
}else if(state == 0 || state == 1){
|
||||
isParallel = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
@@ -37,7 +36,7 @@ class AutoPilotStatusView constructor(
|
||||
|
||||
private var mAutopilotStatus: Int = 0
|
||||
|
||||
init{
|
||||
init {
|
||||
initView(context)
|
||||
}
|
||||
|
||||
@@ -119,8 +118,8 @@ class AutoPilotStatusView constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
setAutoPilotStatus(autoPilotStatusInfo.state)
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
setAutoPilotStatus(state)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
@@ -29,12 +28,7 @@ class CheckSystemView @JvmOverloads constructor(
|
||||
const val TAG = "CheckSystemView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var connectStatus = false //是否连接工控机
|
||||
@Volatile
|
||||
private var autopilotStatus: Int? = null //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中
|
||||
private var dockerRebootDialog: DockerRebootDialog? = null
|
||||
|
||||
private var downloadStatus: String = "" //下载状态
|
||||
private var upgradeStatus: String = "" //升级状态
|
||||
|
||||
@@ -54,7 +48,7 @@ class CheckSystemView @JvmOverloads constructor(
|
||||
dockerRebootDialog = DockerRebootDialog(context)
|
||||
dockerRebootDialog?.setClickListener(object : DockerRebootDialog.ClickListener {
|
||||
override fun confirm() {
|
||||
if (autopilotStatus == 2) {
|
||||
if (CallerAutoPilotStatusListenerManager.getState() == 2) {
|
||||
//当前处于自动驾驶状态,不可进行重启,Toast提示
|
||||
ToastUtils.showShort("请先退出自动驾驶状态")
|
||||
}
|
||||
@@ -106,16 +100,15 @@ class CheckSystemView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
connectStatus = autoPilotStatusInfo.connectStatus //单次
|
||||
autopilotStatus = autoPilotStatusInfo.state
|
||||
override fun onAutopilotConnectInfo(connectInfo: Boolean) {
|
||||
super.onAutopilotConnectInfo(connectInfo)
|
||||
ThreadUtils.runOnUiThread {
|
||||
setViewStatus()
|
||||
setViewStatus(connectInfo)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setViewStatus() {
|
||||
if (connectStatus) {
|
||||
private fun setViewStatus(connectInfo:Boolean) {
|
||||
if (connectInfo) {
|
||||
viewCheckShutDown.requestFocus()
|
||||
viewCheckShutDown.isClickable = true
|
||||
viewCheckReboot.requestFocus()
|
||||
@@ -124,7 +117,6 @@ class CheckSystemView @JvmOverloads constructor(
|
||||
viewCheckShutDown.isClickable = false
|
||||
viewCheckReboot.isClickable = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -94,9 +94,8 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
|
||||
private val mGoAutopilotStatusListener: IMoGoAutopilotStatusListener =
|
||||
object : IMoGoAutopilotStatusListener {
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
val state = autoPilotStatusInfo.state
|
||||
d("$M_BUS_P$TAG", "state = %s", state)
|
||||
if (autopilotIV != null) {
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -44,8 +43,6 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private var dockerVersion: String? = null //工控机版本
|
||||
private var autopilotStatus: Int? = null //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中
|
||||
|
||||
private var ipcUpgradeStateInfo: IPCUpgradeStateInfo?=null
|
||||
|
||||
private var needQueryContainers: Boolean = false
|
||||
@@ -320,17 +317,9 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
needQueryContainers = false
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
dockerVersion = autoPilotStatusInfo.dockVersion
|
||||
autopilotStatus = autoPilotStatusInfo.state
|
||||
CallerLogger.i(
|
||||
"$M_HMI$TAG",
|
||||
"onAutopilotStatusResponse dockerVersion=$dockerVersion , autopilotStatus=$autopilotStatus"
|
||||
)
|
||||
setViewStatus()
|
||||
}
|
||||
|
||||
private fun setViewStatus() {
|
||||
override fun onAutopilotDockerInfo(dockerVersion: String) {
|
||||
super.onAutopilotDockerInfo(dockerVersion)
|
||||
this.dockerVersion = dockerVersion
|
||||
showCurrentAdVersion()
|
||||
}
|
||||
|
||||
|
||||
@@ -5,16 +5,12 @@ import android.content.Context
|
||||
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.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.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_version_name.view.*
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
@@ -89,11 +85,12 @@ class VersionNameView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
dockerVersion = autoPilotStatusInfo.dockVersion
|
||||
override fun onAutopilotDockerInfo(dockerVersion: String) {
|
||||
super.onAutopilotDockerInfo(dockerVersion)
|
||||
this.dockerVersion = dockerVersion
|
||||
showCurrentMapVersion()
|
||||
//将工控机版本赋值给BadCase配置常量
|
||||
CallerDevaToolsManager.dockerVersion(autoPilotStatusInfo.dockVersion)
|
||||
CallerDevaToolsManager.dockerVersion(dockerVersion)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -91,12 +91,15 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
int mode = autoPilotStatusInfo.getState();
|
||||
if (mode == 2) {
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
if (state == 2) {
|
||||
isArriveAtStation.set(false);
|
||||
}
|
||||
this.autopilotMode.set(mode);
|
||||
this.autopilotMode.set(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,4 +138,12 @@ public class MogoRouteOverlayManager implements
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDockerInfo(@NonNull String dockerVersion) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotConnectInfo(boolean connectInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.widget.RelativeLayout
|
||||
import androidx.annotation.UiThread
|
||||
import com.amap.api.maps.*
|
||||
import com.amap.api.maps.model.*
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -50,9 +49,6 @@ class SmallMapView @JvmOverloads constructor(
|
||||
private var mContext: Context? = null
|
||||
private var mLocation: MogoLocation? = null
|
||||
|
||||
@Volatile
|
||||
private var autoPilotStatus = 0
|
||||
|
||||
companion object {
|
||||
const val TAG = "SmallMapView"
|
||||
}
|
||||
@@ -318,14 +314,12 @@ class SmallMapView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
val tempStatus = autoPilotStatusInfo.state
|
||||
if (tempStatus != 2) {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
if (state != 2) {
|
||||
UiThreadHandler.post {
|
||||
clearPolyline()
|
||||
}
|
||||
}
|
||||
autoPilotStatus = tempStatus
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
|
||||
Reference in New Issue
Block a user