Merge branch 'dev_robotaxi-d_230912_6.1.0' into base_3.4.0-map-sdk
This commit is contained in:
@@ -493,7 +493,9 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
}
|
||||
|
||||
private fun updateOrderUI(order: OrderDetail) {
|
||||
cancelOrder.visibility = View.VISIBLE
|
||||
cancelOrder.visibility = if (order.orderStatus
|
||||
== TaxiOrderStatusEnum.ArriveAtEnd.code
|
||||
) View.GONE else View.VISIBLE
|
||||
orderPhoneAndNum.visibility = View.VISIBLE
|
||||
taskClickBtn.visibility = View.VISIBLE
|
||||
taskTypeTv.visibility = View.VISIBLE
|
||||
|
||||
@@ -730,6 +730,7 @@ object TaxiTaskModel {
|
||||
//达到终点后查询全程里程和用时
|
||||
if (QueryCurrentTaskRespBean.isOrderArriveAtEnd(result)) {
|
||||
d(TAG, "queryCurrentTaskOnce ArriveAtEnd")
|
||||
mIsArrivedSiteStartTag = false
|
||||
mTaxiTaskWithOrderCallbackMap.forEach {
|
||||
val listener = it.value
|
||||
listener.onOrderArriveAtEnd(result.order!!.orderNo)
|
||||
@@ -1321,6 +1322,7 @@ object TaxiTaskModel {
|
||||
*/
|
||||
fun clearCurrentOCHOrder() {
|
||||
clearAutopilotControlParameters()
|
||||
mIsArrivedSiteStartTag = false
|
||||
isRestartAutopilot = false
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
// 当美化模式(演示模式)开启时: 取消或订单已完成时,置false
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_AD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_VEHICLE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_CONFIG
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_LOC
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_PARALLEL
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_OBJECTS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS_QUERY_RESP
|
||||
@@ -771,6 +772,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param sysTime 当前时间戳
|
||||
* @param parallelTaskProcessNotice 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_ADAS_PARALLEL,
|
||||
paramIndexes = [0, 1, 2, 4]
|
||||
)
|
||||
override fun onParallelDrivingResp(
|
||||
header: MessagePad.Header,
|
||||
messageType: AiCloudTask.MessageType,
|
||||
|
||||
@@ -66,6 +66,11 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//obu数据
|
||||
@Volatile
|
||||
private var hasObuLightStatus: Boolean = false
|
||||
|
||||
//是否有自车感知红绿灯数据
|
||||
@Volatile
|
||||
private var hasAutopilotPerception: Boolean = false
|
||||
|
||||
//红绿灯定时器,超时未更新隐藏红绿灯
|
||||
@Volatile
|
||||
private var lightCountDownTimer: CountDownTimer? = null
|
||||
@@ -90,7 +95,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
)
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasAiLightStatus) {
|
||||
trafficLights?.let { it ->
|
||||
trafficLights?.let {
|
||||
var light: TrafficLight? = null
|
||||
if (it.hasStraight()) {
|
||||
light = it.straight
|
||||
@@ -106,9 +111,13 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"onAutopilotPerceptionTrafficLight light = $light "
|
||||
)
|
||||
if (light == null) {
|
||||
hasAutopilotPerception = false
|
||||
//隐藏红绿灯显示
|
||||
hide("感知light为null隐藏", DataSourceType.TELEMATIC)
|
||||
} else {
|
||||
if(!hasAutopilotPerception){
|
||||
hasAutopilotPerception = true
|
||||
}
|
||||
onTrafficLightPlusSource(light.convert(), 0, DataSourceType.TELEMATIC)
|
||||
}
|
||||
}
|
||||
@@ -127,7 +136,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
)
|
||||
}
|
||||
if (!hasObuLightStatus) {
|
||||
hasAiLightStatus = true
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onTrafficLightStatus trafficLightResult = $trafficLightResult "
|
||||
@@ -156,7 +164,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
if (!hasObuLightStatus) {
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,15 +173,15 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
* 红绿灯接口请求失败
|
||||
*/
|
||||
override fun onTrafficRequestError() {
|
||||
hasAiLightStatus = false
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onTrafficRequestError hasObuLightStatus = $hasObuLightStatus ------> "
|
||||
)
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
if (!hasObuLightStatus) {
|
||||
hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD)
|
||||
}
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(hasAiLightStatus)
|
||||
hasAiLightStatus = false
|
||||
// if (!hasObuLightStatus) {
|
||||
// hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD)
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,14 +194,14 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否重置红绿灯数据,需要确保,在obu的红绿灯显示的时候,不执行。否则会闪屏
|
||||
* 是否重置红绿灯数据,需要确保,在obu的红绿灯显示或自车感知红绿灯显示的时候,不执行。否则会闪屏
|
||||
*/
|
||||
override fun resetTrafficLight(isReset: Boolean) {
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"resetTrafficLight ------> isReset = $isReset ---hasObuLightStatus = $hasObuLightStatus"
|
||||
)
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasObuLightStatus && !hasAutopilotPerception) {
|
||||
if (isReset) {
|
||||
hide("云端重置红绿灯数据", DataSourceType.AICLOUD)
|
||||
}
|
||||
@@ -228,6 +236,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
super.onTrafficLightPlusSource(light, remain, lightSource)
|
||||
if (lightSource == DataSourceType.OBU) {
|
||||
hasObuLightStatus = true
|
||||
hasAutopilotPerception = false
|
||||
}
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
@@ -293,6 +302,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"updateTrafficLight ----- currentTrafficLight = $currentTrafficLight"
|
||||
)
|
||||
currentTrafficLight?.let {
|
||||
hasAiLightStatus = true
|
||||
hasAutopilotPerception = false
|
||||
val remain = if (it.time() > 99) {
|
||||
99
|
||||
} else {
|
||||
|
||||
@@ -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,42 @@ 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 -> {
|
||||
if (this.autopilotState != 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 -> {
|
||||
if (this.autopilotState != state) {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
if (this.autopilotState != state) {
|
||||
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(
|
||||
|
||||
@@ -70,6 +70,7 @@ class ChainConstant {
|
||||
const val CHAIN_CODE_ADAS_P_OBJECTS = "CHAIN_CODE_ADAS_P_OBJECTS"
|
||||
const val CHAIN_CODE_ADAS_P_ACTIONS = "CHAIN_CODE_ADAS_P_ACTIONS"
|
||||
const val CHAIN_CODE_ADAS_STATUS_QUERY_RESP = "CHAIN_CODE_ADAS_STATUS_QUERY_RESP"
|
||||
const val CHAIN_CODE_ADAS_PARALLEL = "CHAIN_CODE_ADAS_PARALLEL"
|
||||
|
||||
const val CHAIN_CODE_RECORD_NATIVE_LEAK = "CHAIN_CODE_RECORD_NATIVE_LEAK"
|
||||
const val CHAIN_CODE_RECORD_ANR = "CHAIN_CODE_RECORD_ANR"
|
||||
|
||||
Reference in New Issue
Block a user