[2.14.0][adas lib]修复定时器无法重启bug

This commit is contained in:
xinfengkun
2023-02-21 15:28:47 +08:00
parent a8ad4c67ca
commit 0be60f24b6

View File

@@ -70,10 +70,7 @@ public class AutopilotAbilityManager {
String v = carConfig.getDockVersion();
int version = parseVersion(true, v);
if (version != -1) {
if (startTimer != null) {
startTimer.cancel();
startTimer = null;
}
stopTimer();
dockerVersion = version;
Log.i("dddd", "工控机版本=" + dockerVersion);
initAutopilotAbility();
@@ -161,6 +158,13 @@ public class AutopilotAbilityManager {
}
}
private void stopTimer() {
if (startTimer != null) {
startTimer.cancel();
startTimer = null;
}
}
/**
* 连接工控机成功调用此函数如果dockerVersion还未获取到将启动最低版本的启动自动驾驶能力检测
* 此函数为保险措施 以防无法获取工控机版本时 也能 正常执行逻辑
@@ -182,6 +186,7 @@ public class AutopilotAbilityManager {
}
public synchronized void stop() {
stopTimer();
stop230();
stop250();
handler = null;