[是否启动自驾回调]
This commit is contained in:
yangyakun
2024-04-23 20:56:29 +08:00
parent 8a2e75e35b
commit 3e6a88492e
5 changed files with 28 additions and 1 deletions

View File

@@ -278,4 +278,8 @@ public class BusPresenter extends Presenter<BusFragment>
runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus());
}
@Override
public void canStartAutopilot(boolean canStart) {
}
}

View File

@@ -188,4 +188,8 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
}
}
override fun canStartAutopilot(canStart: Boolean) {
}
}

View File

@@ -91,5 +91,10 @@ public interface IOchAutopilotStatusListener {
*/
default void onAutopilotRouteLineId(long lineId) {
}
/**
* 自动驾驶路线ID回调
*/
default void canStartAutopilot(boolean canStart) {
}
}

View File

@@ -2,6 +2,7 @@ package com.mogo.och.common.module.manager.autopilot.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
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.och.common.module.manager.autopilot.trajectory.TrajectoryManager
import com.mogo.och.common.module.utils.CallerBase
@@ -13,12 +14,14 @@ import system_master.SsmInfo
import system_master.SystemStatusInfo
import java.lang.Exception
object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListener>(),IMoGoAutopilotStatusListener {
object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListener>(),IMoGoAutopilotStatusListener,
(Boolean) -> Unit {
const val TAG = "OCHAutoPilotStatusListenerManager"
init {
//2021.11.1 鹰眼架构整合由IMoGoAutopilotStatusListener逐步替代IMogoAdasOCHCallback接口
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerAutoPilotControlManager.addStartAutopilotStateListener(TAG,this)
}
override fun onAutopilotTrajectoryDownloadReq(
@@ -152,4 +155,11 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
listener.onAutopilotRouteLineId(lineId)
}
}
override fun invoke(canStartAutopilot: Boolean) {
M_LISTENERS.forEach {
val listener = it.value
listener.canStartAutopilot(canStartAutopilot)
}
}
}

View File

@@ -255,4 +255,8 @@ public class BusPresenter extends Presenter<ShuttleFragment>
runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus());
}
@Override
public void canStartAutopilot(boolean canStart) {
}
}