Pārlūkot izejas kodu

合并主分支,添加更新配置

jujihjuji 2 mēneši atpakaļ
vecāks
revīzija
fb403a69cc

+ 31 - 2
msg_definitions/VKFly.xml

@@ -377,6 +377,9 @@
       <entry value="59" name="VKFLY_CUSTOM_MODE_FW_GPS_FS">
         <description>Fixedwing GPS fail safe mode</description>
       </entry>
+      <entry value="60" name="VKFLY_CUSTOM_MODE_PARACHUTE">
+        <description>Open parachute mode</description>
+      </entry>
     </enum>
 
     <enum name="VKFLY_VKINS_NAV_STATUS" bitmask="true">
@@ -632,6 +635,7 @@
       <entry value="4" name="VKFLY_MISSION_DONE_RETURN_TO_LAUNCH_AB_WP"></entry>
       <entry value="5" name="VKFLY_MISSION_DONE_RETURN_TO_LAUNCH_BA_WP"></entry>
       <entry value="6" name="VKFLY_MISSION_DONE_THEN_REDO"></entry>
+      <entry value="7" name="VKFLY_MISSION_DONE_THEN_DEPLOY_PARACHUTE"></entry>
     </enum>
 
     <enum name="VKFLY_RTL_EXEC_MODE">
@@ -732,6 +736,18 @@
         <param index="7" label=""> </param>
       </entry>
 
+      <entry value="44051" name="VKFLY_CMD_RFD_CONFIG" hasLocation="false"
+        isDestination="false">
+        <description>can esc id configuration</description>
+        <param index="1" label="Target component"> target component id </param>
+        <param index="2" label="Set blind zone" units="m"> set blind zone, NAN means ignore </param>
+        <param index="3" label="Set max range" units="m"> set max range, NAN means ignore </param>
+        <param index="4" label=""> </param>
+        <param index="5" label=""> </param>
+        <param index="6" label=""> </param>
+        <param index="7" label=""> </param>
+      </entry>
+
       <entry value="44060" name="VKFLY_CMD_DO_REPOSITION_THAN_THROW" hasLocation="true"
         isDestination="true">
         <description>Do reposition and throwing</description>
@@ -876,8 +892,9 @@
       <entry value="44071" name="VKFLY_CMD_DYNAMIC_ACT" hasLocation="true"
         isDestination="true">
         <description>Vehicle act</description>
-        <param index="1" label="action" minValue="0" maxValue="2">NAN means ignore.0 do dynamic_takeoff, 
-        1 do dynamic_land, 2 do dynamic_follow</param>
+        <param index="1" label="action" minValue="0" maxValue="2">NAN means ignore.0 do
+          dynamic_takeoff,
+          1 do dynamic_land, 2 do dynamic_follow</param>
         <param index="2" label=""></param>
         <param index="3" label=""></param>
         <param index="4" label=""></param>
@@ -898,6 +915,18 @@
         <param index="6" label=""> </param>
         <param index="7" label=""> </param>
       </entry>
+      <entry value="44072" name="VKFLY_CMD_DO_REPOSITION_THAN_DO_PARACHUTE" hasLocation="true"
+        isDestination="true">
+        <description>Do reposition then deploy parachute</description>
+        <param index="1" label="">Deploy distance</param>
+        <param index="2" label=""> </param>
+        <param index="3" label="Speed"> </param>
+        <param index="4" label=""> </param>
+        <param index="5" label="Latitude"> </param>
+        <param index="6" label="Longitude"> </param>
+        <param index="7" label="Altitude" units="m"> </param>
+      </entry>
+
     </enum>
   </enums>
 

+ 20 - 6
readme.md

@@ -245,6 +245,7 @@ typedef enum VKFLY_CUSTOM_MODE
     VKFLY_CUSTOM_MODE_FW_LAND=57, /* Fixedwing Land 固定翼降落 | */
     VKFLY_CUSTOM_MODE_FW_RTL=58, /* Fixedwing Rtl 固定翼返航 | */
     VKFLY_CUSTOM_MODE_FW_GPS_FS=59, /* Fixedwing GpsFs 固定翼丢星盘旋 | */
+    VKFLY_CUSTOM_MODE_PARACHUTE=60, /* 开伞 | */
     VKFLY_CUSTOM_MODE_ENUM_END=60, /*  | */
 } VKFLY_CUSTOM_MODE;
 ```
@@ -1081,7 +1082,7 @@ xyz的坐标系需按定义对齐. 坐标定义支持两种, 由 frame_id 指定
 
 ### 2.34 CACC 管理信息 VK_CACC_MANAGER_VERIFY
 
-CACC 管理信息 json 表, 地面站向飞控传输后飞控记录在内部存储. 
+CACC 管理信息 json 表, 地面站向飞控传输后飞控记录在内部存储.
 地面站可通过 MAV_CMD_REQUEST_MESSAGE 从飞控进行读取.
 
 | 字段      | 说明             |
@@ -1095,7 +1096,6 @@ CACC 管理信息 json 表, 地面站向飞控传输后飞控记录在内部存
 
 **机载摇杆或地面摇杆只能二选一, 不可同时都接入**
 
-
 | 字段    | 说明                                                      |
 | ------- | --------------------------------------------------------- |
 | x       | [-1000,1000], 俯仰, 负数低头, 正数抬头, INT16_MAX无效     |
@@ -1112,7 +1112,6 @@ CACC 管理信息 json 表, 地面站向飞控传输后飞控记录在内部存
 * 手动降落上锁, 飞机触地后 z < -900
 * 手动强制上锁, b0 = b1 = b2 = 1, 持续1s 强制上锁
 
-
 ### 2.36 空速传感器数据 VK_AIRSPEED
 
 | 字段        | 说明          |
@@ -1123,7 +1122,6 @@ CACC 管理信息 json 表, 地面站向飞控传输后飞控记录在内部存
 | raw_press   | 压力 hPa 百帕 |
 | flags       | 标志位 1-异常 |
 
-
 ## 3 参数设置
 
 飞控的参数修改、读取方法参考 [mavlink services parameter](https://mavlink.io/en/services/parameter.html). 使用16字节的 paramid 作为每各参数的唯一表示码.
@@ -1598,7 +1596,7 @@ param1~param5中,
 | param1 | 设置电调编号, 1-16, NAN表示忽略该指令                       |
 | param2 | 设置电调led, 0-关, 1-蓝, 2-绿, 3-青, 4-红, 5-紫, 6-黄, 7-白 |
 
-设置电调led 
+设置电调led
 
 ```
 param2 = (float)(颜色 + (闪烁 << 4) +(电调编号<<8))
@@ -1621,7 +1619,6 @@ param2 = (float)(颜色 + (闪烁 << 4) +(电调编号<<8))
 1号电调绿闪 = 0x2 + (0x1 << 4) + (0x1 << 8)
 4号电调关灯 = 0x0 + (0x0 << 4) + (0x4 << 8)
 
-
 ### 5.32 指点后抛投 VKFLY_CMD_DO_REPOSITION_THAN_THROW
 
 指点后抛投, 本指令仅支持 COMMAND_INT
@@ -1705,6 +1702,7 @@ param2 = (float)(颜色 + (闪烁 << 4) +(电调编号<<8))
 
 
 
+
 ### 5.37 队形飞行 VKFLY_CMD_FORMATION_FLY
 
 编队指令. 编队集结或解散指令发送给队形从机, 设置队形指令发送给队形主机.
@@ -1773,16 +1771,28 @@ param2 = (float)(颜色 + (闪烁 << 4) +(电调编号<<8))
 
 ### 5.43 跟随飞行 MAV_CMD_DO_FOLLOW
 
+### 5.44 指点开伞指令 VKFLY_CMD_DO_REPOSITION_THAN_DO_PARACHUTE
+
+| 参数   | 说明                               |
+| ------ | ---------------------------------- |
+| param1 | 开伞距离 m                         |
+| param3 | 速度, NAN 0 或负数表示默认巡航速度 |
+| x      | 纬度                               |
+| y      | 经度                               |
+| z      | 高度                               |
+
 * param1
 0停止跟随, 1跟随吊舱目标
 
 ## 6 飞控数据 LOG 读取
 
 ### 6.1 获取日志列表
