1. 如何修改代碼支持三击? 2. 如何让双击判断过程中避免触发RELEASE 3. 如何判别开机时的长压和一般性值得长压? 参考附件修改代码, 附件密碼為52bluetooth 具体概念. 1. RELEASE event必须储存于releaseHis, double_tap不可直接触发, 两者需等待triple_tap判定完成. 2. 新增triple_counter记数按击次数, 三击失败后判定为二击或RELEASE 3. 新增FIRST_HELD, TRIPLE事件, 但由于ADK不具备此两事件的判别, 必须修正ADK的py代码. 寻找 C:\qtil\ADK_QCC512X_QCC302X_WIN_6.4.2.26\tools\buttonparsexml ButtonParseXML.py 请将鼠标标移到196行附近. table_str += OutputButtonAction(message_dict, "ENTER") table_str += OutputButtonAction(message_dict, "FIRST_HELD") table_str += OutputButtonAction(message_dict, "HELD") table_str += OutputButtonAction(message_dict, "HELD_RELEASE") table_str += OutputButtonAction(message_dict, "DOUBLE") table_str += OutputButtonAction(message_dict, "RELEASE") 加上两行, 即可parsing出FIRST_HELD和TRIPLE新的事件. table_str += OutputButtonAction(message_dict, "FIRST_HELD") table_str += OutputButtonAction(message_dict, "TRIPLE") ![]() |
曾今很强 发表于 2020-5-23 10:14
直接在上层添加一个timeout的message就可以了,press的时候增加计数值,发送超时消息,接收到超时之后的计 ...
GMT+8, 2025-4-30 23:43 , Processed in 0.148387 second(s), 21 queries , Gzip On, MemCached On.
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.