添加项目文件。

This commit is contained in:
2026-03-26 10:45:29 +08:00
parent 10441f488c
commit b576d3f19d
48 changed files with 4812 additions and 0 deletions

31
LOGIC/Lgc_Consumer.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include "MID/Mid_Def.h"
/*
* 这份文件负责解析 report id 0x03 的 Consumer 包。
*
* 当前下位机真实结构很简单:
* 1. 第 0 字节是 report id固定为 0x03
* 2. 第 1、2 字节拼成一个 16 位 consumer usage
* 3. 整包固定长度 3 字节
*
* 所以这里不需要像 0x01 / 0x04 那样去拆 modifier 和 usage 位图。
*/
struct Lgc_Consumer_Struct_Result
{
// 这一包是否匹配 report id 0x03。
bool IsMatch = false;
// 如果匹配 0x03长度是否也正确。
bool IsLengthOk = false;
// 解析得到的 consumer usage。
quint16 Usage = 0;
// 给调试窗口显示的简短中文说明。
QString TextExplain;
};
void Lgc_Consumer_Func_Parse(const QByteArray& ByteArray, Lgc_Consumer_Struct_Result* p_Result);