| File was renamed from ard-work/src/main/java/com/ard/tianyu/netty/command/real/UavStateCommand.java |
| | |
| | | package com.ard.tianyu.netty.command.real; |
| | | |
| | | import com.ard.tianyu.netty.command.BaseCommand; |
| | | import com.ard.tianyu.netty.command.BaseCmd; |
| | | import com.ard.tianyu.netty.protobuf.TelemetryDataPB; |
| | | import io.netty.buffer.ByteBuf; |
| | | |
| | | public class UavStateCommand extends BaseCommand { |
| | | public class UavStateCmd extends BaseCmd { |
| | | private TelemetryDataPB.UavState uavState; // ProtoBuf 数据类 |
| | | |
| | | // 构造函数 |
| | | public UavStateCommand(TelemetryDataPB.UavState uavState) { |
| | | public UavStateCmd(TelemetryDataPB.UavState uavState) { |
| | | setDataHeader((short) 0x6A77); // 设置帧头 |
| | | // setDataLength((short) (1 + uavState.toByteArray().length)); // 数据长度 |
| | | setCmdCode((byte) 0xA8); // 设置命令编号 |