Comments (1)
原理是什么样的?无级调光还是多段式调光?有没有这样的按键参考?
理论上,你可以把“滑动按键”的键值读取函数封装后,注册按键,每次按键扫描都会读取到一个键值(这个键值可能是不是 0 和 1,可能是线性值),然后根据这个值定义不同的事件或者直接上报键值。
需要改动的部分是 flex_button_t
结构体的 uint8_t pressed_logic_level : 1;
,因为这里是用一个位来存储键值的逻辑电平,在滑动按键上,应该是一个级别的值,或者返回。
from flexiblebutton.
Related Issues (20)
- 能否支持3连击 按键? HOT 6
- 触摸按键 HOT 12
- 中断方式检测按键 HOT 2
- 关于按键ID HOT 4
- 可不可自定义某个按键是否需要:长按,双击等功能? HOT 1
- 注册按键数量问题 HOT 1
- 按下事件<FLEX_BTN_PRESS_DOWN>的防抖 HOT 4
- 有考虑过 flex_button_register 和 button_scan 线程安全 HOT 3
- 长按事件的组合按键问题 HOT 4
- 同时按住四个按键出现卡顿并无法正常回调?
- 请问一下按键事件回调函数和用户注册时的ID是相反的是什么原因,我有4个按键,注册时是按0、1、2、3分配的ID,但是在事件回调中是相反的顺序,比如说我注册的时候ID是0,但是在事件回调函数里面打印的按键ID是3 HOT 2
- 非常不合理的设计:短按事件和长按事件相关联 HOT 2
- flexible_button.h中的值是否需要与flex_button_scan()轮询调用的时间间隔保持一致?
- flexible_button.c中的全局变量g_logic_level和g_btn_status_reg为何不用static修饰?
- 逻辑错误 HOT 2
- 按键处理数量限制 HOT 1
- 建议把状态用枚举值来代替,方便理解
- 关于按键连续触发事件 HOT 4
- 有没有在没有os的51单片机使用这个函数库的例子 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexiblebutton.