[fix]
添加司机过滤条件
This commit is contained in:
yakunyang
2024-06-14 11:29:46 +08:00
parent faf6d5c375
commit cfb2800c7f

View File

@@ -1,9 +1,11 @@
package com.mogo.och.common.module.manager.autopilot.autopilot package com.mogo.och.common.module.manager.autopilot.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener 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.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.R import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.autopilot.trajectory.TrajectoryManager import com.mogo.och.common.module.manager.autopilot.trajectory.TrajectoryManager
@@ -24,13 +26,15 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue -> private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
if (oldValue != newValue) { if (oldValue != newValue) {
if(oldValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){ if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){ if(oldValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
ToastUtils.showLong(R.string.common_change2_autopilot2_manual) if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
} ToastUtils.showLong(R.string.common_change2_autopilot2_manual)
}else if(oldValue==IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){ }
if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){ }else if(oldValue==IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
ToastUtils.showLong(R.string.common_change2_pxjs_manual) if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
ToastUtils.showLong(R.string.common_change2_pxjs_manual)
}
} }
} }