[6.4.0][启自驾指引] 只有可自驾状态变化了,再回调
This commit is contained in:
@@ -129,12 +129,12 @@ class TestAutoPilotBeforeLaunch {
|
||||
}
|
||||
launch(Dispatchers.IO) {
|
||||
while (true) {
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(Random.nextInt(0 .. 100).toFloat())
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(Random.nextInt(0..100).toFloat())
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(Random.nextInt(10 .. 100).toFloat())
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(Random.nextInt(10..100).toFloat())
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(GEAR_R)
|
||||
val current = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(current.also { it.gnssSpeed = Random.nextInt(0 ..20).toFloat(); it.setAcceleration(Random.nextInt(-100, 100).toDouble()) }, DEFAULT)
|
||||
delay(Random.nextInt(100..500).toLong())
|
||||
delay(Random.nextInt(10..50).toLong())
|
||||
}
|
||||
}
|
||||
launch(Dispatchers.IO) {
|
||||
@@ -185,9 +185,8 @@ class TestAutoPilotBeforeLaunch {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_BRAKE, "brake")
|
||||
})
|
||||
}
|
||||
delay(500)
|
||||
CallerAutoPilotControlManager.isCanStartAutopilot(true)
|
||||
delay(5000)
|
||||
delay(Random.nextInt(1000..5000).toLong())
|
||||
flag ++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user