diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt index a603ed5f22..2e2127ccba 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt @@ -12,6 +12,7 @@ import com.zhidao.support.obu.model.advance.MovingObjectInfo import com.zhidao.support.obu.model.advance.Position import com.zhidao.support.obu.model.advance.V2vThreat import com.zhidao.support.obu.model.advance.V2vThreatExt +import kotlin.random.Random /** * @author xiaoyuzhou @@ -62,9 +63,20 @@ class ObuTestTriggerReceiver : BroadcastReceiver() { cvxV2vThreatIndInfo.status = obuStatus cvxV2vThreatIndInfo.vehicle_id = "123321" + // 设置位置 - val position = Position(0, 399739429, 1164115207, 20) - val movingObjectInfo = MovingObjectInfo(0, position, 1800, 60) + val randomLocation = Random.nextInt(100, 2000) + + val position = Position( + 0, (399739429 + randomLocation).toLong(), + (1164115207 + randomLocation).toLong(), 20 + ) + val movingObjectInfo = MovingObjectInfo( + 0, + position, + 1800 +randomLocation, + 6000 +randomLocation + ) cvxV2vThreatIndInfo.basic_info = movingObjectInfo MogoPrivateObuManager.INSTANCE.getMogoObuListener()