[dev_arch_opt_3.0]
[Change] [1、解决清扫车状态同步注册未修改bug] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -26,10 +26,9 @@ import androidx.annotation.NonNull;
|
||||
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.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;
|
||||
@@ -40,7 +39,6 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
|
||||
@@ -788,7 +786,7 @@ public class SweeperOperatePanelView extends LinearLayout {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
CallerSweeperFutianCleanSystemListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
// 最终调试时需要打开
|
||||
syncVehicleStateAndRecoverOperatePanelStates();
|
||||
// Mock VehicleState 数据回调
|
||||
@@ -800,7 +798,7 @@ public class SweeperOperatePanelView extends LinearLayout {
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerSweeperFutianCleanSystemListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角 数据 回调监听
|
||||
*/
|
||||
interface IMoGoSteeringStateListener {
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
fun onAutopilotSteeringData(steering: Float)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSteeringStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角 回调监听
|
||||
*/
|
||||
object CallerSteeringStateListenerManager : CallerBase<IMoGoSteeringStateListener>() {
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
fun invokeAutopilotSteeringData(steering: Float){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotSteeringData(steering)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user