diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CallerLoggerUtils.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CallerLoggerUtils.kt index 125b4b91d0..14e2610598 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CallerLoggerUtils.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CallerLoggerUtils.kt @@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_SWEEPER import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI_P @@ -24,7 +25,11 @@ object CallerLoggerUtils { AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ //小巴车乘客 M_BUS_P - }else{ + }else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)){ + //清扫车 + M_SWEEPER + } + else{ "" } } \ No newline at end of file diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java index 45e0d1dedd..5a72b271fe 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java @@ -39,8 +39,9 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; +import chassis.Chassis; +import chassis.ChassisStatesOuterClass; import chassis.SpecialVehicleTaskCmdOuterClass; -import chassis.VehicleStateOuterClass; /** * 清扫车操作面板View @@ -178,7 +179,7 @@ public class SweeperOperatePanelView extends LinearLayout { } @Override - public boolean onCheckIfCmdSuccess(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + public boolean onCheckIfCmdSuccess(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { boolean success = false; if (cleanSystemState == null) { return success; @@ -284,7 +285,7 @@ public class SweeperOperatePanelView extends LinearLayout { } @Override - public boolean onCheckIfCmdSuccess(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + public boolean onCheckIfCmdSuccess(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { boolean success = false; if (cleanSystemState == null) { return success; @@ -402,7 +403,7 @@ public class SweeperOperatePanelView extends LinearLayout { } @Override - public boolean onCheckIfCmdSuccess(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + public boolean onCheckIfCmdSuccess(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { boolean success = false; if (cleanSystemState == null) { return success; @@ -490,7 +491,7 @@ public class SweeperOperatePanelView extends LinearLayout { } @Override - public boolean onCheckIfCmdSuccess(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + public boolean onCheckIfCmdSuccess(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { boolean success = false; if (cleanSystemState == null) { return success; @@ -759,7 +760,7 @@ public class SweeperOperatePanelView extends LinearLayout { private final IMoGoSweeperFutianCleanSystemListener mIMoGoAutopilotVehicleStateListener = new IMoGoSweeperFutianCleanSystemListener() { @Override - public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + public void onSweeperFutianCleanSystemState(@NonNull ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { long current = System.currentTimeMillis(); if (current - mCurrentTimeMillis <= VEHICLE_STATE_INTERVAL_MILLIS) { return; @@ -810,7 +811,7 @@ public class SweeperOperatePanelView extends LinearLayout { mSyncingVehicleState = true; } - private synchronized void onSyncVehicleStateCallBack(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + private synchronized void onSyncVehicleStateCallBack(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { if (cleanSystemState == null) return; mSyncingVehicleState = false; // 清扫作业开启状态(以电机状态为true代表Open成功,实际控制端控制步骤为:1.发送远程控制上装指令 2.发送电机启动指令) @@ -902,7 +903,7 @@ public class SweeperOperatePanelView extends LinearLayout { * @param cleanSystemState * @return */ - private boolean checkIfCleanModePureSweep(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { + private boolean checkIfCleanModePureSweep(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) { // 作业模式状态 // 洗扫 boolean clean_mode_wash_sweep = cleanSystemState.getSecuModWashSweepSts(); @@ -1019,7 +1020,7 @@ public class SweeperOperatePanelView extends LinearLayout { void onCountDownTick(int senonds); - boolean onCheckIfCmdSuccess(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState); + boolean onCheckIfCmdSuccess(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState); void onCmdSuccess(); diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperTrafficLightView.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperTrafficLightView.java index 5f99d4836e..e2019626e6 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperTrafficLightView.java +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperTrafficLightView.java @@ -4,6 +4,7 @@ import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; +import android.widget.TextView; import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; @@ -13,14 +14,14 @@ import com.mogo.och.common.module.wigets.OCHGradientTextView; import org.jetbrains.annotations.Nullable; /** - * Bus司机端:红绿灯view + * 清扫车:红绿灯view * * Created on 2022/3/29 */ public class SweeperTrafficLightView extends IViewTrafficLight { private ImageView mLightIconIV; - private OCHGradientTextView mLightTimeTV; + private TextView mLightTimeTV; private int mCurrentLightId; public SweeperTrafficLightView(@Nullable Context context) { @@ -98,9 +99,6 @@ public class SweeperTrafficLightView extends IViewTrafficLight { super.changeCountdownRed(redNum); UiThreadHandler.post(() -> { if (redNum > 0) { - mLightTimeTV.setVertrial(true); - mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_red_color_up), - getResources().getColor(R.color.sweeper_traffic_light_red_color_down)}); mLightTimeTV.setText(String.valueOf(redNum)); } else { mLightTimeTV.setText(""); @@ -113,9 +111,6 @@ public class SweeperTrafficLightView extends IViewTrafficLight { super.changeCountdownGreen(greenNum); UiThreadHandler.post(() -> { if (greenNum > 0) { - mLightTimeTV.setVertrial(true); - mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_green_color_up), - getResources().getColor(R.color.sweeper_traffic_light_green_color_down)}); mLightTimeTV.setText(String.valueOf(greenNum)); } else { mLightTimeTV.setText(""); @@ -128,9 +123,6 @@ public class SweeperTrafficLightView extends IViewTrafficLight { super.changeCountdownYellow(yellowNum); UiThreadHandler.post(() -> { if (yellowNum > 0) { - mLightTimeTV.setVertrial(true); - mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.sweeper_traffic_light_yellow_color_up), - getResources().getColor(R.color.sweeper_traffic_light_yellow_color_down)}); mLightTimeTV.setText(String.valueOf(yellowNum)); } else { mLightTimeTV.setText(""); diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml index 0b0646bb8b..6d4f19207e 100644 --- a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml +++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml @@ -89,19 +89,22 @@ android:id="@+id/sweeper_switch_model_layout" android:layout_width="@dimen/module_mogo_och_operation_status_bg_width" android:layout_height="@dimen/module_mogo_och_operation_status_bg_height" - android:layout_marginLeft="@dimen/module_mogo_och_margin_left" android:background="@drawable/sweeper_switch_map_bg" android:elevation="@dimen/sweeper_dp_10" android:padding="@dimen/sweeper_dp_20" - app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status" - app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + android:layout_marginLeft="@dimen/module_mogo_och_margin_left" + android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom" android:gravity="center" android:orientation="horizontal"> + android:layout_width="@dimen/dp_80" + android:layout_height="@dimen/dp_80" + android:layout_centerInParent="true" + android:layout_gravity="center" /> + app:layout_constraintLeft_toLeftOf="parent" + android:visibility="gone"/> @@ -149,8 +153,8 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout"> @@ -168,8 +172,8 @@ app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl"> @@ -191,7 +195,8 @@ app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:textSize="@dimen/module_mogo_och_slide_panel_textSize" - tools:visibility="visible" /> + tools:visibility="visible" + />