[pb12][清扫车新老底盘兼容] 清扫车分支 老地盘数据转新地盘数据
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -141,38 +142,66 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
//自车状态(底盘),车灯等。
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
/**
|
||||
* 老底盘
|
||||
* TODO 老地盘数据会转发到新地盘
|
||||
* TODO 鹰眼不要用此接口展示页面相关,可以用来记录链路日志
|
||||
*
|
||||
* @param header 头
|
||||
* @param vehicleState 数据
|
||||
*/
|
||||
override fun onVehicleState(
|
||||
header: MessagePad.Header,
|
||||
vehicleState: VehicleStateOuterClass.VehicleState?
|
||||
) {
|
||||
|
||||
if (vehicleState != null) {
|
||||
//转向灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotLightSwitchData(vehicleState.light)
|
||||
//刹车灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
|
||||
//方向盘转向角数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotSteeringData(vehicleState.steering)
|
||||
//挂挡档位数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotGearData(vehicleState.gear)
|
||||
//加速度
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotAcc(vehicleState.accel)
|
||||
//油门
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotThrottle(vehicleState.throttle)
|
||||
//刹车
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrake(vehicleState.brake)
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
vehicleState.sweeperFutianCleanSystemState?.also {
|
||||
CallerAutopilotVehicleStateListenerManager.invokeSweeperFutianCleanSystemState(it)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onChassisStates(header: MessagePad.Header, chassisStates: ChassisStatesOuterClass.ChassisStates?) {
|
||||
if (chassisStates != null) {
|
||||
chassisStates.bcmSystemStates?.let { bcmSystemStates ->
|
||||
bcmSystemStates.turnLightState?.let {
|
||||
//转向灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotLightSwitchData(it)
|
||||
}
|
||||
//刹车灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrakeLightData(bcmSystemStates.brakeLightState != 0)
|
||||
}
|
||||
chassisStates.steerSystemStates?.let {
|
||||
//方向盘转向角数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotSteeringData(it.steeringWheelAngle)
|
||||
}
|
||||
chassisStates.gearSystemStates?.let { gearSystemStates ->
|
||||
gearSystemStates.gearPosition?.let {
|
||||
//挂挡档位数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotGearData(it)
|
||||
}
|
||||
}
|
||||
chassisStates.vehicleMotionStates?.let {
|
||||
//加速度
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotAcc(it.acceleration)
|
||||
}
|
||||
chassisStates.drivingSystemStates?.let {
|
||||
//油门
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotThrottle(it.throttleResponsePosition)
|
||||
}
|
||||
chassisStates.brakeSystemStates?.let {
|
||||
//刹车
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotBrake(it.brakePedalResponsePosition)
|
||||
}
|
||||
chassisStates.taskSystemStates?.let { taskSystemStates ->
|
||||
taskSystemStates.sweeperFutianTaskSystemStates?.let {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
CallerAutopilotVehicleStateListenerManager.invokeSweeperFutianCleanSystemState(it)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong())
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class MoGoHandAdasMsgManager implements
|
||||
@@ -187,7 +187,7 @@ public class MoGoHandAdasMsgManager implements
|
||||
|
||||
|
||||
@Override
|
||||
public void onSweeperFutianCleanSystemState(VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) {
|
||||
public void onSweeperFutianCleanSystemState(ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import android.content.*
|
||||
import android.util.Log
|
||||
import chassis.Chassis.GearPosition
|
||||
import chassis.Chassis.LightSwitch
|
||||
import chassis.VehicleStateOuterClass
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
@@ -82,7 +82,7 @@ internal class CanImpl(ctx: Context): IFlow<CanStatus>(ctx), IMoGoAutopilotVehic
|
||||
timeOutCheck()
|
||||
}
|
||||
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) {
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
send(CanStatus(isCanEnabled()))
|
||||
timeOutCheck()
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import chassis.Chassis
|
||||
import chassis.VehicleStateOuterClass
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
@@ -2164,7 +2164,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 清扫车(福田)清扫控制系统状态
|
||||
*/
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: VehicleStateOuterClass.SweeperFuTianCleanSystemState) {
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import system_master.SystemStatusInfo;
|
||||
@@ -166,7 +166,7 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {
|
||||
|
||||
@Override
|
||||
public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) {
|
||||
public void onSweeperFutianCleanSystemState(@NonNull ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,8 +26,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
@@ -124,7 +123,7 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
|
||||
private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {
|
||||
@Override
|
||||
public void onSweeperFutianCleanSystemState(@NonNull VehicleStateOuterClass.SweeperFuTianCleanSystemState cleanSystemState) {
|
||||
public void onSweeperFutianCleanSystemState(@NonNull ChassisStatesOuterClass.SweeperFuTianTaskSystemStates cleanSystemState) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user