[fix]修复版本号显示不正确
This commit is contained in:
@@ -19,13 +19,11 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.zhidao.adas.client.BuildConfig;
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.bean.CarConfigResp;
|
||||
import com.zhidao.adas.client.bean.Config;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -155,7 +153,7 @@ public class VersionFragment extends Fragment {
|
||||
tvTitle.setText("版本");
|
||||
}
|
||||
// if (AdasManager.getInstance().getIpcConnectionStatus() != Constants.IPC_CONNECTION_STATUS.CONNECTED)
|
||||
showVersion(null);
|
||||
showVersion(null);
|
||||
|
||||
}
|
||||
|
||||
@@ -165,12 +163,11 @@ public class VersionFragment extends Fragment {
|
||||
List<Config> list = new ArrayList<>();
|
||||
if (!BuildConfig.IS_CLIENT) {
|
||||
String ip = AdasManager.getInstance().getIpcConnectedIp();
|
||||
String temp = "";
|
||||
if (!TextUtils.isEmpty(ip)) {
|
||||
if (!ip.contains(":")) {
|
||||
ip = ip + ":" + Constants.DEFAULT_PORT;
|
||||
}
|
||||
temp = ip + ":" + AdasManager.getInstance().getIpcConnectedPort();
|
||||
}
|
||||
list.add(new Config("工控机IP:", ip));
|
||||
list.add(new Config("工控机IP:", temp));
|
||||
list.add(new Config("工控机版本:", adasConfig == null ? null : adasConfig.bean.getDockVersion()));
|
||||
list.add(new Config("车牌号:", adasConfig == null ? null : adasConfig.bean.getPlateNumber()));
|
||||
list.add(new Config("MAC地址:", adasConfig == null ? null : adasConfig.bean.getMacAddress()));
|
||||
@@ -181,8 +178,7 @@ public class VersionFragment extends Fragment {
|
||||
list.add(new Config("IPC通信协议版本:", adasConfig == null ? null : String.valueOf(adasConfig.bean.getProtocolVersion().getNumber())));
|
||||
list.add(new Config("APP通信协议版本:", String.valueOf(AdasManager.getInstance().getProtocolVersion())));
|
||||
}
|
||||
list.add(new Config("软件版本:", com.zhidao.support.adas.high.BuildConfig.VERSION_NAME));
|
||||
list.add(new Config("MAP版本:", AdasManager.getInstance().getAPVersion()));
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,5 +15,6 @@
|
||||
<TextView
|
||||
android:id="@+id/value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp" />
|
||||
</LinearLayout>
|
||||
@@ -167,7 +167,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
autopilotStatusInfo.rtk = autopilotState.rtk
|
||||
autopilotStatusInfo.radar = autopilotState.radar
|
||||
autopilotStatusInfo.speed = autopilotState.speed.toFloat()
|
||||
autopilotStatusInfo.version = AdasManager.getInstance().apVersion
|
||||
autopilotStatusInfo.version = AdasManager.getInstance().adasVersion
|
||||
if (autopilotStatusInfo.connectIP == null) {
|
||||
autopilotStatusInfo.connectIP = AdasManager.getInstance().ipcConnectedIp
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ publicBase64=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANduxRb7j6JWsWEwYOcJMgyKxG3DSl6CI39
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* MoGo-AP 版本
|
||||
* ADAS LIB 版本
|
||||
*
|
||||
* @return 版本
|
||||
*/
|
||||
AdasManager.getInstance().getAPVersion();
|
||||
AdasManager.getInstance().getAdasVersion();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
|
||||
@@ -3,10 +3,10 @@ plugins {
|
||||
id 'com.google.protobuf'
|
||||
// id 'maven'
|
||||
}
|
||||
ext {
|
||||
//自动驾驶产品版本号
|
||||
AP_VERSION = "2.6.0"
|
||||
}
|
||||
//ext {
|
||||
// //自动驾驶产品版本号
|
||||
// AP_VERSION = "2.6.0"
|
||||
//}
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
@@ -14,10 +14,12 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\""
|
||||
// versionCode Integer.valueOf(VERSION_CODE)
|
||||
// versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
//
|
||||
// buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\""
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
*/
|
||||
private static final int PROTOCOL_VERSION = MessagePad.ProtocolVersion.CurrentVersion.getNumber();
|
||||
private MessagePad.CarConfigResp carConfig;
|
||||
private static final String AP_VERSION = BuildConfig.AP_VERSION;
|
||||
private static final String ADAS_VERSION = BuildConfig.VERSION_NAME;
|
||||
|
||||
private AdasChannel mChannel;
|
||||
|
||||
@@ -89,12 +89,12 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* MoGo-AP 版本
|
||||
* ADAS LIB 版本
|
||||
*
|
||||
* @return 版本
|
||||
*/
|
||||
public String getAPVersion() {
|
||||
return AP_VERSION;
|
||||
public String getAdasVersion() {
|
||||
return ADAS_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user