
项值Vendor ID0x4098(唯一接受)出站 Report ID0x02/0xF0/0xF2入站 Report ID1写路径语义FIFO 队列已实现产品族12未实现 PID2(0xB980/0xBEF0舵蹬)源码锚点:config.h·utils/usbdevice/usbdevice.cpp(工厂/族)·usbdevice_mac/win/lin.cpp(写/读)·products/*/product-*.cpp(组包)·*/-aircraft-profile.h(LED 枚举)1. 传输层规则1.1 写路径不变式writeData()只入队,由独立写线程按 FIFO 顺序发送。首字节 = HID Output Report ID。平台行为Windowspad 到HidP_GetCaps.OutputReportByteLength;独立写句柄 + overlappedWriteFilemacOSIOHIDDeviceSetReport(reportID, data)Linuxhidrawwrite丢包会破坏有序流,故队列溢出时整设备回收,而非丢单包。1.2 设备认领vendorId必须== WINCTRL_VENDOR_ID(0x4098)所属DeviceFamily未被菜单 disableUSBDevice::Device()按productIdswitch 建对应类源:usbdevice.cpp(工厂)、config.h1.3 入站平台差异(重要)平台路径Win / Linux整包 Input Report →report[0]=reportId→didReceiveData()macOSIOHIDQueue 元素 →usage − 1为按键索引 → 直接didReceiveButton()(不走位图解析)因此下文「Report 1 位图」描述主要适用于 Win/Linux。2. 通用帧格式(已核实)2.1 LED / 电机 — Output Report0x02(14 字节)Offset 值 含义 ------ -------------- ---------------- 0 0x02 Output Report ID 1 IdentifierByte 设备/子单元地址 2 Secondary BB / BF / B9 / C9 / motor 3–4 00 00 5 0x03 (变体重编程时可为 0x04/0x08) 6 0x49 channel-write(变体时 0x05/0x06) 7 channel / LED 8 brightness / intensity (0–255) 9–13 00…Secondary使用者核实位置0xBBFMC / FCU / AGP / TCAS / RMP / ECAM / PDC / Joystick 背光各setLedBrightness0xBFEFIS L/R LED;PAP3 LED/螺线管;Joystick 电机(多数)fcu-efis / pap3 / joystick0xB9Ursa Throttle/PAC;NWS 第一帧ursa / nws0xC9NWS 第二帧(同内容双写)product-nws.cpp0xbf/0xcfOrion Throttle 双电机orion-throttle.cppmotorCodeJoystick 振动:Ursa0xBF,Orion Stick0x00usbdevice工厂2.2 显示 — Output Report0xF0(64 字节)[0] 0xF0 [1] 0x00(FCU init 用 0x02;FMC 字体 flush 偶见 0x01) [2] packetNumber:1..255,回绕跳过 0 [3] opcode [4+] Identifier + Secondary + 固定前导 + 载荷 总长 pad 到 64Opcode角色使用产品0x11Co