Hi
我用CapSense CSD组件想做一个虚拟按键,我的CapSense组件配置是增加一个button (引脚分配给实际的触摸按键pin)以及一个proximity sensor (就是想设置的虚拟按键),proximity sensor的number of dedicated sensor为0,proximity sensor的scan order是第一位同时sensor选为button0。但是我发现没有这个proximity sensor时,实际按键可以正常触发,但是加上这个proximity sensor后,实际按键就没作用。主要是通过点灯动作来验证。
想问一下,这种增加虚拟按键的方式是不是错误的?
Thanks and regards.
Grace
已解决! 转到解答。
Hi Grace,
下面的回答基于你用的是CSD 2.6 版本。
造成你这个问题的原因有两个:
1: 接近感应的sensor默认是没有使能的,所以如果你的系统里面有接近感应sensor的话,你需要手动使能,这一点你可以查看组件datasheet, proximity sensor 一章节。
Note All widgets are enabled by default except proximity widgets. Proximity widgets must be
manually enabled in API as their long scan time is incompatible with the fast response required
of other widget types. Use the CapSense_EnableWidget() function to enable proximity widgets.
See How to use the proximity sensors for more information about proximity sensors.
2: 你系统关于接近感应的参数调试的有一些问题。
3: 新的工程,我在042的板子上面测试过了,可以正常使用。
4: 工程在附件,请下载进行测试。
Hi Lingling
我没有找到上传附件的方式,麻烦你从如下网盘链接下载工程:
链接:https://pan.baidu.com/s/1IWSc0sR01FBXC2YF9pfcjA
提取码:waa6
我用的是CY8CKIT-042 kit测试。感谢。
BR
Grace
Hi Grace,
下面的回答基于你用的是CSD 2.6 版本。
造成你这个问题的原因有两个:
1: 接近感应的sensor默认是没有使能的,所以如果你的系统里面有接近感应sensor的话,你需要手动使能,这一点你可以查看组件datasheet, proximity sensor 一章节。
Note All widgets are enabled by default except proximity widgets. Proximity widgets must be
manually enabled in API as their long scan time is incompatible with the fast response required
of other widget types. Use the CapSense_EnableWidget() function to enable proximity widgets.
See How to use the proximity sensors for more information about proximity sensors.
2: 你系统关于接近感应的参数调试的有一些问题。
3: 新的工程,我在042的板子上面测试过了,可以正常使用。
4: 工程在附件,请下载进行测试。