From f567b4f971bd17ca6f0a41de57c85af983aa682a Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 8 Feb 2023 15:37:16 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[=201?= =?UTF-8?q?=E3=80=81=E8=A7=A3=E5=86=B3=E5=90=88=E5=B9=B63.0=E7=9A=84?= =?UTF-8?q?=E5=88=86=E6=94=AF=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../fragment/BaseSweeperTabFragment.java | 30 ++--------------- .../och/sweeper/model/SweeperTaskModel.java | 33 ++++++++++--------- .../sweeper/ui/SweeperOperatePanelView.java | 27 +++++++-------- .../main/res/layout/sweeper_base_fragment.xml | 10 ------ 4 files changed, 32 insertions(+), 68 deletions(-) diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java index c3f4a24f84..fa60cf4551 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java @@ -1,16 +1,13 @@ package com.mogo.och.sweeper.fragment; -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS; -import static com.mogo.och.sweeper.constant.SweeperConst.TIMER_START_AUTOPILOT_INTERVAL; - -import android.animation.ObjectAnimator; -import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; +import android.widget.LinearLayout; +import androidx.annotation.NonNull; import androidx.constraintlayout.widget.Group; import androidx.fragment.app.FragmentTransaction; @@ -23,10 +20,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; -import com.mogo.eagle.core.function.call.map.CallerSmpManager; -import com.mogo.eagle.core.function.smp.view.SmallMapView; import com.mogo.eagle.core.function.view.MapBizView; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener; import com.mogo.map.listener.IMogoMapListener; import com.mogo.map.listener.MogoMapListenerHandler; @@ -51,7 +45,7 @@ public abstract class BaseSweeperTabFragment stationList.size() - 1) { CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界"); @@ -287,7 +288,7 @@ public class SweeperTaskModel { return; } - CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); + CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters); CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters) + " startLatLon=" + parameters.startName + ",endLatLon=" + parameters.endName + @@ -303,8 +304,8 @@ public class SweeperTaskModel { public void closeBeautificationMode() { if (FunctionBuildConfig.isDemoMode) { FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; //是否强制绘制引导线 - CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false);// 同步给乘客屏 - CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false);//是否自动启动自驾 + CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(false);// 同步给乘客屏 + CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);//是否自动启动自驾 CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为false"); } } @@ -317,7 +318,7 @@ public class SweeperTaskModel { */ private void startBeautificationMode() { FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; - CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); + CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(true); } public void clearBusStationData() { @@ -345,7 +346,7 @@ public class SweeperTaskModel { return; } CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束===="); - CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); + CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot(); CallerLogger.INSTANCE.d(M_BUS + TAG, "任务正常走完endTask()"); } 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 9ff4cc1ef4..fcf6a2825c 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 @@ -1,5 +1,15 @@ package com.mogo.och.sweeper.ui; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_BOTH_SIDE; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_LEFT_SIDE; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_RIGHT_SIDE; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_INTENSITY_STRAND; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_INTENSITY_STRONG; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_DRAW; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_SWEEP; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_WASH; +import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_WASH_SWEEP; + import android.content.Context; import android.os.Handler; import android.os.Message; @@ -13,11 +23,8 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; -import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener; + import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager; -import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager; import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener; import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.eagle.core.utilcode.util.ToastUtils; @@ -33,16 +40,6 @@ import java.util.List; import chassis.ChassisStatesOuterClass; import chassis.SpecialVehicleTaskCmdOuterClass; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_BOTH_SIDE; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_LEFT_SIDE; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_DIRECTION_RIGHT_SIDE; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_INTENSITY_STRAND; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_INTENSITY_STRONG; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_DRAW; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_SWEEP; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_PURE_WASH; -import static com.mogo.och.sweeper.util.SweeperFutianCmdUtil.CLEAN_MODE_WASH_SWEEP; - /** * 清扫车操作面板View */ @@ -1006,7 +1003,7 @@ public class SweeperOperatePanelView extends LinearLayout { * 发送指令 */ private void sendFuTianTaskCmd(SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianTaskCmd fuTianTaskCmd){ - CallerAutoPilotManager.INSTANCE.sendSweeperFuTianTaskCmd(fuTianTaskCmd); + CallerAutoPilotControlManager.INSTANCE.sendSweeperFuTianTaskCmd(fuTianTaskCmd); // log发送命令 logSweeperCmdValue(fuTianTaskCmd); } 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 531d1b84b9..dfba90d42a 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 @@ -284,15 +284,5 @@ ,btnAutopilotRunning" tools:visibility="visible" /> - \ No newline at end of file