[dev_arch_opt_3.0]

[Change]
[1、分离清扫车(福田)清扫控制系统状态监听,单独回调]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-05 18:57:20 +08:00
parent 9a6102a4c6
commit cf94486dfd
13 changed files with 45 additions and 61 deletions

View File

@@ -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) {

View File

@@ -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())

View File

@@ -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) {
}
}

View File

@@ -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<CanStatus>(ctx),
IMoGoAutopilotVehicleStateListener,
IMoGoAutopilotStatusListener,
IMoGoChassisLamplightListener{
IMoGoChassisLamplightListener,
IMoGoSweeperFutianCleanSystemListener {
companion object {
const val TAG = "CanImpl"

View File

@@ -109,7 +109,8 @@ class DebugSettingView @JvmOverloads constructor(
IMoGoAutopilotVehicleStateListener,
IMoGoDevaToolsFuncConfigListener,
IMoGoChassisLamplightListener,
IMoGoDevaToolsListener{
IMoGoDevaToolsListener,
IMoGoSweeperFutianCleanSystemListener{
private val TAG = "DebugSettingView"

View File

@@ -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 刹车
*/

View File

@@ -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) {
}
/**
* 方向盘转向角 左+右-

View File

@@ -1,8 +1,5 @@
package com.mogo.eagle.core.function.api.autopilot
import mogo.telematics.pad.MessagePad
import rule_segement.MogoPointCloudOuterClass
/**
* @author xiaoyuzhou

View File

@@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.api.autopilot
import com.zhidao.support.adas.high.bean.AutopilotStatistics
/**
* 启动自动驾驶状态统计监听
*/
interface IMoGoAutopilotStatisticsListener {
/**

View File

@@ -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)
}

View File

@@ -0,0 +1,13 @@
package com.mogo.eagle.core.function.api.autopilot
import chassis.VehicleStateOuterClass
/**
* 清扫车(福田)清扫控制系统状态
*/
interface IMoGoSweeperFutianCleanSystemListener {
/**
* 清扫车(福田)清扫控制系统状态
*/
fun onSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState)
}

View File

@@ -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<IMoGoAutopilotVeh
}
}
/**
* clean system state 清扫车(福田)清扫控制系统状态
*/
fun invokeSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState){
M_LISTENERS.forEach{
val listener = it.value
listener.onSweeperFutianCleanSystemState(cleanSystemState)
}
}
/**
* 工控机时间回调
*/

View File

@@ -0,0 +1,21 @@
package com.mogo.eagle.core.function.call.autopilot
import chassis.VehicleStateOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 清扫车(福田)清扫控制系统状态
*/
object CallerSweeperFutianCleanSystemListenerManager : CallerBase<IMoGoSweeperFutianCleanSystemListener>() {
/**
* clean system state 清扫车(福田)清扫控制系统状态
*/
fun invokeSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) {
M_LISTENERS.forEach {
val listener = it.value
listener.onSweeperFutianCleanSystemState(cleanSystemState)
}
}
}