[8.0.0]冷启动增加查询命令超时重试

This commit is contained in:
xuxinchao
2025-04-18 17:25:08 +08:00
parent 272045ec85
commit 5b10cf4da1

View File

@@ -72,6 +72,7 @@ class ColdStartView @JvmOverloads constructor(
const val TAG = "ColdStartView"
const val LOAD_SSM_WAITING_TIME = 180000L //SSM加载超时等待时间
const val COLD_START_WAITING_TIME = 600000L //冷启动超时等待时间
const val COLD_START_RETRY_INTERVAL = 5000L //冷启动查询命令超时重试间隔时间
}
private var wifiConnectStatus = false //WIFI连接状态默认是未连接
@@ -79,6 +80,8 @@ class ColdStartView @JvmOverloads constructor(
private var ssmConnectStatus = false //SSM连接状态默认是未连接
private var coldStartStatus = false //冷启动状态,默认是未冷启动成功
private var needRetry = false //是否需要重试查询冷启动状态
private var currentColdStartSuccess = false //冷启动成功状态,也是成功后动画完成状态
private var wifiRotationAnim: ObjectAnimator?= null //WIFI连接状态动画
@@ -280,6 +283,7 @@ class ColdStartView @JvmOverloads constructor(
if(!newColdStart){
newColdStart = true
CallerAutoPilotControlManager.sendSsmFuncQueryColdStartState()
needRetry = true
}
}else{
newColdStart = false
@@ -314,6 +318,7 @@ class ColdStartView @JvmOverloads constructor(
) {
if(newColdStart){
coldStartState?.let {
needRetry = false
Log.i(TAG,"节点自上报冷启动状态="+it.eventStatus)
Log.i(TAG,"旧冷启动状态="+it.processStatus)
Log.i(TAG,"旧冷启动超时原因="+it.processTimeoutReason)
@@ -807,8 +812,11 @@ class ColdStartView @JvmOverloads constructor(
*/
private fun coldStartProcess(){
ThreadUtils.runOnUiThread {
connectColdStartTimer = object: CountDownTimer(COLD_START_WAITING_TIME,COLD_START_WAITING_TIME){
connectColdStartTimer = object: CountDownTimer(COLD_START_WAITING_TIME,COLD_START_RETRY_INTERVAL){
override fun onTick(millisUntilFinished: Long) {
if(needRetry){
CallerAutoPilotControlManager.sendSsmFuncQueryColdStartState()
}
}
override fun onFinish() {