Преглед на файлове

feat: add VK_CAN_TEMP message

LiuYang преди 1 седмица
родител
ревизия
5eca3fb28c
променени са 2 файла, в които са добавени 21 реда и са изтрити 0 реда
  1. 8 0
      msg_definitions/VKFly.xml
  2. 13 0
      readme.md

+ 8 - 0
msg_definitions/VKFly.xml

@@ -1382,6 +1382,14 @@
       <field type="int16_t[36]" name="gravity_projected_body_z" units="cm">Vertical obstacle displacement, down positive; INT16_MAX unknown.</field>
     </message>
 
+    <message id="53033" name="VK_CAN_TEMP">
+      <description>K-type thermocouple temperature collected from a CAN bus module, 8 channels.</description>
+      <field type="uint32_t" name="time_boot_ms" units="ms">Timestamp in ms from system boot.</field>
+      <field type="int16_t[8]" name="temperature" units="cdegC" invalid="INT16_MAX">Temperature of each channel, 0.1 degC. INT16_MAX means sensor not connected or line fault.</field>
+      <field type="uint8_t" name="valid_mask">Bitmap: bit N set means channel N is valid.</field>
+      <field type="uint8_t" name="online">1: sensor module online, 0: communication timeout.</field>
+    </message>
+
     <message id="53100" name="VK_FW_UPDATE_BEGIN">
       <description>VKFLY autopilot update firmware begin. This message send from GCS to autopilot. </description>
       <field type="uint8_t" name="target_system">Target system id.</field>

+ 13 - 0
readme.md

@@ -2100,6 +2100,19 @@ OA72沿用`OBAVOID_ACT`开关, 非0启用; 解锁且离地后在水平速度闭
 
 默认参数仅供开发验证. 上机前必须验证传感覆盖、最差制动能力和端到端延迟; 初始停车距离不足时无法保证避免碰撞.
 
+### 8.5 VK_CAN_TEMP
+
+K 型热电偶温度采集模块温度消息, 消息 ID 为 **53033**, 默认以 1Hz 通过 GCS/Onboard 通道下发. 数据来源为 CAN 总线上的 8 通道 K 型热电偶采集模块, 飞控以 200ms 周期主动读取
+
+| 字段 | 类型 | 说明 |
+| ---- | ---- | ---- |
+| time_boot_ms | uint32_t | 最近一次收到温度帧的时间戳, ms, 自系统启动开始计时 |
+| temperature | int16_t[8] | 8 个通道温度, 单位 0.1°C; `INT16_MAX` 表示传感器未接入或线路故障 |
+| valid_mask | uint8_t | 位图, bit N 为 1 表示第 N+1 通道有效 |
+| online | uint8_t | 1: 模块在线; 0: 通讯超时(超时时间为 5s) |
+
+模块通讯超时后飞控停止下发本消息, 地面站不应将上一条消息视为当前温度.
+
 ## 9 飞控参数说明
 
 飞控参数名作为确认飞控参数用途的唯一识别码, 不可随意修改. 在新增参数时应注意不要与已有参数重名, 保持向前兼容性.