[add] 硬件检测UI文件+资源添加

This commit is contained in:
liujing
2021-08-03 18:13:19 +08:00
parent 3ada9738ff
commit 2390ae5727
9 changed files with 234 additions and 7 deletions

View File

@@ -193,26 +193,136 @@ public class CheckActivity extends AppCompatActivity {
/**
* **************************************************************************************软件测试
* 时延
* 自动驾驶侧:
* 1、车控节点
* <p>
* 2、轨迹地图加载节点
* <p>
* 3、轨迹规划节点
* <p>
* 4、定位转化节点
* <p>
* 5、融合节点
* <p>
* 6、yolov5节点包含红绿灯检测
* <p>
* 7、激光雷达渲染节点
* <p>
* 8、摄像头驱动节点
* <p>
* 9、gnss定位驱动节点
* <p>
* 10、中激光驱动节点
* <p>
* 11、左激光解码节点
* <p>
* 12、左激光驱动节点
* <p>
* 13、右激光解码节点
* <p>
* 14、右激光驱动节点
* <p>
* 15、监控节点
* <p>
* 16、通讯交互节点
* <p>
* 17、轨迹录制节点
* <p>
* 18、can车辆控制节点
* <p>
* 数据上报频率 什么数据的上报频率
* <p>
* 时延 工控机->云 工控机->鹰眼 什么数据的时延
*/
public void software() {
time();
}
/**
* 时延
* 需要产品确认哪些指标? 定位+周边识别?
*/
public void time() {
public long time() {
final long start = System.nanoTime();
long adasDataTime = TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start));
Log.i("ADAS数据延时", "接收数据 -> 发出 cost :" + adasDataTime + "ms");
return adasDataTime;
}
/**
* **************************************************************************************硬件测试 FROM ADAS
* **************************************************************************************硬件测试
* 1、主激光雷达
* <p>
* 2、侧激光雷达-2个
* <p>
* 3、ADAS长焦摄像头-前
* <p>
* 4、ADAS广角摄像头-前
* <p>
* 5、ADAS标准摄像头-前
* <p>
* 6、ADAS广角摄像头-后
* <p>
* 7、RTK设备
* <p>
* 8、OBU设备
* <p>
* 9、路由器
*/
public void hardware() {
CheckItemInfo itemInfo = new CheckItemInfo();
itemInfo.setTitle("(下面 1 项存在异常)");
itemInfo.setUsual(false);
CheckItemInfo.DetailItem detailItem = new CheckItemInfo.DetailItem();
detailItem.setTitle("主机光雷达");
detailItem.setValue("异常");
itemInfo.setItemList(detailItem);
CheckItemInfo.DetailItem jiGuangLeft = new CheckItemInfo.DetailItem();
jiGuangLeft.setTitle("左侧激光雷达");
jiGuangLeft.setValue("异常");
itemInfo.setItemList(jiGuangLeft);
CheckItemInfo.DetailItem jiGuangRight = new CheckItemInfo.DetailItem();
jiGuangRight.setTitle("右侧激光雷达");
jiGuangRight.setValue("正常");
itemInfo.setItemList(jiGuangRight);
CheckItemInfo.DetailItem changjiao = new CheckItemInfo.DetailItem();
changjiao.setTitle("ADAS长焦摄像头");
changjiao.setValue("正常");
itemInfo.setItemList(changjiao);
CheckItemInfo.DetailItem guangJiaoFront = new CheckItemInfo.DetailItem();
guangJiaoFront.setTitle("ADAS广焦摄像头-前");
guangJiaoFront.setValue("正常");
itemInfo.setItemList(guangJiaoFront);
CheckItemInfo.DetailItem custom = new CheckItemInfo.DetailItem();
custom.setTitle("ADAS标准摄像头");
custom.setValue("正常");
itemInfo.setItemList(custom);
CheckItemInfo.DetailItem guangJiaoBe = new CheckItemInfo.DetailItem();
guangJiaoBe.setTitle("ADAS广焦摄像头-后");
guangJiaoBe.setValue("正常");
itemInfo.setItemList(guangJiaoBe);
CheckItemInfo.DetailItem rtk = new CheckItemInfo.DetailItem();
rtk.setTitle("RTK设备");
rtk.setValue("正常");
itemInfo.setItemList(rtk);
CheckItemInfo.DetailItem obu = new CheckItemInfo.DetailItem();
obu.setTitle("OUB设备");
obu.setValue("正常");
itemInfo.setItemList(obu);
CheckItemInfo.DetailItem luyou = new CheckItemInfo.DetailItem();
luyou.setTitle("路由器");
luyou.setValue("正常");
itemInfo.setItemList(luyou);
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="@dimen/check_little_btn_width"
android:height="@dimen/check_little_btn_width" />
//填充
<solid android:color="@color/check_little_btn_solid" />
//描边
<stroke
android:width="2px"
android:color="@color/check_little_btn" />
</shape>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="@dimen/check_little_btn_width"
android:height="@dimen/check_little_btn_width" />
//填充
<solid android:color="@color/check_little_btn_solid_green" />
//描边
<stroke
android:width="2px"
android:color="@color/check_little_btn_green" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

View File

@@ -4,13 +4,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".view.CheckActivity"
android:background="@color/blue_back_color">
android:background="@color/blue_back_color"
tools:context=".view.CheckActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/check_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/check_list"
android:text="检测页面"
android:textSize="28dp"
app:layout_constraintBottom_toBottomOf="parent"

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue_back_color">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_50"
android:gravity="left"
android:text="硬件检测:"
android:textColor="@color/module_commons_wm_dialog_text_textColor"
android:textSize="@dimen/dp_42"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_50"
android:text="(下面 1 项存在异常)"
android:textColor="@color/module_commons_wm_dialog_text_textColor"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toRightOf="@+id/title"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/check_image"
android:layout_width="@dimen/check_hard_ware_image_width"
android:layout_height="@dimen/check_hard_ware_image_height"
android:layout_marginLeft="@dimen/dp_460"
android:layout_marginTop="144dp"
android:background="@drawable/check_scan_second"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/error_tip"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginLeft="@dimen/dp_907"
android:layout_marginTop="@dimen/dp_177"
android:background="@drawable/check_little_btn"
android:backgroundTint="@color/check_tip_error_color"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_image" />
<TextView
android:id="@+id/unusual_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_24"
android:text="设备故障"
android:textColor="@color/module_commons_wm_dialog_text_textColor"
app:layout_constraintLeft_toRightOf="@+id/error_tip"
app:layout_constraintTop_toTopOf="@+id/error_tip" />
<ImageView
android:id="@+id/error_tip_green"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginLeft="@dimen/dp_160"
android:layout_marginTop="88dp"
android:background="@drawable/check_little_btn_green"
app:layout_constraintLeft_toRightOf="@id/unusual_title"
app:layout_constraintTop_toBottomOf="@+id/check_image" />
<TextView
android:id="@+id/usual_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_24"
android:text="设备正常"
android:textColor="@color/module_commons_wm_dialog_text_textColor"
app:layout_constraintLeft_toRightOf="@+id/error_tip_green"
app:layout_constraintTop_toTopOf="@+id/error_tip_green" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -6,5 +6,8 @@
<dimen name="check_button_left">133px</dimen>
<dimen name="check_image_bottom">78px</dimen>
<dimen name="check_image_right">50px</dimen>
<dimen name="check_hard_ware_image_width">1452px</dimen>
<dimen name="check_hard_ware_image_height">715px</dimen>
<dimen name="check_little_btn_width">32px</dimen>
</resources>

View File

@@ -3,5 +3,9 @@
<color name="blue_back_color">#1A1F40</color>
<color name="blue_check_color">#4192FF</color>
<color name="check_tip_error_color">#F03232</color>
<color name="check_little_btn_solid">#99FA1F21</color>
<color name="check_little_btn">#FF1F1F</color>
<color name="check_little_btn_solid_green">#997AFF87</color>
<color name="check_little_btn_green">#7AFF87</color>
</resources>