Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0
This commit is contained in:
@@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -849,8 +850,8 @@ class MoGoAutopilotControlProvider :
|
||||
if(carConfigResp.dockVersion.isNotEmpty()){
|
||||
if(carConfigResp.dockVersion.contains("taxi")){
|
||||
//修改雨天模式开关默认状态为开启(仅针对taxi320及以上的版本)-sop 215
|
||||
val num = AdasManager.getInstance().parseVersion(carConfigResp.dockVersion)
|
||||
if(num >= 320){
|
||||
val num = ParseVersionUtils.parseVersion(true,carConfigResp.dockVersion)
|
||||
if(num >= 30200){
|
||||
FunctionBuildConfig.isRainMode = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.utilcode.util;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -33,7 +34,11 @@ public class ParseVersionUtils {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于非个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param isUseAll 是否使用全部截取数据 true:表示 12.34.56 截取之后 123456 false:表示12.34.56 截取之后 12
|
||||
@@ -48,8 +53,12 @@ public class ParseVersionUtils {
|
||||
if (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
if (!TextUtils.isEmpty(group)) {
|
||||
String format = "%02d";
|
||||
if (isUseAll) {
|
||||
group = group.replace(".", "");
|
||||
String[] temp = group.split("\\.");
|
||||
group = String.format(Locale.getDefault(), format, Integer.parseInt(temp[0]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[1]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[2]));
|
||||
} else {
|
||||
group = group.split("\\.")[0];
|
||||
}
|
||||
|
||||
@@ -141,7 +141,8 @@ message TrackedObject
|
||||
repeated Location polygon = 15;
|
||||
geometry.Point center = 16;
|
||||
AdditionalAttribute add_attribute = 17; // 事件类型
|
||||
reserved 18 to 100;
|
||||
double angle = 18; //相对于自车x轴的角度,左正右负
|
||||
reserved 19 to 100;
|
||||
string strUuid = 101;//String类型车辆ID
|
||||
}
|
||||
|
||||
@@ -317,7 +318,7 @@ message CarConfigResp
|
||||
string carType = 9; //车辆类型
|
||||
string subCarType = 10; //车辆子类型
|
||||
reserved 11 to 100;
|
||||
int32 mapVersion = 101;//dockVersion解析出版本号,解析失败为-1。例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:280
|
||||
int32 mapVersion = 101;//dockVersion解析出版本号,仅用于版本对比,解析失败为-1。例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:20800
|
||||
bool isDF = 102;//车型是否是东风
|
||||
bool isHQ = 103;//车型是否是红旗
|
||||
bool isJinlv = 104;//车型是否是金旅小巴
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -1053,7 +1054,11 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于除个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param ver 版本字符串 例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:280
|
||||
@@ -1065,7 +1070,11 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于非个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param isUseAll 是否使用全部截取数据 true:表示 12.34.56 截取之后 123456 false:表示12.34.56 截取之后 12
|
||||
@@ -1080,8 +1089,12 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
if (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
if (!TextUtils.isEmpty(group)) {
|
||||
String format = "%02d";
|
||||
if (isUseAll) {
|
||||
group = group.replace(".", "");
|
||||
String[] temp = group.split("\\.");
|
||||
group = String.format(Locale.getDefault(), format, Integer.parseInt(temp[0]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[1]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[2]));
|
||||
} else {
|
||||
group = group.split("\\.")[0];
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
|
||||
private void initAutopilotAbility() {
|
||||
if (dockerVersion >= 250) {
|
||||
if (dockerVersion >= 20500) {
|
||||
stop230();
|
||||
if (autopilotAbility250 == null) {
|
||||
autopilotAbility250 = new AutopilotAbility250();
|
||||
@@ -186,7 +186,7 @@ public class AutopilotAbilityManager {
|
||||
@Override
|
||||
public void run() {
|
||||
if (dockerVersion == -1 && AdasManager.getInstance().getIpcConnectionStatus() == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
dockerVersion = 230;
|
||||
dockerVersion = 20300;
|
||||
initAutopilotAbility();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user