+
 地面站向飞控发送 LOG_REQUEST_LIST 消息获取所有日志列表, 飞控回复 LOG_ENTRY 信息. 每个日志文件一条 LOG_ENTRY 信息.
 飞控默认以解锁-上锁存一个数据文件, 最多50个.
 
 * LOG_REQUEST_LIST
+
   | 字段             | 说明              |
   | ---------------- | ----------------- |
   | start            | 0~49              |
@@ -1791,6 +1801,7 @@ param2 = (float)(颜色 + (闪烁 << 4) +(电调编号<<8))
   | target_component | 目标飞控的 compid |
 
 * LOG_ENTRY
+
   | 字段         | 说明                  |
   | ------------ | --------------------- |
   | time_utc     | LOG utc时间           |
@@ -1927,6 +1938,7 @@ VKins 系统的状态数据自定义消息, 主要用于一些自定状态的传
 | dist_t_tar    | 目标距离, cm                                                          |
 | servo_state   | 舵机状态, 每位对应一个舵机, 1-开 0-关                                 |
 | flight_dist   | 飞行距离, m, 本次上电开始飞行的总距离                                 |
+
 ## 9 飞控参数说明
 
 飞控参数名作为确认飞控参数用途的唯一识别码, 不可随意修改. 在新增参数时应注意不要与已有参数重名, 保持向前兼容性.
@@ -2209,6 +2221,8 @@ VKins 系统的状态数据自定义消息, 主要用于一些自定状态的传
 | FW_ROLL_ELEV_KP | 固定翼横滚拉杆补偿       | UINT16 | 范围0~10, 默认3                                                                   |
 | FW_ROLL_MAX     | 固定翼最大横滚角         | FLOAT  | 单位deg, 范围15~45,  默认30                                                       |
 | FW_PITCH_MAX    | 固定翼最大俯仰角         | FLOAT  | 单位deg, 范围5~30, 默认15                                                         |
+| FW_TOF_PITCH    | 固定翼起飞俯仰角         | FLOAT  | 单位deg, 范围 5~30, 默认12                                                        |
+| FW_TOF_THR_DL   | 固定翼起飞油门启动延迟   | INT32  | 单位ms, 范围 -1~2000. 负值表示先启动油门, 正值表示检测到过载后再延迟启动油门      |
 | FW_VU_MAX       | 固定翼最大爬升率         | FLOAT  | 单位m/s, 范围1~10, 默认5                                                          |
 | FW_VD_MAX       | 固定翼最大下降率         | FLOAT  | 单位m/s, 范围1~10, 默认5                                                          |
 | FW_ASPD_STALL   | 固定翼失速空速           | FLOAT  | 单位m/s, 范围 10~200, 默认16                                                      |

+ 10 - 5
v2.0/VKFly/VKFly.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_VKFLY.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_VKFLY_XML_HASH -372229364128518728
+#define MAVLINK_VKFLY_XML_HASH 6794978338572909434
 
 #ifdef __cplusplus
 extern "C" {
@@ -275,7 +275,8 @@ typedef enum VKFLY_CUSTOM_MODE
    VKFLY_CUSTOM_MODE_FW_LAND=57, /* Fixedwing land mode | */
    VKFLY_CUSTOM_MODE_FW_RTL=58, /* Fixedwing return to launch mode | */
    VKFLY_CUSTOM_MODE_FW_GPS_FS=59, /* Fixedwing GPS fail safe mode | */
-   VKFLY_CUSTOM_MODE_ENUM_END=60, /*  | */
+   VKFLY_CUSTOM_MODE_PARACHUTE=60, /* Open parachute mode | */
+   VKFLY_CUSTOM_MODE_ENUM_END=61, /*  | */
 } VKFLY_CUSTOM_MODE;
 #endif
 
@@ -457,7 +458,8 @@ typedef enum VKFLY_MISSION_DONE_ACT
    VKFLY_MISSION_DONE_RETURN_TO_LAUNCH_AB_WP=4, /*  | */
    VKFLY_MISSION_DONE_RETURN_TO_LAUNCH_BA_WP=5, /*  | */
    VKFLY_MISSION_DONE_THEN_REDO=6, /*  | */
-   VKFLY_MISSION_DONE_ACT_ENUM_END=7, /*  | */
+   VKFLY_MISSION_DONE_THEN_DEPLOY_PARACHUTE=7, /*  | */
+   VKFLY_MISSION_DONE_ACT_ENUM_END=8, /*  | */
 } VKFLY_MISSION_DONE_ACT;
 #endif
 
