[pb10][金旅M1][电池状态回调]新增金旅M1控制命令和m1状态回调接口,以及电池状态接口
This commit is contained in:
@@ -16,9 +16,10 @@ import java.util.List;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
|
||||
public class SpecialVehicleBean {
|
||||
private interface TAG {
|
||||
public interface TAG {
|
||||
String FTQSC = "ftqsc";//福田清扫车
|
||||
String KWXB = "kwxb";//开沃小巴
|
||||
String JLM1 = "jlm1";//金旅M1
|
||||
}
|
||||
|
||||
public interface SEND_TYPE {
|
||||
@@ -30,7 +31,7 @@ public class SpecialVehicleBean {
|
||||
public final String name;
|
||||
public final String simpleName;//简单名字 两个字
|
||||
public final List<SpecialVehicleOption> options;
|
||||
private final String tag;//用于存储
|
||||
public final String tag;//用于存储
|
||||
public int sendType = SEND_TYPE.ONE;//发送类型
|
||||
private SpecialVehicleFloatWindowManager manager;
|
||||
|
||||
@@ -127,20 +128,79 @@ public class SpecialVehicleBean {
|
||||
int checkPos = options.get(index).checkPos;
|
||||
setFuTianCleanValue(builder, index, checkPos);
|
||||
}
|
||||
|
||||
SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianCleanCmd fuTianCleanCmd = builder.build();
|
||||
SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianTaskCmd fuTianTaskCmd = SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianTaskCmd.newBuilder()
|
||||
.setRoboSweeperFutianCleanCmd(fuTianCleanCmd).build();
|
||||
AdasManager.getInstance().sendRoboSweeperFuTianTaskCmd(fuTianTaskCmd);
|
||||
str = TextFormat.printer().escapingNonAscii(false).printToString(fuTianTaskCmd).replaceAll("\n", "");
|
||||
str = TextFormat.printer().escapingNonAscii(false).shortDebugString(fuTianTaskCmd);
|
||||
} else if (TextUtils.equals(this.tag, TAG.KWXB)) { //开沃小巴
|
||||
SpecialVehicleTaskCmdOuterClass.RoboVanSkywellTaskCmd vanSkywellTaskCmd = SpecialVehicleTaskCmdOuterClass.RoboVanSkywellTaskCmd.newBuilder()
|
||||
.build();
|
||||
AdasManager.getInstance().sendRoboVanSkywellTaskCmd(vanSkywellTaskCmd);
|
||||
} else if (TextUtils.equals(this.tag, TAG.JLM1)) { //金旅M1
|
||||
SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.Builder builder = SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder();
|
||||
if (index < 0) {
|
||||
for (index = 0; index < options.size(); index++) {
|
||||
SpecialVehicleOption option = options.get(index);
|
||||
if (option.moreCheckPos != -1) {
|
||||
option.checkPos = option.moreCheckPos;
|
||||
option.moreCheckPos = -1;
|
||||
}
|
||||
setJinlvM1Value(builder, index, option.checkPos);
|
||||
}
|
||||
} else {
|
||||
int checkPos = options.get(index).checkPos;
|
||||
setJinlvM1Value(builder, index, checkPos);
|
||||
}
|
||||
SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd roboBusJinlvM1Cmd = builder.build();
|
||||
AdasManager.getInstance().sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd);
|
||||
str = TextFormat.printer().escapingNonAscii(false).shortDebugString(roboBusJinlvM1Cmd);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private void setJinlvM1Value(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.Builder builder, int index, int checkPos) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
builder.setAirConditionerCmd(checkPos);
|
||||
break;
|
||||
case 1:
|
||||
builder.setAirConditionerModeCmd(checkPos);
|
||||
break;
|
||||
case 2:
|
||||
builder.setAirConditionerWindSpeedCmd(checkPos);
|
||||
break;
|
||||
case 3:
|
||||
if (checkPos == 1) {
|
||||
checkPos = 16;
|
||||
} else if (checkPos == 2) {
|
||||
checkPos = 20;
|
||||
} else if (checkPos == 3) {
|
||||
checkPos = 26;
|
||||
}
|
||||
builder.setAirConditionerTemperatureCmd(checkPos);
|
||||
break;
|
||||
case 4:
|
||||
builder.setHeaderCmd(checkPos);
|
||||
break;
|
||||
case 5:
|
||||
builder.setHeaderWindSpeedCmd(checkPos);
|
||||
break;
|
||||
case 6:
|
||||
builder.setMainLamp1Cmd(checkPos);
|
||||
break;
|
||||
case 7:
|
||||
builder.setMainLamp2Cmd(checkPos);
|
||||
break;
|
||||
case 8:
|
||||
builder.setSmallLampCmd(checkPos);
|
||||
break;
|
||||
case 9:
|
||||
builder.setFrontDoorCmd(checkPos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setFuTianCleanValue(SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianCleanCmd.Builder builder, int index, int checkPos) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
@@ -222,8 +282,65 @@ public class SpecialVehicleBean {
|
||||
optionsF.add(new SpecialVehicleOption("扫盘加速", tag, value, 0));
|
||||
SpecialVehicleBean beanF = new SpecialVehicleBean("福田清扫车", "福清", TAG.FTQSC, optionsF);
|
||||
SpecialVehicleBean beanK = new SpecialVehicleBean("开沃小巴", "开巴", TAG.KWXB, null);
|
||||
List<SpecialVehicleOption> optionsM1 = new ArrayList<>();
|
||||
tag = 0;
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-开启空调";
|
||||
value[2] = "2-关闭空调";
|
||||
optionsM1.add(new SpecialVehicleOption("空调", tag++, value, 0));
|
||||
value = new String[4];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-自动模式";
|
||||
value[2] = "2-制冷模式";
|
||||
value[3] = "3-通风模式";
|
||||
optionsM1.add(new SpecialVehicleOption("空调模式", tag++, value, 0));
|
||||
value = new String[4];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-1档";
|
||||
value[2] = "2-2档";
|
||||
value[3] = "3-3档";
|
||||
optionsM1.add(new SpecialVehicleOption("空调档位", tag++, value, 0));
|
||||
value = new String[4];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "16-16度";
|
||||
value[2] = "20-20度";
|
||||
value[3] = "26-26度";
|
||||
optionsM1.add(new SpecialVehicleOption("空调温度", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-开启暖风";
|
||||
value[2] = "2-关闭暖风";
|
||||
optionsM1.add(new SpecialVehicleOption("暖风机", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-1档";
|
||||
value[2] = "2-2档";
|
||||
optionsM1.add(new SpecialVehicleOption("暖风机档位", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-开启";
|
||||
value[2] = "2-关闭";
|
||||
optionsM1.add(new SpecialVehicleOption("顶灯1", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-开启";
|
||||
value[2] = "2-关闭";
|
||||
optionsM1.add(new SpecialVehicleOption("顶灯2", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-开启";
|
||||
value[2] = "2-关闭";
|
||||
optionsM1.add(new SpecialVehicleOption("氛围灯", tag++, value, 0));
|
||||
value = new String[3];
|
||||
value[0] = "0-DEFAULT";
|
||||
value[1] = "1-打开";
|
||||
value[2] = "2-关闭";
|
||||
optionsM1.add(new SpecialVehicleOption("车门", tag++, value, 0));
|
||||
SpecialVehicleBean beanM1 = new SpecialVehicleBean("金旅M1", "M1", TAG.JLM1, optionsM1);
|
||||
list.add(beanF);
|
||||
list.add(beanK);
|
||||
list.add(beanM1);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -880,7 +880,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatistics(AutopilotStatistics statistics) {
|
||||
Log.i(TAG, "启动自动驾驶状态=" + statistics.status + " 用时=" + statistics.usedTime + " SetAutopilotModeReq=" + TextFormat.printer().escapingNonAscii(false).printToString(statistics.req) + " failedMessage=" + (statistics.failedMessage == null ? null : TextFormat.printer().escapingNonAscii(false).printToString(statistics.failedMessage)));
|
||||
Log.i(TAG, "启动自动驾驶状态=" + statistics.status + " 用时=" + statistics.usedTime + " SetAutopilotModeReq=" + (statistics.req == null ? null : TextFormat.printer().escapingNonAscii(false).printToString(statistics.req)) + " failedMessage=" + (statistics.failedMessage == null ? null : TextFormat.printer().escapingNonAscii(false).printToString(statistics.failedMessage)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1291,6 +1291,13 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
AdasManager.getInstance().sendGlobalPathReq();
|
||||
break;
|
||||
case Constants.TITLE.SEND_SPECIAL_VEHICLE_TASK_CMD:
|
||||
// AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(1,2,3,4);
|
||||
// AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(5,6);
|
||||
// AdasManager.getInstance().sendRoboBusJinlvM1MainLampCmd(7,8);
|
||||
// AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(9);
|
||||
// AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(10);
|
||||
|
||||
|
||||
if (specialVehicleBeanList == null) {
|
||||
specialVehicleBeanList = SpecialVehicleBean.init();
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ public class SpecialVehicleDialog extends Dialog {
|
||||
private void initView() {
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
findViewById(R.id.settings).setVisibility(View.GONE);
|
||||
findViewById(R.id.cancel).setVisibility(View.GONE);
|
||||
TextView textView = findViewById(R.id.title);
|
||||
textView.setText("特种车辆");
|
||||
}
|
||||
|
||||
@@ -330,9 +330,11 @@ public class SpecialVehicleFloatWindow extends LinearLayout {
|
||||
.findViewById(R.id.r_btn);
|
||||
button.setText(value[j]);
|
||||
button.setId(j);
|
||||
if (i == 1 || i == 2 || i == 3 || i == 4) {
|
||||
ViewGroup.LayoutParams layoutParams = button.getLayoutParams();
|
||||
layoutParams.width = 202;
|
||||
if (specialVehicleBean.tag.equals(SpecialVehicleBean.TAG.FTQSC)) {
|
||||
if (i == 1 || i == 2 || i == 3 || i == 4) {
|
||||
ViewGroup.LayoutParams layoutParams = button.getLayoutParams();
|
||||
layoutParams.width = 202;
|
||||
}
|
||||
}
|
||||
radioGroup.addView(button);
|
||||
}
|
||||
|
||||
@@ -176,6 +176,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(vehicleState.throttle)
|
||||
//刹车
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(vehicleState.brake)
|
||||
//电量
|
||||
if (vehicleState.hasBmsSoc()) {
|
||||
CallerBatteryManagementSystemListenerManager.invokeBatteryManagementSystemStates(
|
||||
ChassisStatesOuterClass.BMSSystemStates.newBuilder()
|
||||
.setBmsSoc(vehicleState.bmsSoc).build()
|
||||
)
|
||||
}
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
vehicleState.sweeperFutianCleanSystemState?.also { sweeperState ->
|
||||
val bytes: ByteArray = sweeperState.toByteArray()
|
||||
@@ -184,6 +191,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(it)
|
||||
}
|
||||
}
|
||||
//金旅M1
|
||||
vehicleState.roboBusJinlvM1State?.also {
|
||||
if (vehicleState.hasRoboBusJinlvM1State()) {
|
||||
CallerRoboBusJinlvM1StatesListenerManager.invokeRoboBusJinlvM1States(it)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong())
|
||||
}
|
||||
@@ -235,6 +248,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
//刹车
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(it.brakePedalResponsePosition)
|
||||
}
|
||||
chassisStates.bmsSystemStates?.let {
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.invokeBatteryManagementSystemStates(it)
|
||||
}
|
||||
chassisStates.taskSystemStates?.let { taskSystemStates ->
|
||||
taskSystemStates.sweeperFutianTaskSystemStates?.let {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
interface IMoGoBatteryManagementSystemListener {
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
|
||||
/**
|
||||
* 金旅M1
|
||||
*/
|
||||
interface IMoGoRoboBusJinlvM1StatesListener {
|
||||
|
||||
fun onRoboBusJinlvM1States(states: VehicleStateOuterClass.RoboBusJinlvM1State)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 电池管理系统 包含 电量剩余百分比 电压 电流等
|
||||
*/
|
||||
object CallerBatteryManagementSystemListenerManager : CallerBase<IMoGoBatteryManagementSystemListener>() {
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun invokeBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onBatteryManagementSystemStates(states)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoRoboBusJinlvM1StatesListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 金旅M1
|
||||
*/
|
||||
object CallerRoboBusJinlvM1StatesListenerManager : CallerBase<IMoGoRoboBusJinlvM1StatesListener>() {
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun invokeRoboBusJinlvM1States(states: VehicleStateOuterClass.RoboBusJinlvM1State) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onRoboBusJinlvM1States(states)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1207,6 +1207,95 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return sendSpecialVehicleTaskCmd(cmdBuild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1空调控制
|
||||
*
|
||||
* @param switchCmd 0: default, 1: 开启空调, 2: 关闭空调
|
||||
* @param modeCmd 模式 0: default, 1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
* @param windSpeedCmd 风速 0: default, 1: 1档,2: 2档,3:3档
|
||||
* @param temperatureCmd 温度 0: default, 16-26: 温度
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1AirConditionerCmd(int switchCmd, int modeCmd, int windSpeedCmd, int temperatureCmd) {
|
||||
return sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder()
|
||||
.setAirConditionerCmd(switchCmd)
|
||||
.setAirConditionerModeCmd(modeCmd)
|
||||
.setAirConditionerWindSpeedCmd(windSpeedCmd)
|
||||
.setAirConditionerTemperatureCmd(temperatureCmd)
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1暖风机控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启暖风机, 2: 关闭暖风机
|
||||
* @param windSpeedCmd //风速 0: default, 1: 1档,2: 2档
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1HeaderCmd(int switchCmd, int windSpeedCmd) {
|
||||
return sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder()
|
||||
.setHeaderCmd(switchCmd)
|
||||
.setHeaderWindSpeedCmd(windSpeedCmd)
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1顶灯控制
|
||||
*
|
||||
* @param switch1Cmd //0: default, 1: 开启顶灯1, 2: 关闭顶灯1
|
||||
* @param switch2Cmd //0: default, 1: 开启顶灯2, 2: 关闭顶灯2
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1MainLampCmd(int switch1Cmd, int switch2Cmd) {
|
||||
return sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder()
|
||||
.setMainLamp1Cmd(switch1Cmd)
|
||||
.setMainLamp2Cmd(switch2Cmd)
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1小灯(氛围灯)控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启小灯(氛围灯), 2: 关闭小灯(氛围灯)
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1SmallLampCmd(int switchCmd) {
|
||||
return sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder()
|
||||
.setSmallLampCmd(switchCmd)
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1车门控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启车门, 2: 关闭车门
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1FrontDoorCmd(int switchCmd) {
|
||||
return sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd.newBuilder()
|
||||
.setFrontDoorCmd(switchCmd)
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1业务指令下发
|
||||
*
|
||||
* @param roboBusJinlvM1Cmd 命令
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd roboBusJinlvM1Cmd) {
|
||||
SpecialVehicleTaskCmdOuterClass.SpecialVehicleTaskCmd.Builder cmdBuild = SpecialVehicleTaskCmdOuterClass.SpecialVehicleTaskCmd
|
||||
.newBuilder()
|
||||
.setRoboBusJinlvM1Cmd(roboBusJinlvM1Cmd);
|
||||
return sendSpecialVehicleTaskCmd(cmdBuild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 特种车辆命令下发
|
||||
*
|
||||
|
||||
@@ -623,6 +623,77 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendRoboVanSkywellTaskCmd(vanSkywellTaskCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1空调控制
|
||||
*
|
||||
* @param switchCmd 0: default, 1: 开启空调, 2: 关闭空调
|
||||
* @param modeCmd 模式 0: default, 1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
* @param windSpeedCmd 风速 0: default, 1: 1档,2: 2档,3:3档
|
||||
* @param temperatureCmd 温度 0: default, 16-26: 温度
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1AirConditionerCmd(int switchCmd, int modeCmd, int windSpeedCmd, int temperatureCmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1AirConditionerCmd(switchCmd, modeCmd, windSpeedCmd, temperatureCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1暖风机控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启暖风机, 2: 关闭暖风机
|
||||
* @param windSpeedCmd //风速 0: default, 1: 1档,2: 2档
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1HeaderCmd(int switchCmd, int windSpeedCmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1HeaderCmd(switchCmd, windSpeedCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1顶灯控制
|
||||
*
|
||||
* @param switch1Cmd //0: default, 1: 开启顶灯1, 2: 关闭顶灯1
|
||||
* @param switch2Cmd //0: default, 1: 开启顶灯2, 2: 关闭顶灯2
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1MainLampCmd(int switch1Cmd, int switch2Cmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1MainLampCmd(switch1Cmd, switch2Cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1车门控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启车门, 2: 关闭车门
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1SmallLampCmd(int switchCmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1SmallLampCmd(switchCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1车门控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启车门, 2: 关闭车门
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1FrontDoorCmd(int switchCmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1FrontDoorCmd(switchCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅M1业务指令下发
|
||||
*
|
||||
* @param roboBusJinlvM1Cmd 命令
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd roboBusJinlvM1Cmd) {
|
||||
return mChannel != null && mChannel.sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 特种车辆命令下发
|
||||
*
|
||||
|
||||
@@ -335,6 +335,59 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean sendRoboVanSkywellTaskCmd(SpecialVehicleTaskCmdOuterClass.RoboVanSkywellTaskCmd vanSkywellTaskCmd);
|
||||
|
||||
/**
|
||||
* 金旅M1空调控制
|
||||
*
|
||||
* @param switchCmd 0: default, 1: 开启空调, 2: 关闭空调
|
||||
* @param modeCmd 模式 0: default, 1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
* @param windSpeedCmd 风速 0: default, 1: 1档,2: 2档,3:3档
|
||||
* @param temperatureCmd 温度 0: default, 16-26: 温度
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1AirConditionerCmd(int switchCmd, int modeCmd, int windSpeedCmd, int temperatureCmd);
|
||||
|
||||
/**
|
||||
* 金旅M1暖风机控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启暖风机, 2: 关闭暖风机
|
||||
* @param windSpeedCmd //风速 0: default, 1: 1档,2: 2档
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1HeaderCmd(int switchCmd, int windSpeedCmd);
|
||||
|
||||
/**
|
||||
* 金旅M1顶灯控制
|
||||
*
|
||||
* @param switch1Cmd //0: default, 1: 开启顶灯1, 2: 关闭顶灯1
|
||||
* @param switch2Cmd //0: default, 1: 开启顶灯2, 2: 关闭顶灯2
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1MainLampCmd(int switch1Cmd, int switch2Cmd);
|
||||
|
||||
/**
|
||||
* 金旅M1小灯(氛围灯)控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启小灯(氛围灯), 2: 关闭小灯(氛围灯)
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1SmallLampCmd(int switchCmd);
|
||||
|
||||
/**
|
||||
* 金旅M1车门控制
|
||||
*
|
||||
* @param switchCmd //0: default, 1: 开启车门, 2: 关闭车门
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1FrontDoorCmd(int switchCmd);
|
||||
|
||||
/**
|
||||
* 金旅M1业务指令下发
|
||||
*
|
||||
* @param roboBusJinlvM1Cmd 命令
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRoboBusJinlvM1TaskCmd(SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd roboBusJinlvM1Cmd);
|
||||
|
||||
/**
|
||||
* 特种车辆命令下发
|
||||
*
|
||||
|
||||
@@ -43,6 +43,8 @@ public class VehicleStateMessage extends MyAbstractMessageHandler {
|
||||
* parking_brake longitude_driving_mode eps_steering_mode
|
||||
* steering_sign location_missing trajectory_missing
|
||||
* chassis_status_missing pilot_mode_condition_met vehicletakeoverstatus
|
||||
* fuel_value robo_taxi_state robo_bus_state
|
||||
* robo_bus_jinlv_m1_state
|
||||
*/
|
||||
private void compatibility(OnAdasListener adasListener, RawData raw, VehicleStateOuterClass.VehicleState vehicleState) throws InvalidProtocolBufferException {
|
||||
/**************老地盘转换成新地盘PB***************/
|
||||
|
||||
Reference in New Issue
Block a user