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

有计划加入滑式按键吗? #15

Open
douchuan opened this issue Jan 13, 2020 · 1 comment
Open

有计划加入滑式按键吗? #15

douchuan opened this issue Jan 13, 2020 · 1 comment

Comments

@douchuan
Copy link

比如,智能灯,用手指滑动方式,调节亮度

@murphyzhao
Copy link
Owner

原理是什么样的?无级调光还是多段式调光?有没有这样的按键参考?

理论上,你可以把“滑动按键”的键值读取函数封装后,注册按键,每次按键扫描都会读取到一个键值(这个键值可能是不是 0 和 1,可能是线性值),然后根据这个值定义不同的事件或者直接上报键值。

需要改动的部分是 flex_button_t 结构体的 uint8_t pressed_logic_level : 1;,因为这里是用一个来存储键值的逻辑电平,在滑动按键上,应该是一个级别的值,或者返回。

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

No branches or pull requests

2 participants