[BadCase]BadCase入口触发超过4小时,不展示
This commit is contained in:
@@ -25,9 +25,9 @@ if (!isAndroidTestBuild()) {
|
||||
}
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'apm-plugin'
|
||||
//}
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
// apply plugin: 'bytex.threadOpt'
|
||||
@@ -265,7 +265,7 @@ dependencies {
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
if (!isAndroidTestBuild()) {
|
||||
ApmPlugin {
|
||||
// 是否进行插桩
|
||||
enable true
|
||||
@@ -289,7 +289,7 @@ dependencies {
|
||||
|
||||
]
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00"))
|
||||
|
||||
@@ -33,6 +33,7 @@ class AutoPilotBadCaseTest {
|
||||
@Test
|
||||
fun showBadCaseEntrance1(): Unit = runBlocking(Dispatchers.Main) {
|
||||
ensureMoGoHmiFragmentShow()
|
||||
delay(TimeUnit.MILLISECONDS.toSeconds(30))
|
||||
var index = 0
|
||||
(1 until 50)
|
||||
.map { it }
|
||||
|
||||
@@ -175,6 +175,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
autopilotState: MessagePad.AutopilotState?
|
||||
) {
|
||||
if (autopilotState != null) {
|
||||
//工控机模拟时间
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotTime(header.timestamp.toLong())
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
// 初始化自动驾驶状态信息
|
||||
val autopilotStatusInfo = getAutoPilotStatusInfo()
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.kotlin.PX
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -193,7 +194,7 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
|
||||
private fun CoroutineScope.showBadCaseInternal(record: AutoPilotRecord) = launch {
|
||||
viewHolder?.get()?.also { itx ->
|
||||
presenter.updateLastModified(record.toLongTime())
|
||||
presenter.updateLastModified(CallerAutopilotVehicleStateListenerManager.getAutopilotTimeStamp())
|
||||
showEntry()
|
||||
itx.onClick {
|
||||
showBadCaseFloat(
|
||||
|
||||
@@ -30,5 +30,4 @@ interface IMoGoAutopilotVehicleStateListener {
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun onAutopilotGearData(gear: Chassis.GearPosition)
|
||||
|
||||
}
|
||||
@@ -15,6 +15,9 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
private val M_AUTOPILOT_VEHICLE_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotVehicleStateListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
@Volatile
|
||||
private var timeStamp: Long = 0L
|
||||
|
||||
/**
|
||||
* 添加 ADAS车辆状态&定位 监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
@@ -57,7 +60,6 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
* 车辆转向灯数据回调
|
||||
* @param lightSwitch
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
@@ -69,7 +71,6 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
* 车辆刹车灯数据回调
|
||||
* @param brakeLight
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
@@ -81,7 +82,6 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotSteeringData(steering: Float){
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
@@ -93,7 +93,6 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
* 车辆挂挡档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotGearData(gear: Chassis.GearPosition){
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
@@ -101,5 +100,17 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机时间回调
|
||||
*/
|
||||
fun invokeAutopilotTime(time: Long) {
|
||||
this.timeStamp = time
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机的时间, 单位是秒
|
||||
*/
|
||||
fun getAutopilotTimeStamp(): Long {
|
||||
return this.timeStamp
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user