[状态栏]算路/循迹状态逻辑优化

This commit is contained in:
renwj
2022-05-31 15:11:25 +08:00
parent cd491d5aa9
commit 2f959cc571
2 changed files with 2 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
super.onAutopilotStatusResponse(autoPilotStatusInfo)
Log.d(TAG, "-- onAutopilotStatusResponse -- autopilotMode: ${autoPilotStatusInfo.pilotmode} :: state: ${autoPilotStatusInfo.state}")
if (autoPilotStatusInfo.state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
if (autoPilotStatusInfo.state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
send(TracingStatus(UNKNOWN))
}
}

View File

@@ -84,7 +84,7 @@ internal class StatusModel : ViewModel() {
}
}
is TracingStatus -> {
val c1 = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
val c1 = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
val c2 = s.state.isException()
Log.d(TAG, "getExceptionStatus-::c1: $c1 -> c2: $c2")
if (c1 && c2) {