remove 0xa1 to 0xa3
This commit is contained in:
@@ -782,50 +782,6 @@ unsigned char process_send_params(uint8_t data[], uint16_t len) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理设置增益模式命令 (0xA0) - SET_GAIN_MODE
|
||||
if (data[1] == 0xA0) {
|
||||
uint8_t gain_mode = data[2];
|
||||
|
||||
// 参数验证
|
||||
if (gain_mode > 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 设置请求变量(使用SHARED_GLOBAL宏)
|
||||
extern unsigned g_request_gain_mode;
|
||||
SET_SHARED_GLOBAL(g_request_gain_mode, gain_mode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理获取增益模式命令 (0xA1) - GET_GAIN_MODE
|
||||
if (data[1] == 0xA1) {
|
||||
read_request.pending_cmd = 0xA1;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理设置滤波器模式命令 (0xA2) - SET_FILTER_MODE
|
||||
if (data[1] == 0xA2) {
|
||||
uint8_t filter_mode = data[2];
|
||||
|
||||
// 参数验证:支持8种滤波器模式(0-7)
|
||||
if (filter_mode > 7) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 设置请求变量(使用SHARED_GLOBAL宏)
|
||||
extern unsigned g_request_filter_mode;
|
||||
SET_SHARED_GLOBAL(g_request_filter_mode, filter_mode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理获取滤波器模式命令 (0xA3) - GET_FILTER_MODE
|
||||
if (data[1] == 0xA3) {
|
||||
read_request.pending_cmd = 0xA3;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理设置游戏模式命令 (0xA4) - SET_GAME_MODE
|
||||
if (data[1] == 0xA4) {
|
||||
uint8_t game_mode = data[2];
|
||||
@@ -1325,38 +1281,6 @@ unsigned char process_read_params(uint8_t response[]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理获取增益模式请求 (0xA1) - GET_GAIN_MODE
|
||||
if (read_request.pending_cmd == 0xA1) {
|
||||
RSP_HDR(response, 0xA1);
|
||||
|
||||
// 读取全局变量(使用SHARED_GLOBAL宏)
|
||||
extern unsigned g_gain_mode;
|
||||
unsigned gain_mode;
|
||||
GET_SHARED_GLOBAL(gain_mode, g_gain_mode);
|
||||
|
||||
// 当前增益模式 (1字节,位置2)
|
||||
response[2] = (uint8_t)gain_mode;
|
||||
|
||||
read_request.pending_cmd = 0; // Clear read request flag
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理获取滤波器模式请求 (0xA3) - GET_FILTER_MODE
|
||||
if (read_request.pending_cmd == 0xA3) {
|
||||
RSP_HDR(response, 0xA3);
|
||||
|
||||
// 读取全局变量(使用SHARED_GLOBAL宏)
|
||||
extern unsigned g_filter_mode;
|
||||
unsigned filter_mode;
|
||||
GET_SHARED_GLOBAL(filter_mode, g_filter_mode);
|
||||
|
||||
// 当前滤波器模式 (1字节,位置2)
|
||||
response[2] = (uint8_t)filter_mode;
|
||||
|
||||
read_request.pending_cmd = 0; // Clear read request flag
|
||||
return true;
|
||||
}
|
||||
|
||||
// 处理获取游戏模式请求 (0xA5) - GET_GAME_MODE
|
||||
if (read_request.pending_cmd == 0xA5) {
|
||||
RSP_HDR(response, 0xA5);
|
||||
|
||||
Reference in New Issue
Block a user