From cf94486dfda82c273714f921bf0e32bfd162d6ef Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 5 Jan 2023 18:57:20 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[1?= =?UTF-8?q?=E3=80=81=E5=88=86=E7=A6=BB=E6=B8=85=E6=89=AB=E8=BD=A6=EF=BC=88?= =?UTF-8?q?=E7=A6=8F=E7=94=B0=EF=BC=89=E6=B8=85=E6=89=AB=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=8A=B6=E6=80=81=E7=9B=91=E5=90=AC=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E5=9B=9E=E8=B0=83]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../sweeper/ui/SweeperOperatePanelView.java | 26 ++----------------- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 2 +- .../adapter/MoGoHandAdasMsgManager.java | 5 ---- .../status/flow/can/CanImpl.kt | 4 ++- .../hmi/ui/setting/DebugSettingView.kt | 3 ++- .../hmi/ui/widget/SteeringWheelView.java | 4 --- .../hmi/ui/widget/TrafficDataView.java | 4 --- .../IMoGoAutopilotPointCloudListener.kt | 3 --- .../IMoGoAutopilotStatisticsListener.kt | 4 ++- .../IMoGoAutopilotVehicleStateListener.kt | 5 ---- .../IMoGoSweeperFutianCleanSystemListener.kt | 13 ++++++++++ ...lerAutopilotVehicleStateListenerManager.kt | 12 --------- ...SweeperFutianCleanSystemListenerManager.kt | 21 +++++++++++++++ 13 files changed, 45 insertions(+), 61 deletions(-) create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoSweeperFutianCleanSystemListener.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerSweeperFutianCleanSystemListenerManager.kt 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 cba08339cf..0715592e7f 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 @@ -27,6 +27,7 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener; +import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager; import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener; @@ -757,30 +758,7 @@ public class SweeperOperatePanelView extends LinearLayout { /** * 底盘数据透传listener */ - private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() { - @Override - public void onAutopilotDataException(long timestamp) { - } - - @Override - public void onAutopilotSteeringData(float steering) { - } - - @Override - public void onAutopilotGearData(@NonNull Chassis.GearPosition gear) { - } - - @Override - public void onAutopilotAcc(float carAcc) { - } - - @Override - public void onAutopilotThrottle(float throttle) { - } - - @Override - public void onAutopilotBrake(float brake) { - } + private final IMoGoSweeperFutianCleanSystemListener mIMoGoAutopilotVehicleStateListener = new IMoGoSweeperFutianCleanSystemListener() { @Override public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt index 1ca3243662..86c9390b90 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -170,7 +170,7 @@ class MoGoAdasListenerImpl : OnAdasListener { CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrake(vehicleState.brake) //清扫车(福田)清扫控制系统状态 vehicleState.sweeperFutianCleanSystemState?.also { - CallerAutopilotVehicleStateListenerManager.invokeSweeperFutianCleanSystemState(it) + CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(it) } } else { CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong()) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoHandAdasMsgManager.java b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoHandAdasMsgManager.java index 746e6010fe..557215e91d 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoHandAdasMsgManager.java +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoHandAdasMsgManager.java @@ -27,7 +27,6 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import org.jetbrains.annotations.NotNull; import chassis.Chassis; -import chassis.VehicleStateOuterClass; import mogo.telematics.pad.MessagePad; public class MoGoHandAdasMsgManager implements @@ -188,8 +187,4 @@ public class MoGoHandAdasMsgManager implements } - @Override - public void onSweeperFutianCleanSystemState(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { - - } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt index d39eec0115..3659d2f417 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/can/CanImpl.kt @@ -8,6 +8,7 @@ import chassis.VehicleStateOuterClass import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener +import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager @@ -27,7 +28,8 @@ internal class CanImpl(ctx: Context): IFlow(ctx), IMoGoAutopilotVehicleStateListener, IMoGoAutopilotStatusListener, - IMoGoChassisLamplightListener{ + IMoGoChassisLamplightListener, + IMoGoSweeperFutianCleanSystemListener { companion object { const val TAG = "CanImpl" diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 93b37a0394..f0d24cb4f4 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -109,7 +109,8 @@ class DebugSettingView @JvmOverloads constructor( IMoGoAutopilotVehicleStateListener, IMoGoDevaToolsFuncConfigListener, IMoGoChassisLamplightListener, - IMoGoDevaToolsListener{ + IMoGoDevaToolsListener, + IMoGoSweeperFutianCleanSystemListener{ private val TAG = "DebugSettingView" diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java index 11c6f71cda..f6b894cca9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java @@ -165,10 +165,6 @@ public class SteeringWheelView extends ConstraintLayout { private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() { - @Override - public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { - } - /** * @param brake 刹车 */ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java index e069517e3f..cb6c486e16 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java @@ -26,7 +26,6 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils; import org.jetbrains.annotations.NotNull; import chassis.Chassis; -import chassis.VehicleStateOuterClass; /** * @author Jing @@ -122,9 +121,6 @@ public class TrafficDataView extends ConstraintLayout { } private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() { - @Override - public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) { - } /** * 方向盘转向角 左+右- diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt index 2cc349f35a..6bddda52bf 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt @@ -1,8 +1,5 @@ package com.mogo.eagle.core.function.api.autopilot -import mogo.telematics.pad.MessagePad -import rule_segement.MogoPointCloudOuterClass - /** * @author xiaoyuzhou diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatisticsListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatisticsListener.kt index deebe23b33..8bb5d83d75 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatisticsListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotStatisticsListener.kt @@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.api.autopilot import com.zhidao.support.adas.high.bean.AutopilotStatistics - +/** + * 启动自动驾驶状态统计监听 + */ interface IMoGoAutopilotStatisticsListener { /** diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotVehicleStateListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotVehicleStateListener.kt index fa92a0ed2e..28354c8918 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotVehicleStateListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotVehicleStateListener.kt @@ -1,7 +1,6 @@ package com.mogo.eagle.core.function.api.autopilot import chassis.Chassis -import chassis.VehicleStateOuterClass /** * 车辆底盘 数据 回调监听 @@ -41,8 +40,4 @@ interface IMoGoAutopilotVehicleStateListener { */ fun onAutopilotBrake(brake: Float) - /** - * 清扫车(福田)清扫控制系统状态 - */ - fun onSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoSweeperFutianCleanSystemListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoSweeperFutianCleanSystemListener.kt new file mode 100644 index 0000000000..9cbd3b5dda --- /dev/null +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoSweeperFutianCleanSystemListener.kt @@ -0,0 +1,13 @@ +package com.mogo.eagle.core.function.api.autopilot + +import chassis.VehicleStateOuterClass + +/** + * 清扫车(福田)清扫控制系统状态 + */ +interface IMoGoSweeperFutianCleanSystemListener { + /** + * 清扫车(福田)清扫控制系统状态 + */ + fun onSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) +} \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotVehicleStateListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotVehicleStateListenerManager.kt index 6c4c4283d8..2da7bddd91 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotVehicleStateListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotVehicleStateListenerManager.kt @@ -1,7 +1,6 @@ package com.mogo.eagle.core.function.call.autopilot import chassis.Chassis -import chassis.VehicleStateOuterClass import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener import com.mogo.eagle.core.function.call.base.CallerBase @@ -66,17 +65,6 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() { + + /** + * clean system state 清扫车(福田)清扫控制系统状态 + */ + fun invokeSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) { + M_LISTENERS.forEach { + val listener = it.value + listener.onSweeperFutianCleanSystemState(cleanSystemState) + } + } +} \ No newline at end of file