liusuyi
2024-11-18 433cf58fbca44f897a70d1a455eb17c6a6d3bc3c
优化打点
3 files modified
26 ■■■■■ changed files
ard-admin/src/main/resources/application-dev.yml 6 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/tianyu/netty/command/manual/FlyPointControlCmd.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/tianyu/netty/handler/MessageProtocolDecoder.java 18 ●●●●● patch | view | raw | blame | history
ard-admin/src/main/resources/application-dev.yml
@@ -1,7 +1,7 @@
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8080
  port: 8088
# 日志配置
logging:
@@ -24,12 +24,12 @@
# 天宇服务器配置
tianyu:
  # 天宇http服务器地址
  endpoint: 112.98.106.22:22000
  endpoint: 112.98.106.22:12000
  accesskeyid: qmfmd3Ws7M4dMcylnrTU
  accesskeysecret: 5WBU2uEhHZaVefpZdaxpFh4LJW9fZZaa
  # 天宇tcp服务器地址
  tcpserver: 112.98.106.22
  tcpport: 23002
  tcpport: 13002
#流媒体配置
mediamtx:
  # 流媒体服务器地址
ard-work/src/main/java/com/ard/tianyu/netty/command/manual/FlyPointControlCmd.java
@@ -19,7 +19,7 @@
    public FlyPointControlCmd(FlyPointControlDTO flyPointControlDTO) {
        setDataHeader((short) 0x7479);
        setDataLength((short) 36);
        setDataLength((short) 43);
        setBoxSn(flyPointControlDTO.getBoxSn().getBytes());
        setCmdCode((byte) 0xD1);
        this.longitude = flyPointControlDTO.getLongitude();
ard-work/src/main/java/com/ard/tianyu/netty/handler/MessageProtocolDecoder.java
@@ -209,15 +209,15 @@
                return new UavReadyReplyCmd(boxSn, batteryPower, longitude, latitude, altitude);
            //无人机初始化信息回复
            case 0x42:
                byte[] uavData1 = new byte[in.readableBytes() - 15];
                in.readBytes(uavData1);
                TelemetryDataPB.UavInitInfo uavInitInfo;
                try {
                    uavInitInfo = TelemetryDataPB.UavInitInfo.parseFrom(uavData1);
                } catch (InvalidProtocolBufferException e) {
                    throw new RuntimeException(e);
                }
                return new UavInitReplyCmd(boxSn, uavInitInfo);
//                byte[] uavData1 = new byte[in.readableBytes() - 15];
//                in.readBytes(uavData1);
//                TelemetryDataPB.UavInitInfo uavInitInfo;
//                try {
//                    uavInitInfo = TelemetryDataPB.UavInitInfo.parseFrom(uavData1);
//                } catch (InvalidProtocolBufferException e) {
//                    throw new RuntimeException(e);
//                }
//                return new UavInitReplyCmd(boxSn, uavInitInfo);
            default:
                return null;
        }