Skip to content

FIX: 移除未使用的 short_press_time_ms 字段及 BITS_BTN_SHORT_TIME_MS 宏#50

Merged
530china merged 1 commit into
masterfrom
develop
Mar 9, 2026
Merged

FIX: 移除未使用的 short_press_time_ms 字段及 BITS_BTN_SHORT_TIME_MS 宏#50
530china merged 1 commit into
masterfrom
develop

Conversation

@530china

@530china 530china commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Why:

  1. short_press_time_ms 字段在代码中从未被读取,实际消抖由全局宏 BITS_BTN_DEBOUNCE_TIME_MS(40ms)控制;
  2. 该字段在文档中被错误描述为消抖参数,误导用户以为可通过它控制消抖行为;
  3. 删除头文件中的宏定义和结构体字段,同步清理 docs、examples、simulator、test 共 13 个文件中的所有引用;
  4. 修正 usage_guide.md 消抖机制描述,指向真正生效的 BITS_BTN_DEBOUNCE_TIME_MS

TEST: 48 Tests 0 Failures 0 Ignored

Why:
1. short_press_time_ms 字段在代码中从未被读取,实际消抖由全局宏 BITS_BTN_DEBOUNCE_TIME_MS(40ms)控制;
2. 该字段在文档中被错误描述为消抖参数,误导用户以为可通过它控制消抖行为;
3. 删除头文件中的宏定义和结构体字段,同步清理 docs、examples、simulator、test 共 13 个文件中的所有引用;
4. 修正 usage_guide.md 消抖机制描述,指向真正生效的 BITS_BTN_DEBOUNCE_TIME_MS

TEST: 48 Tests 0 Failures 0 Ignored
@530china 530china merged commit c5edc8b into master Mar 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant