diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java
index 31a47a3358..a4eac8c011 100644
--- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java
+++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java
@@ -3,6 +3,7 @@ package com.mogo.och.sweeper.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
+import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
@@ -22,7 +23,6 @@ import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import chassis.Chassis;
import chassis.ChassisStatesOuterClass;
-import chassis.VehicleStateOuterClass;
import planning.RoboSweeperTaskIndexOuterClass;
public class SweeperTrafficDataView extends ConstraintLayout {
@@ -32,6 +32,9 @@ public class SweeperTrafficDataView extends ConstraintLayout {
private TextView speedTextView;//速度值
private TurnSignalView sweeperTurnSignal;//转向灯
private SweeperLimitingVelocityView sweeperLimitingVelocity;//限速
+ private TextView tvBattery;//电量百分比展示
+ private ImageView ivBgWaterWarning;//水位预警背景图
+ private ImageView ivWater;//水位图标
public SweeperTrafficDataView(@NonNull Context context) {
super(context);
@@ -56,6 +59,9 @@ public class SweeperTrafficDataView extends ConstraintLayout {
speedTextView = findViewById(R.id.sweeperSpeedText);
sweeperTurnSignal = findViewById(R.id.sweeperTurnSignal);
sweeperLimitingVelocity = findViewById(R.id.sweeperLimitingVelocity);
+ tvBattery = findViewById(R.id.tvBattery);
+ ivBgWaterWarning = findViewById(R.id.sweeperIvBgWaterWarning);
+ ivWater = findViewById(R.id.sweeperIvWater);
}
@Override
protected void onAttachedToWindow() {
@@ -79,15 +85,21 @@ public class SweeperTrafficDataView extends ConstraintLayout {
@Override
public void onSweeperFutianCleanSystemState(@NonNull ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) {
-
+ if (cleanSystemState!=null&&cleanSystemState.hasSecuCleanWaterTankLow()) {//清水箱水位低不能清洗作业报警信号
+ ivBgWaterWarning.setVisibility(View.VISIBLE);
+ ivWater.setSelected(true);
+ }else{
+ ivBgWaterWarning.setVisibility(View.GONE);
+ ivWater.setSelected(false);
+ }
}
@Override
public void onBMSSystemStates(@NonNull ChassisStatesOuterClass.BMSSystemStates bmsSystemStates) {
-
+ if (bmsSystemStates!=null){
+ tvBattery.setText(String.format("%s%",65));
+ }
}
-
-
/**
* 车辆转向灯
* @param lightSwitch
diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.java
index adbc4ad114..f86733914d 100644
--- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.java
+++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.java
@@ -139,18 +139,15 @@ public class SweeperTrafficLightView extends IViewTrafficLight {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_red_nor);
- SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_lightyellow_nor);
- SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_green_nor);
- SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
- SweeperTrafficLightView.this.setVisibility(GONE);
+ mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_gay_nor);
break;
}
});
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_battery.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_battery.png
new file mode 100644
index 0000000000..5fee53445e
Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_battery.png differ
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_level_warning.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_level_warning.png
new file mode 100644
index 0000000000..96bf7d213a
Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_level_warning.png differ
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_nor.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_nor.png
new file mode 100644
index 0000000000..75dc6a3497
Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_nor.png differ
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_select.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_select.png
new file mode 100644
index 0000000000..026549d193
Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_water_select.png differ
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_light_gay_nor.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_light_gay_nor.png
new file mode 100644
index 0000000000..2b677df25f
Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_light_gay_nor.png differ
diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable/sweeper_water_selector.xml b/OCH/mogo-och-sweeper/src/main/res/drawable/sweeper_water_selector.xml
new file mode 100755
index 0000000000..9c959df076
--- /dev/null
+++ b/OCH/mogo-och-sweeper/src/main/res/drawable/sweeper_water_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_data.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_data.xml
index 70cf4a311c..1f4864c3c3 100644
--- a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_data.xml
+++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_data.xml
@@ -3,17 +3,18 @@
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_320"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/sweeper_bg_traffic_data"
android:paddingStart="@dimen/dp_47"
android:paddingTop="@dimen/dp_22">
@@ -45,12 +46,12 @@
android:id="@+id/sweeperTrafficPosition"
android:layout_width="@dimen/dp_200"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/dp_30"
+ android:layout_marginStart="@dimen/dp_20"
app:defaultColor="@color/acc_default_txt_color"
app:layout_constraintLeft_toRightOf="@+id/sweeperSpeedImage"
app:layout_constraintTop_toTopOf="parent"
app:selectColor="@color/dark_mode_select_txt_color"
- android:layout_marginTop="@dimen/dp_35"/>
+ android:layout_marginTop="@dimen/dp_30"/>
+ android:layout_marginStart="@dimen/dp_20"
+ android:layout_marginTop="@dimen/dp_10"/>
+
+
+
+
+
-
\ No newline at end of file
diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_light_view.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_light_view.xml
index f7c111451a..fe9a8bc34f 100644
--- a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_light_view.xml
+++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_traffic_light_view.xml
@@ -1,14 +1,14 @@
-
+ android:layout_height="match_parent"
+ xmlns:tools="http://schemas.android.com/tools">
+ android:src="@drawable/sweeper_light_gay_nor"/>
\ No newline at end of file
diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_turn_signal.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_turn_signal.xml
index 7dd5225a35..2af09a3830 100644
--- a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_turn_signal.xml
+++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_turn_signal.xml
@@ -5,15 +5,14 @@
android:orientation="horizontal">
\ No newline at end of file