[Fix]解决单位改变导致的自动驾驶速度的设置问题
This commit is contained in:
@@ -284,7 +284,7 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
|
||||
override fun setAutoPilotSpeed(speed: Int): Boolean {
|
||||
return AdasManager.getInstance().sendAutopilotSpeedReq(speed.toDouble())
|
||||
return AdasManager.getInstance().sendAutopilotSpeedReq(speed/3.6)
|
||||
}
|
||||
|
||||
override fun setIPCShutDown() {
|
||||
|
||||
@@ -86,6 +86,9 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun setEnableLog(isEnableLog: Boolean)
|
||||
|
||||
/**
|
||||
* speed单位:km/h
|
||||
*/
|
||||
fun setAutoPilotSpeed(speed: Int): Boolean
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,6 +95,9 @@ object CallerAutoPilotManager {
|
||||
providerApi?.setEnableLog(isEnableLog)
|
||||
}
|
||||
|
||||
/**
|
||||
* speed单位:km/h
|
||||
*/
|
||||
fun setAutoPilotSpeed(speed: Int): Boolean {
|
||||
return providerApi?.setAutoPilotSpeed(speed) ?: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user