Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加一个简单的消抖功能,以解决无法彻底关机的问题 #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lvniqi
Copy link

@lvniqi lvniqi commented Dec 7, 2023

经常碰到关机立刻开机的情况,可能按键装配的时候太紧了。。。
启动的时候添加一个消抖可以有效解决这种情况的发生。

power_init();
if(! knob_check_long_pressed(1000))
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if else 语句是否可以与整体项目一致,改为

if xxx {
   ...
} else {
  ...
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,不过我看这个工程的格式有点奇怪,有的地方是

void func(){
 ...;
}

有的是

void func()
{
...;
}

如果有别的代码提交,应该用什么格式?

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.

None yet

2 participants