How can I change the Debounce time in Stateflow?
4 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
Fangjun Jiang
2023-10-11
编辑:Fangjun Jiang
2023-10-11
Typically, the value "5" in the two "after(5,sec)" statements is the time that the switch state needs to stay (without bounce) before it permently becomes "On" or "Off " state. You can change the value direcyly there or use a variable.
5 seconds sounds really long for a switch debounce. Mostly common ones are less than 1 second. after(800,msec)
Or, it could be a "press and hold" button. Press and hold for more than 5 seconds to turn it on. Press and hold for more than 5 seconds to turn it off.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!