@@ -738,6 +740,7 @@ typedef enum MAV_CMD
    VKFLY_CMD_MOUNT_CTRL=44030, /* VLFLY Custom orbit waypoint  | |  |  |  | Latitude| Longitude| Altitude|  */
    VKFLY_CMD_FORMATION_FLY=44031, /* Formation fly assemble, disband or change formation |1 means assemble, 2 means quit, 3 means change formation| | | | | | |  */
    VKFLY_CMD_ESC_CONFIG=44050, /* can esc id configuration | Set Esc id, min=1, max=16 |  |  |  |  |  |  |  */
+   VKFLY_CMD_RFD_CONFIG=44051, /* can esc id configuration | target component id |  set blind zone, NAN means ignore |  set max range, NAN means ignore |  |  |  |  |  */
    VKFLY_CMD_DO_REPOSITION_THAN_THROW=44060, /* Do reposition and throwing | Throw servo id bitmap |  |  |  |  |  |  |  */
    VKFLY_CMD_DO_REPOSITION_THAN_LAND=44061, /* Do reposition and throwing | Ground msl altitude|  |  |  |  |  |  |  */
    VKFLY_CMD_MISSION_START=44062, /* Start mission |start sequence of mission|  |  |  |  |  |  |  */
@@ -758,8 +761,10 @@ typedef enum MAV_CMD
           aux| | | | | | |  */
    VKFLY_CMD_EXT_NAV_CFG=44069, /* Start mission || | | | | | |  */
    VKFLY_CMD_DO_REPOSITION=44070, /* Do reposition || | |  NAN means ignore |  NAN means ignore |  NAN means ignore |  NAN means ignore |  */
-   VKFLY_CMD_DYNAMIC_ACT=44071, /* Vehicle act |NAN means ignore.0 do dynamic_takeoff, 
-        1 do dynamic_land, 2 do dynamic_follow| | | | | | |  */
+   VKFLY_CMD_DYNAMIC_ACT=44071, /* Vehicle act |NAN means ignore.0 do
+          dynamic_takeoff,
+          1 do dynamic_land, 2 do dynamic_follow| | | | | | |  */
+   VKFLY_CMD_DO_REPOSITION_THAN_DO_PARACHUTE=44072, /* Do reposition then deploy parachute |Deploy distance|  |  |  |  |  |  |  */
    VKFLY_CMD_SHANGFEI_BMS=44420, /* Power Ctl |NAN means invalid. 0 means power off,
           1 means power on|  |  |  |  |  |  |  */
    MAV_CMD_ENUM_END=44421, /*  | */

+ 1 - 1
v2.0/VKFly/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -372229364128518728
+#define MAVLINK_PRIMARY_XML_HASH 6794978338572909434
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/VKFly/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Mon Dec 22 2025"
+#define MAVLINK_BUILD_DATE "Wed Jan 21 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/common/common.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_COMMON.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_COMMON_XML_HASH 7752918812805443619
+#define MAVLINK_COMMON_XML_HASH -7829408705295404983
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/common/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH 7752918812805443619
+#define MAVLINK_PRIMARY_XML_HASH -7829408705295404983
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/common/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Mon Dec 22 2025"
+#define MAVLINK_BUILD_DATE "Wed Jan 21 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/minimal/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -5674873585915770190
+#define MAVLINK_PRIMARY_XML_HASH -8700632758280904518
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/minimal/minimal.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_MINIMAL_XML_HASH -5674873585915770190
+#define MAVLINK_MINIMAL_XML_HASH -8700632758280904518
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/minimal/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Mon Dec 22 2025"
+#define MAVLINK_BUILD_DATE "Wed Jan 21 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
  

+ 1 - 1
v2.0/standard/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -6007956602182432236
+#define MAVLINK_PRIMARY_XML_HASH -7227647322658675737
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/standard/standard.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_STANDARD.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_STANDARD_XML_HASH -6007956602182432236
+#define MAVLINK_STANDARD_XML_HASH -7227647322658675737
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/standard/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Mon Dec 22 2025"
+#define MAVLINK_BUILD_DATE "Wed Jan 21 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22