[2.13.0-arch-opt] fix bug of pnc action view thread problem and config upload role problem ,plus remove impl of module-api and call
This commit is contained in:
@@ -33,7 +33,7 @@ object MoGoLocationDispatcher :
|
||||
IMoGoObuLocationWGS84Listener,
|
||||
AMapLocationListener {
|
||||
|
||||
private val TAG = "MoGoLocationManager"
|
||||
private const val TAG = "MoGoLocationManager"
|
||||
|
||||
private var mCityCode: String? = null
|
||||
private var mapLocation: AMapLocation? = null
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.getMisChannelCode
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
@@ -38,6 +39,7 @@ object SyncConfig {
|
||||
AppConfigInfo.mapSdkOptVersion = DebugConfig.getMapOptVersion()
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = MogoStatusManager.getInstance().isSocketOnLine
|
||||
AppConfigInfo.role = AppIdentityModeUtils.getMisChannelCode(FunctionBuildConfig.appIdentityMode)
|
||||
when {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {// 司机端
|
||||
AppConfigInfo.isDriver = true
|
||||
|
||||
@@ -94,48 +94,51 @@ class PncActionsView @JvmOverloads constructor(
|
||||
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
try {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
UiThreadHandler.post {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let { it ->
|
||||
try {
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let { it ->
|
||||
try {
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficLightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
}
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficLightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, bgResources)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
} else {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, bgResources)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.mogo.eagle.core.data.app
|
||||
|
||||
import android.os.Build
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.getMisChannelCode
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
|
||||
/**
|
||||
@@ -62,7 +59,7 @@ object AppConfigInfo {
|
||||
var netMode: Int = 3
|
||||
|
||||
// 角色
|
||||
var role: Int = AppIdentityModeUtils.getMisChannelCode(FunctionBuildConfig.appIdentityMode)
|
||||
var role: Int = 0
|
||||
|
||||
// 是否可以网络连接
|
||||
var isConnectNet: Boolean = false
|
||||
|
||||
@@ -43,18 +43,16 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.coroutinescore
|
||||
implementation rootProject.ext.dependencies.coroutinesandroid
|
||||
implementation project(':libraries:mogo-obu')
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
compileOnly project(path: ':libraries:mogo-adas')
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_data
|
||||
compileOnly rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
compileOnly project(':core:mogo-core-data')
|
||||
compileOnly project(':libraries:mogo-obu')
|
||||
compileOnly project(':libraries:mogo-adas')
|
||||
compileOnly project(':libraries:mogo-map-api')
|
||||
}
|
||||
|
||||
@@ -43,14 +43,11 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
// MoGo 数据埋点工具
|
||||
implementation rootProject.ext.dependencies.analytics
|
||||
compileOnly rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mogo-obu')
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
@@ -59,7 +56,8 @@ dependencies {
|
||||
} else {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
compileOnly project(':libraries:mogo-adas')
|
||||
compileOnly project(':libraries:mogo-obu')
|
||||
api project(':libraries:mogo-map-api')
|
||||
api project(':core:mogo-core-function-api')
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.overlayManager
|
||||
}
|
||||
|
||||
//todo emArrow
|
||||
fun getGDLocationServer(context: Context): IMogoGDLocationClient?{
|
||||
return serviceProvider?.getGDLocationServer(context)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.utilcode.mogo
|
||||
|
||||
|
||||
fun AppIdentityModeUtils.getMisChannelCode(appIdentityMode: String): Int {
|
||||
return when {
|
||||
isTaxi(appIdentityMode) && isPassenger(appIdentityMode) -> 1
|
||||
|
||||
@@ -6,7 +6,7 @@ import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
/**
|
||||
* 自动驾驶启动统计
|
||||
* 自动驾驶启动统计 todo 凤坤,后续封装成pb,或者放入adas-data
|
||||
*/
|
||||
public class AutopilotStatistics {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user