[6.6.0]先不上fsm判断不可起自驾了,只要自驾启动失败

This commit is contained in:
xuxinchao
2024-09-09 14:05:35 +08:00
parent 688a06792f
commit 219ceef899
2 changed files with 34 additions and 35 deletions

View File

@@ -52,7 +52,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsList
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
@@ -127,7 +126,7 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
MogoStatusManager.getInstance()
.registerStatusChangedListener(TAG, StatusDescriptor.CLOUD_SOCKET, this)
if(ProjectUtils.isSaas()){
CallerFsm2024ListenerManager.addListener(TAG,this)
// CallerFsm2024ListenerManager.addListener(TAG,this)
CallerAutopilotStatisticsListenerManager.addListener(TAG,this)
CallerOrderListenerManager.addListener(TAG,this)
CallerAutoPilotStatusListenerManager.addListener("RecordViewManager",this)
@@ -570,36 +569,36 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
*/
override fun onFSM2024State(fsmState: Fsm2024.FSMStateMsg) {
Log.i(TAG,"onFSM2024State fsmState.pilotStandbyFlag="+fsmState.pilotStandbyFlag+" pilotNotStandbyReason="+ fsmState.pilotNotStandbyReason)
if(fsmState.pilotStandbyFlag){
BadCaseConfig.fsmAlreadyStandby = true
}
if(BadCaseConfig.fsmAlreadyStandby){
if(!fsmState.pilotStandbyFlag){
//pilotStandbyFlag == false代表自动驾驶无法启动
if(!BadCaseConfig.alreadyShowOneReport){
//触发一键上报
ThreadUtils.runOnUiThread {
val activity = AppStateManager.currentActivity()
if (activity !is AppCompatActivity) {
return@runOnUiThread
}
if(reportTypeWindow == null){
reportTypeWindow = ReportTypeWindow(activity)
reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
override fun closeWindow() {
reportTypeWindow?.hideFloatWindow()
reportTypeWindow = null
}
})
}
reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
BadCaseConfig.alreadyShowOneReport = true
}
}
}else{
BadCaseConfig.alreadyShowOneReport = false
}
}
// if(fsmState.pilotStandbyFlag){
// BadCaseConfig.fsmAlreadyStandby = true
// }
// if(BadCaseConfig.fsmAlreadyStandby){
// if(!fsmState.pilotStandbyFlag){
// //pilotStandbyFlag == false代表自动驾驶无法启动
// if(!BadCaseConfig.alreadyShowOneReport){
// //触发一键上报
// ThreadUtils.runOnUiThread {
// val activity = AppStateManager.currentActivity()
// if (activity !is AppCompatActivity) {
// return@runOnUiThread
// }
// if(reportTypeWindow == null){
// reportTypeWindow = ReportTypeWindow(activity)
// reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
// override fun closeWindow() {
// reportTypeWindow?.hideFloatWindow()
// reportTypeWindow = null
// }
// })
// }
// reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
// BadCaseConfig.alreadyShowOneReport = true
// }
// }
// }else{
// BadCaseConfig.alreadyShowOneReport = false
// }
// }
}
/**

View File

@@ -62,9 +62,9 @@ object BadCaseConfig {
//本次问题是否已经触发一键上报
@JvmField
var alreadyShowOneReport: Boolean = false
//FSM是否已经变为可以启自驾
@JvmField
var fsmAlreadyStandby: Boolean = false
// //FSM是否已经变为可以启自驾
// @JvmField
// var fsmAlreadyStandby: Boolean = false
//租户ID
@JvmField
var tenantId: Long = 0