Merge branch 'dev_robotaxi-d-app-module_266_220425_2.6.6' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_266_220425_2.6.6

This commit is contained in:
wangmingjun
2022-04-25 19:29:40 +08:00
7 changed files with 55 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
import java.text.SimpleDateFormat
apply plugin: 'com.android.application'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'kotlin-android'
@@ -180,6 +182,7 @@ android {
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
buildConfigField 'String', 'WORKING_BRANCH_NAME', getWorkingBranchName()
buildConfigField 'String', 'WORKING_BRANCH_HASH', getWorkingBranchHash()
buildConfigField 'String', 'APP_BUILD_TIME', getBuildTime()
// 是否支持目的地导航策略
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false'
}
@@ -331,6 +334,16 @@ def getWorkingBranchHash() {
return "\"${workingBranchHash}\""
}
static def getBuildTime() {
def buildTimeFormat = "yyyy-MM-dd HH:mm:ss"
//设置时间格式
SimpleDateFormat formatter = new SimpleDateFormat(buildTimeFormat, Locale.getDefault())
//获取当前时间
Date curDate = new Date(System.currentTimeMillis())
def buildTime = formatter.format(curDate)
return "\"${buildTime}\""
}
boolean isAndroidTestBuild() {
for (String s : gradle.startParameter.taskNames) {

View File

@@ -73,6 +73,7 @@ public class MogoApplication extends MainMoGoApplication {
// 初始化构建APP的时候的分支及提交HASH用于辅助定位问题
AppConfigInfo.INSTANCE.setWorkingBranchName(BuildConfig.WORKING_BRANCH_NAME);
AppConfigInfo.INSTANCE.setWorkingBranchHash(BuildConfig.WORKING_BRANCH_HASH);
AppConfigInfo.INSTANCE.setAppBuildTime(BuildConfig.APP_BUILD_TIME);
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统1-工控机2-OBU
FunctionBuildConfig.gpsProvider = BuildConfig.GPS_PROVIDER;

View File

@@ -44,8 +44,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectPort =
AdasManager.getInstance().ipcConnectedPort
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatus = true
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
// 同步SN给工控机
syncBasicInfoToAutopilot()
// 开启轮询上传自动驾驶状态
@@ -69,7 +67,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
mCurrentAutopilotSpeed = 0.0f
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state = 0
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().pilotmode = 0
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTING) {
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 正在连接")
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.SEARCH_ADDRESS) {
@@ -77,6 +74,8 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.NOT_FOUND_ADDRESS) {
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 找不到可用IP 传入的IP不可用或固定IP列表中所有IP不可用")
}
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatusDescribe=reason
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
}
/**

View File

@@ -1177,8 +1177,9 @@ class DebugSettingView @JvmOverloads constructor(
it.iterator().forEach {map ->
val name = if(map.key.contains("{")) map.key.replace("{","") else map.key
val url = if(map.value.contains("}")) map.value.replace("}","") else map.value
upgradeVersionList.add(UpgradeVersionEntity(name,url))
upgradeVersionList.add(UpgradeVersionEntity(name.trim(),url))
}
upgradeVersionList.sortByDescending { upgradeVersionEntity ->upgradeVersionEntity.name }
upgradeListAdapter?.setDada(dataFilter(upgradeVersionList))
upgradeListAdapter?.notifyDataSetChanged()
}
@@ -1423,6 +1424,7 @@ class DebugSettingView @JvmOverloads constructor(
}
tvMoGoMapVersion.text = "HD-Map版本${MogoMap.getInstance().mogoMap.mapVersion}"
tvGitBranchInfo.text = "Git分支${AppConfigInfo.workingBranchName}"
tvAppBuildTimeInfo.text = "版本构建时间:${AppConfigInfo.appBuildTime}"
tvGitHashInfo.text = "Git-Hash${AppConfigInfo.workingBranchHash}"
tvAndroidSystemVersion.text = "Android系统版本" + DeviceUtils.getSDKVersionName()
@@ -1476,11 +1478,17 @@ class DebugSettingView @JvmOverloads constructor(
)
tvAutopilotConnectStatus.text = Html.fromHtml(
"Autopilot系统连接状态:${
"工控机连接状态:${
if (AppConfigInfo.isConnectAutopilot) {
"<font color='blue'>正常"
} else {
"<font color='red'>异常"
"<font color='red'>异常 原因:${
if(AppConfigInfo.connectStatusDescribe.isNullOrEmpty()){
"主动断开连接"
}else{
AppConfigInfo.connectStatusDescribe
}
}"
}
}"
)
@@ -1577,14 +1585,16 @@ class DebugSettingView @JvmOverloads constructor(
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
mAutoPilotStatusInfo = autoPilotStatusInfo
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
if (autoPilotStatusInfo.connectStatus) {
adasConnectStatus = true
}
AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe
// if (autoPilotStatusInfo.connectStatus) {
// adasConnectStatus = true
// }
//ADAS断开连接提示异常
if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) {
adasConnectStatus = false
toastMsg("Autopilot系统连接状态异常")
}
// if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) {
// adasConnectStatus = false
// toastMsg("工控机连接断开")
// }
}
override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {

View File

@@ -300,6 +300,17 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvAppBuildTimeInfo"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvGitHashInfo"
style="@style/DebugSettingText"

View File

@@ -9,6 +9,7 @@ object AppConfigInfo {
/*应用构建基本信息*/
var workingBranchName: String? = null
var workingBranchHash: String? = null
var appBuildTime: String? = null
/*应用基本信息*/
var appName: String? = null
@@ -50,6 +51,9 @@ object AppConfigInfo {
// 是否连接工控机
var isConnectAutopilot: Boolean = false
//连接工控机状态文字描述
var connectStatusDescribe: String? = null
// 是否OBU
var isConnectObu: Boolean = false

View File

@@ -20,6 +20,10 @@ class AutopilotStatusInfo : Serializable {
*/
var connectPort: Int = 4110
var connectStatus = false
/**
* 工控机连接状态文字描述
*/
var connectStatusDescribe: String? = null
var version: String? = null
/**