命名规范

This commit is contained in:
董宏宇
2021-08-25 18:38:09 +08:00
parent 02dbfe7fdc
commit c2d7d121f2
7 changed files with 45 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ import com.mogo.module.hmi.R
import com.mogo.module.hmi.notification.WarningFloat
import com.mogo.module.hmi.notification.anim.DefaultAnimator
import com.mogo.module.hmi.notification.enums.SidePattern
import com.mogo.module.hmi.ui.widget.ViewV2XNotification
import com.mogo.module.hmi.ui.widget.V2XNotificationView
import kotlinx.android.synthetic.main.fragment_warning.*
/**
@@ -53,7 +53,7 @@ class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresent
activity?.let {
val notificationView = ViewV2XNotification(activity)
val notificationView = V2XNotificationView(activity)
notificationView.setWarningIcon(WarningTypeEnum.getWarningIcon(v2xType))
notificationView.setWarningContent(

View File

@@ -13,7 +13,7 @@ import kotlinx.android.synthetic.main.view_traffic_light_vr.view.*
* @date 2021/8/4 3:16 下午
* 红绿灯控件
*/
class ViewTrafficLight @JvmOverloads constructor(
class TrafficLightView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0

View File

@@ -15,7 +15,7 @@ import kotlinx.android.synthetic.main.notification_v2x_msg_vr.view.*
*@author xiaoyuzhou
*@date 2021/8/6 12:25 下午
*/
class ViewV2XNotification @JvmOverloads constructor(
class V2XNotificationView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0

View File

@@ -6,7 +6,7 @@
android:layout_height="match_parent">
<com.mogo.module.hmi.ui.widget.ViewTrafficLight
<com.mogo.module.hmi.ui.widget.TrafficLightView
android:id="@+id/viewTrafficLightVr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -9,6 +9,7 @@ import com.mogo.utils.logger.Logger
import com.zhidao.support.obu.model.CvxHvInfoIndInfo
import com.zhidao.support.obu.model.advance.MovingObjectInfo
import com.zhidao.support.obu.model.advance.Position
import kotlin.random.Random
/**
* @author xiaoyuzhou
@@ -36,8 +37,18 @@ class ObuTestTriggerRecognizedReceiver : BroadcastReceiver() {
val cvxHvInfoIndInfo = CvxHvInfoIndInfo(0, 1, 2)
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
)
cvxHvInfoIndInfo.basic_info = movingObjectInfo
MogoPrivateObuManager.INSTANCE