增加了模拟开启自动驾驶,方便调试,但需要工控机支持
TODO 下周考虑自己维护状态数据

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-02-18 18:30:01 +08:00
parent 9648f9ce3c
commit acdbd835d8
5 changed files with 45 additions and 1 deletions

View File

@@ -5,7 +5,6 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotProvider
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.LogUtils
import kotlin.random.Random
/**
@@ -120,4 +119,13 @@ object CallerAutoPilotManager {
fun setDemoMode(isEnable: Boolean) {
providerApi?.setDemoMode(isEnable)
}
/**
* 办公室调试使用,强制开启自动驾驶,将 statuspilotmodecontrol_pilotmode强追设置为 1
* isEnable = true 开启
* isEnable = false 关闭
*/
fun setControlAutopilotCarAuto(isEnable: Boolean) {
providerApi?.setControlAutopilotCarAuto(isEnable)
}
}