[状态栏]更改是否自动驾驶状态判断逻辑
This commit is contained in:
@@ -42,7 +42,8 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
if (autoPilotStatusInfo.pilotmode != 1) {
|
||||
Log.d(TAG, "-- onAutopilotStatusResponse -- autopilotMode: ${autoPilotStatusInfo.pilotmode} :: state: ${autoPilotStatusInfo.state}")
|
||||
if (autoPilotStatusInfo.state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
send(TracingStatus(UNKNOWN))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhjt.mogo_core_function_devatools.status.model
|
||||
|
||||
import android.util.*
|
||||
import androidx.lifecycle.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.GpsStatus
|
||||
@@ -83,7 +84,7 @@ internal class StatusModel : ViewModel() {
|
||||
}
|
||||
}
|
||||
is TracingStatus -> {
|
||||
val c1 = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().pilotmode == 1
|
||||
val c1 = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
|
||||
val c2 = s.state.isException()
|
||||
Log.d(TAG, "getExceptionStatus-::c1: $c1 -> c2: $c2")
|
||||
if (c1 && c2) {
|
||||
|
||||
Reference in New Issue
Block a user