Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Tapping button while screen is touched may drop button event

未关闭
#2,346 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
embedded-iot

调研方向

从 src/systemtask/SystemTask.cpp 中第 155 行附近的 pinConfig.hi_accuracy 设置开始,然后阅读链接的 nRF5 SDK GPIOTE 中断文档。通过按住屏幕并点击侧边按钮来重现问题,并在考虑文档所述功耗权衡的同时比较中断配置。完成标准是按钮事件不会丢失,也不会残留为虚假的按下状态,同时不会对功耗造成不可接受的影响。

由索引模型根据 Issue 内容生成。

描述

bug
Verification
  • I searched for similar bug reports (including closed issues) and found none was relevant.
What happened?

Tapping the side button while the screen is touched may drop button toggle events.

What should happen instead?

Tapping the side button while the screen is touched does not drop any events.

Reproduction steps
  • Open any app (not necessary but useful for demonstration)
  • Hold touch on the screen
  • Tap the side button

Possible outcomes:

  • The screen goes back to the apps list. This is when the bug fails to trigger. Try again.
  • The button press does not go through.
  • The screen goes directly to the watch face. At this point you can release the screen touch and wait. It will further go to the watch info page, as though the button was still pressed.

Reproducing this bug should take around 5-10 tries, it's not extremely rare.

More details?

In the third outcome listed where there is still a phantom held button press, the watch will not reset like it normally does if the button is held for a very long time.

I believe the bug is caused by the interrupt mode used for the screen and button. The low accuracy mode used cannot handle more than one active pin at a time (source). Changing the interrupts to use high accuracy mode by changing pinConfig.hi_accuracy on line 155 of src/systemtask/SystemTask.cpp to true does indeed seem to fix this issue, but mark9084 in the Pine64 discord informed me that this could increase power draw by 60uA if the high frequency clock is not already running (they provided this link to relevant documentation) so this may not be a desirable fix.

Version

e03414c

Companion app

No response

主要语言
C
星标
3.4k
派生
1.1k
平均合并
23 小时 18 分钟
30 天内合并 PR
1

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InfiniTimeOrg/InfiniTime 的其他 Issue

查看 InfiniTimeOrg/InfiniTime 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。