Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230926_6.1.0

This commit is contained in:
yangyakun
2023-10-07 18:34:51 +08:00
25 changed files with 1176 additions and 147 deletions

View File

@@ -93,16 +93,19 @@ class ParallelDriveView @JvmOverloads constructor(
reqParaDrive()
listener?.onReqClick()
}
APP_REQUESTING -> {
cancelParaDrive()
Log.d(TAG, "Click-请求已取消")
ToastUtils.showShort("请求已取消!")
checkAvailableAndUpdateUI()
}
AD_REQUESTING -> {
Log.d(TAG, "Click-自动驾驶正在请求平行驾驶")
ToastUtils.showShort("自动驾驶正在请求平行驾驶")
}
UNAVAILABLE -> {
Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求")
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
@@ -118,41 +121,36 @@ class ParallelDriveView @JvmOverloads constructor(
override fun onAutopilotStatusResponse(state: Int) {
super.onAutopilotStatusResponse(state)
if (state != autopilotState) {
synchronized(this) {
when (state) {
7 -> {
if (this.autopilotState != 7) {
isAutoDriving = false
Log.d(TAG, "onAutopilotStatusResponse-7")
ThreadUtils.runOnUiThread({
updateUI(PARALLEL_DRIVING)
}, ThreadUtils.MODE.QUEUE)
}
}
when (state) {
7 -> {
isAutoDriving = false
Log.d(TAG, "onAutopilotStatusResponse-7")
ThreadUtils.runOnUiThread({
updateUI(PARALLEL_DRIVING)
}, ThreadUtils.MODE.QUEUE)
}
2 -> {
if (this.autopilotState != state) {
isAutoDriving = true
Log.d(TAG, "onAutopilotStatusResponse-2")
}
}
else -> {
if (this.autopilotState != state) {
isAutoDriving = false
Log.d(TAG, "onAutopilotStatusResponse-else")
if (this.autopilotState == 7) {
ThreadUtils.runOnUiThread({
checkAvailableAndUpdateUI()
}, ThreadUtils.MODE.QUEUE)
}
}
}
2 -> {
isAutoDriving = true
Log.d(TAG, "onAutopilotStatusResponse-2")
if (this.autopilotState == 7) {
ThreadUtils.runOnUiThread({
checkAvailableAndUpdateUI()
}, ThreadUtils.MODE.QUEUE)
}
}
else -> {
isAutoDriving = false
Log.d(TAG, "onAutopilotStatusResponse-else")
if (this.autopilotState == 7) {
ThreadUtils.runOnUiThread({
checkAvailableAndUpdateUI()
}, ThreadUtils.MODE.QUEUE)
}
this.autopilotState = state
}
}
this.autopilotState = state
}
override fun onParallelDrivingAbility(